-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Create datamodel for subform in config (#14138)
Co-authored-by: Jamal Alabdullah <[email protected]> Co-authored-by: Michael Queyrichon <[email protected]> Co-authored-by: Jonas Dyrlie <[email protected]>
- Loading branch information
1 parent
844b3b1
commit ebfb78e
Showing
31 changed files
with
677 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export enum AppsQueryKey { | ||
AppLayouts = 'formLayouts', | ||
AppLayoutSets = 'fetchLayoutSets', | ||
AppLayoutSettings = 'layoutSettings', | ||
AppTextResources = 'fetchTextResources', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
88 changes: 0 additions & 88 deletions
88
...LayoutSetForSubform/EditLayoutSet/CreateNewSubformLayoutSet/CreateNewSubformLayoutSet.tsx
This file was deleted.
Oops, something went wrong.
67 changes: 0 additions & 67 deletions
67
...youtSetForSubform/EditLayoutSet/CreateNewSubformLayoutSet/SubformDataModelSelect.test.tsx
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
...ditLayoutSetForSubform/EditLayoutSet/CreateNewSubformLayoutSet/SubformDataModelSelect.tsx
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
...PropertiesHeader/EditLayoutSetForSubform/EditLayoutSet/CreateNewSubformLayoutSet/index.ts
This file was deleted.
Oops, something went wrong.
File renamed without changes.
49 changes: 49 additions & 0 deletions
49
...EditLayoutSetForSubform/EditLayoutSet/CreateNewSubformSection/CreateNewSubformButtons.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react'; | ||
import classes from './CreateNewSubformButtons.module.css'; | ||
import { CheckmarkIcon, TrashIcon } from '@studio/icons'; | ||
import { StudioButton, StudioSpinner } from '@studio/components'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
type CreateNewSubformButtonsProps = { | ||
isPendingNewSubformMutation: boolean; | ||
disableSaveButton: boolean; | ||
displayCloseButton: boolean; | ||
handleCloseButton: () => void; | ||
}; | ||
|
||
export const CreateNewSubformButtons = ({ | ||
isPendingNewSubformMutation, | ||
disableSaveButton, | ||
displayCloseButton, | ||
handleCloseButton, | ||
}: CreateNewSubformButtonsProps) => { | ||
const { t } = useTranslation(); | ||
|
||
const saveIcon = isPendingNewSubformMutation ? ( | ||
<StudioSpinner size='sm' spinnerTitle={t('general.loading')} /> | ||
) : ( | ||
<CheckmarkIcon /> | ||
); | ||
|
||
return ( | ||
<div className={classes.buttonGroup}> | ||
<StudioButton | ||
icon={saveIcon} | ||
type='submit' | ||
title={t('general.save')} | ||
disabled={disableSaveButton} | ||
variant='secondary' | ||
color='success' | ||
/> | ||
{displayCloseButton && ( | ||
<StudioButton | ||
onClick={handleCloseButton} | ||
title={t('general.close')} | ||
icon={<TrashIcon />} | ||
variant='secondary' | ||
color='danger' | ||
/> | ||
)} | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.