Skip to content

Commit

Permalink
Remove ApplicationLogic.AllowInSubform property (#2682)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielskovli authored Nov 5, 2024
1 parent 41f43ad commit e7906db
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/__mocks__/getApplicationMetadataMock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export const getIncomingApplicationMetadataMock = (
allowedContentTypes: ['application/xml'],
appLogic: {
classRef: '...',
allowInSubform: true,
},
taskId: 'Task_1',
maxCount: 0,
Expand Down
1 change: 0 additions & 1 deletion src/language/texts/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ export function en() {
'As long as the component has configuration errors, we cannot show it in the form. Fix the errors and try again.',
subform_no_datatype_layoutset: 'Data type specification not found in layout-sets.json',
subform_no_datatype_appmetadata: "Data type '{0}' was not found in applicationmetadata.json",
subform_datatype_not_allowed: "Data type '{0}' is not allowed for use in subforms",
subform_misconfigured_add_button:
"Data type '{0}' is marked as 'disallowUserCreate=true', but the subform component is configured with 'showAddButton=true'. This is a contradiction, as the user will never be permitted to perform the add-button operation.",
},
Expand Down
1 change: 0 additions & 1 deletion src/language/texts/nb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ export function nb(): FixedLanguageList {
'Så lenge komponenten har konfigurasjonsfeil kan vi ikke vise den i skjemaet. Rett opp i feilene og prøv igjen.',
subform_no_datatype_layoutset: 'Datatype-spesifikasjon ikke funnet i layout-sets.json.',
subform_no_datatype_appmetadata: "Datatype '{0}' ble ikke funnet i applicationmetadata.json.",
subform_datatype_not_allowed: "Datatype '{0}' er ikke tillatt for bruk i underskjema.",
subform_misconfigured_add_button:
"Datatype '{0}' er markert som 'disallowUserCreate=true', men underskjema-komponenten er konfigurert med 'showAddButton=true'. Dette er en motsetning, siden brukeren aldri vil få lov til å utføre handlingene bak legg-til knappen.",
},
Expand Down
1 change: 0 additions & 1 deletion src/language/texts/nn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ export function nn(): FixedLanguageList {
'Medan du har feil i konfigurasjonen kan me ikkje vise komponenten i skjemaet. Rett opp i feila og prøv igjen.',
subform_no_datatype_layoutset: 'Datatype-spesifikasjon ikkje funnen i layout-sets.json.',
subform_no_datatype_appmetadata: "Datatype '{0}' vart ikkje funnen i applicationmetadata.json.",
subform_datatype_not_allowed: "Datatype '{0}' er ikkje tillaten for bruk i underskjema.",
subform_misconfigured_add_button:
"Datatype '{0}' er markert som 'disallowUserCreate=true', men underskjema-komponenten er konfigurert med 'showAddButton=true'. Dette er ei motseiing, Sidan brukaren aldri vil få lov til å utføre handlingane bak legg-til knappen.",
},
Expand Down
2 changes: 0 additions & 2 deletions src/layout/Subform/SubformValidator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ export function SubformValidator(props: NodeValidationProps<'Subform'>) {
error = langAsString('config_error.subform_no_datatype_layoutset');
} else if (dataType === undefined) {
error = langAsString('config_error.subform_no_datatype_appmetadata', [targetType]);
} else if (dataType.appLogic?.allowInSubform !== true) {
error = langAsString('config_error.subform_datatype_not_allowed', [targetType]);
} else if (dataType.appLogic?.disallowUserCreate === true && externalItem.showAddButton !== false) {
error = langAsString('config_error.subform_misconfigured_add_button', [targetType]);
}
Expand Down
1 change: 0 additions & 1 deletion src/types/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export interface IApplicationLogic {
autoCreate?: boolean | null;
classRef?: string | null;
schemaRef?: string | null;
allowInSubform?: boolean | null;
disallowUserCreate?: boolean | null;
}

Expand Down

0 comments on commit e7906db

Please sign in to comment.