Skip to content

Commit

Permalink
refactor: optimize quick add
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin-Guillemin committed Dec 15, 2023
1 parent e362686 commit a384775
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions src/main/webapp/src/components/AlertManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,14 @@ const { currentEtab } = storeToRefs(structureStore);
const doAlert = (alert: Alert): void => {
if (alert.action) {
switch (alert.title) {
case 'ADF.GEST':
requestAdd.value = {
i18n: 'additional.add.ADF.GEST',
function: 'ADF-GEST',
type: 'code',
searchList: administrativeList.value,
};
isQuickAdd.value = true;
break;
case 'DIR.D0010':
requestAdd.value = {
i18n: 'additional.add.DIR.D0010',
function: 'DIR-D0010',
type: 'code',
searchList: administrativeList.value,
};
isQuickAdd.value = true;
break;
if (alert.title) {
requestAdd.value = {
i18n: `additional.add.${alert.title}`,
function: alert.title.replace('.', '-'),
type: 'code',
searchList: administrativeList.value,
};
isQuickAdd.value = true;
}
}
};
Expand Down

0 comments on commit a384775

Please sign in to comment.