diff --git a/migration/20.03/2003.sql b/migration/20.03/2003.sql index 5f41d57dce6d2a999120b7b8003d1c52d1421ff2..87ed2b6ae61334abc9bfdb5f0b937f508aca2953 100644 --- a/migration/20.03/2003.sql +++ b/migration/20.03/2003.sql @@ -86,6 +86,9 @@ where group_id in ( UPDATE groupbasket SET list_event_data = '{"defaultTab":"info"}' WHERE list_event = 'processDocument' AND (list_event_data IS NULL OR list_event_data::text = ''); +UPDATE groupbasket SET list_event = 'documentDetails' WHERE list_event IS NULL; +ALTER TABLE groupbasket ALTER COLUMN list_event SET NOT NULL; + -- /!\ Do not move : update actions AFTER all updates on groupbasket DELETE FROM actions_categories WHERE action_id in (SELECT id FROM actions WHERE component = 'viewDoc' OR action_page in ('view', 'validate_mail', 'process', 'visa_mail')); DELETE FROM actions_groupbaskets WHERE id_action in (SELECT id FROM actions WHERE component = 'viewDoc' OR action_page in ('view', 'validate_mail', 'process', 'visa_mail')); diff --git a/src/frontend/app/actions/actions-list.component.ts b/src/frontend/app/actions/actions-list.component.ts index f1f0286773edcdcf8fa82b50571a2596f4b6d1ba..2323cf3a0b7ce549b1af3fc437c52f6d3a29df73 100644 --- a/src/frontend/app/actions/actions-list.component.ts +++ b/src/frontend/app/actions/actions-list.component.ts @@ -75,12 +75,6 @@ export class ActionsListComponent implements OnInit { } launchEvent(action: any, row: any) { - if (action.component === null) { - action.component = 'documentDetails'; - this.actionService.launchAction(action, this.currentBasketInfo.ownerId, this.currentBasketInfo.groupId, this.currentBasketInfo.basketId, this.selectedRes, this.currentResource, false); - return; - } - this.arrRes = []; this.currentAction = action; diff --git a/src/frontend/app/administration/basket/list/list-administration.component.ts b/src/frontend/app/administration/basket/list/list-administration.component.ts index 9f6f5e3d1f2a2d8e8d9fdc4f04483d5e384d5b72..b70b116685dd7b7f4240e3591da1a70def09ebc6 100644 --- a/src/frontend/app/administration/basket/list/list-administration.component.ts +++ b/src/frontend/app/administration/basket/list/list-administration.component.ts @@ -234,7 +234,7 @@ export class ListAdministrationComponent implements OnInit { this.displayedSecondaryData.push(this.availableData[indexData]); this.availableData.splice(indexData, 1); }); - this.selectedListEvent = this.basketGroup.list_event === null ? 'documentDetails' : this.basketGroup.list_event; + this.selectedListEvent = this.basketGroup.list_event; this.selectedListEventClone = this.selectedListEvent; if (this.basketGroup.list_event === 'processDocument') { @@ -309,7 +309,6 @@ export class ListAdministrationComponent implements OnInit { } saveTemplate() { - this.selectedListEvent = this.selectedListEvent === 'documentDetails' ? null : this.selectedListEvent; let template: any = []; this.displayedSecondaryData.forEach((element: any) => { template.push( @@ -325,7 +324,6 @@ export class ListAdministrationComponent implements OnInit { .subscribe(() => { this.displayedSecondaryDataClone = JSON.parse(JSON.stringify(this.displayedSecondaryData)); this.basketGroup.list_display = template; - this.selectedListEvent = this.selectedListEvent === null ? 'documentDetails' : this.selectedListEvent; this.basketGroup.list_event = this.selectedListEvent; this.selectedListEventClone = this.selectedListEvent; this.selectedProcessToolClone = JSON.parse(JSON.stringify(this.selectedProcessTool));