Skip to content

Commit

Permalink
[Ref] Cleanup code, remove duplicated comment from merge, eliminate a…
Browse files Browse the repository at this point in the history
…lways true if statement
  • Loading branch information
lukaskabc committed Nov 15, 2024
1 parent f37b2ff commit d0cfe17
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 30 deletions.
19 changes: 0 additions & 19 deletions src/action/AsyncActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,6 @@ import {
getChangeTypeUri,
VocabularyContentChangeFilterData,
} from "../model/filter/VocabularyContentChangeFilterData";
/*
* Asynchronous actions involve requests to the backend server REST API. As per recommendations in the Redux docs, this consists
* of several synchronous sub-actions which inform the application of initiation of the request and its result.
*
* Some conventions (they are also described in README.md):
* API guidelines:
* _Load_ - use IRI identifiers as parameters (+ normalized name as string if necessary, e.g. when fetching a term).
* _Create_ - use the instance to be created as parameter + IRI identifier if additional context is necessary (e.g. when creating a term).
* _Update_ - use the instance to be updated as parameter. It should contain all the necessary data.
* _Remove_ - use the instance to be removed as parameter.
*
* Naming conventions for CRUD operations:
* _load${ASSET(S)}_ - loading assets from the server, e.g. `loadVocabulary`
* _create${ASSET}_ - creating an asset, e.g. `createVocabulary`
* _update${ASSET}_ - updating an asset, e.g. `updateVocabulary`
* _remove${ASSET}_ - removing an asset, e.g. `removeVocabulary`
*
* TODO Consider splitting this file into multiple, it is becoming too long
*/

/*
* Asynchronous actions involve requests to the backend server REST API. As per recommendations in the Redux docs, this consists
Expand Down
15 changes: 6 additions & 9 deletions src/component/vocabulary/TermChangeFrequencyUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import ChangeRecord from "../../model/changetracking/ChangeRecord";
import { UpdateRecord } from "../../model/changetracking/UpdateRecord";
import VocabularyContentPersistRow from "../changetracking/VocabularyContentPersistRow";
import VocabularyContentUpdateRow from "../changetracking/VocabularyContentUpdateRow";
import If from "../misc/If";
import SimplePagination from "../dashboard/widget/lastcommented/SimplePagination";
import CustomInput from "../misc/CustomInput";
import Select from "../misc/Select";
Expand Down Expand Up @@ -254,14 +253,12 @@ const TermChangeFrequencyUI: React.FC<TermChangeFrequencyUIProps> = ({
</tbody>
</Table>
</div>
<If expression={(changeRecords?.length || 1) > 0}>
<SimplePagination
page={page}
setPage={setPage}
pageSize={pageSize}
itemCount={pageSize + 1}
/>
</If>
<SimplePagination
page={page}
setPage={setPage}
pageSize={pageSize}
itemCount={pageSize + 1}
/>
</Col>
</Row>
);
Expand Down
1 change: 0 additions & 1 deletion src/i18n/cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,6 @@ const cs = {
"history.changedAttribute": "Atribut",
"history.originalValue": "Původní hodnota",
"history.newValue": "Nová hodnota",
"history.filter.datetime": "Období",

"changefrequency.label": "Aktivita",

Expand Down
1 change: 0 additions & 1 deletion src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,6 @@ const en = {
"history.changedAttribute": "Attribute",
"history.originalValue": "Original value",
"history.newValue": "New value",
"history.filter.datetime": "Time period",

"changefrequency.label": "Activity",

Expand Down

0 comments on commit d0cfe17

Please sign in to comment.