From ca24ab69199a8897dfcc25661d76ddc1fef7272a Mon Sep 17 00:00:00 2001 From: hillelcoren Date: Wed, 29 Sep 2021 08:07:58 +0000 Subject: [PATCH] Admin Portal - Profile --- public/main.profile.dart.js | 60 ++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/public/main.profile.dart.js b/public/main.profile.dart.js index b60628122455..bdd9bfbcfc00 100644 --- a/public/main.profile.dart.js +++ b/public/main.profile.dart.js @@ -64409,7 +64409,7 @@ t2 = state.uiState.selectedCompanyIndex; if (!J.$index$asx(t1._list, t2).userCompany.can$2(C.UserPermission_create, entityType)) return; - M.checkForChanges(new M.createEntityByType_closure(state, store, applyFilter, entityType, false), context, false, store); + M.checkForChanges(new M.createEntityByType_closure(state, store, entityType, applyFilter, false), context, false, store); }, createEntity: function(cancelCompleter, completer, context, entity, filterEntity, force) { var store = O.StoreProvider_of(context, type$.legacy_AppState), @@ -64425,7 +64425,7 @@ var store = O.StoreProvider_of(context, type$.legacy_AppState), state = store.get$_store$_state(), t1 = L.Localizations_of(context, C.Type_AppLocalization_KyD, type$.legacy_AppLocalization); - M.checkForChanges(new M.editEntity_closure(entity.get$entityType(), store, entity, completer, state, context, t1, subIndex), context, false, store); + M.checkForChanges(new M.editEntity_closure(state, entity.get$entityType(), store, entity, completer, context, t1, subIndex), context, false, store); }, handleEntitiesActions: function(entities, action, autoPop) { var t1, store, context; @@ -64769,8 +64769,8 @@ var _ = this; _.state = t0; _.store = t1; - _.applyFilter = t2; - _.entityType = t3; + _.entityType = t2; + _.applyFilter = t3; _.force = t4; }, createEntity_closure: function createEntity_closure(t0, t1, t2, t3, t4, t5, t6, t7) { @@ -64786,11 +64786,11 @@ }, editEntity_closure: function editEntity_closure(t0, t1, t2, t3, t4, t5, t6, t7) { var _ = this; - _.entityType = t0; - _.store = t1; - _.entity = t2; - _.completer = t3; - _.state = t4; + _.state = t0; + _.entityType = t1; + _.store = t2; + _.entity = t3; + _.completer = t4; _.context = t5; _.localization = t6; _.subIndex = t7; @@ -266634,7 +266634,7 @@ var t1 = type$.JSArray_legacy_EntityType; switch (this) { case C.EntityType_client: - return H.setRuntimeTypeInfo([C.EntityType_invoice, C.EntityType_payment, C.EntityType_quote, C.EntityType_credit, C.EntityType_project, C.EntityType_task, C.EntityType_expense, C.EntityType_recurringInvoice, C.EntityType_recurringExpense], t1); + return H.setRuntimeTypeInfo([C.EntityType_invoice, C.EntityType_task, C.EntityType_expense, C.EntityType_payment, C.EntityType_quote, C.EntityType_credit, C.EntityType_project, C.EntityType_recurringInvoice, C.EntityType_recurringExpense], t1); case C.EntityType_invoice: return H.setRuntimeTypeInfo([C.EntityType_payment], t1); case C.EntityType_recurringInvoice: @@ -299756,6 +299756,9 @@ t2 = t1.uiState; if (J.get$isNotEmpty$asx(t2.previewStack._list)) J.$index$asx(_this.store.get$_dispatchers(), 0).call$1(new M.ClearPreviewStack()); + t3 = t1.prefState; + if (t3.appLayout === C.AppLayout_desktop && !t3.isEditorFullScreen$1(_this.entityType)) + J.$index$asx(_this.store.get$_dispatchers(), 0).call$1(new M.ToggleEditorLayout(_this.entityType)); t3 = t2.filterStack._list; t4 = J.getInterceptor$asx(t3); if (t4.get$isEmpty(t3)) @@ -300007,7 +300010,11 @@ }; M.editEntity_closure.prototype = { call$0: function() { - var invoice, t1, t2, t3, client, t4, t5, _this = this, _null = null; + var invoice, t3, client, t4, t5, _this = this, _null = null, + t1 = _this.state, + t2 = t1.prefState; + if (t2.appLayout === C.AppLayout_desktop && !t2.isEditorFullScreen$1(_this.entityType)) + J.$index$asx(_this.store.get$_dispatchers(), 0).call$1(new M.ToggleEditorLayout(_this.entityType)); switch (_this.entityType) { case C.EntityType_client: J.$index$asx(_this.store.get$_dispatchers(), 0).call$1(new E.EditClient(_this.entity, _this.completer, _null)); @@ -300026,7 +300033,6 @@ break; case C.EntityType_invoice: invoice = type$.legacy_InvoiceEntity._as(_this.entity); - t1 = _this.state; t2 = t1.userCompanyStates; t1 = t1.uiState.selectedCompanyIndex; t2 = t2._list; @@ -363213,12 +363219,19 @@ t6 = t2.uiState.selectedCompanyIndex; t8.push(new O.EntitiesListTile(client, C.EntityType_invoice, t3, t4.call$2(t7, J.$index$asx(t5._list, t6).invoiceState.map).present$2(t1.get$active(t1), t1.get$archived()), _this.isFilter, false, _null)); } - if (company.isModuleEnabled$1(C.EntityType_recurringInvoice)) { - t3 = t1.get$recurringInvoices(); - t4 = $.$get$memoizedRecurringInvoiceStatsForClient(); + if (company.isModuleEnabled$1(C.EntityType_task)) { + t3 = t1.get$tasks(); + t4 = $.$get$memoizedTaskStatsForClient(); t5 = t2.userCompanyStates; t6 = t2.uiState.selectedCompanyIndex; - t8.push(new O.EntitiesListTile(client, C.EntityType_recurringInvoice, t3, t4.call$2(t7, J.$index$asx(t5._list, t6).recurringInvoiceState.map).present$2(t1.get$active(t1), t1.get$archived()), _this.isFilter, false, _null)); + t8.push(new O.EntitiesListTile(client, C.EntityType_task, t3, t4.call$2(t7, J.$index$asx(t5._list, t6).taskState.map).present$2(t1.get$active(t1), t1.get$archived()), _this.isFilter, false, _null)); + } + if (company.isModuleEnabled$1(C.EntityType_expense)) { + t3 = t1.get$expenses(); + t4 = $.$get$memoizedExpenseStatsForClient(); + t5 = t2.userCompanyStates; + t6 = t2.uiState.selectedCompanyIndex; + t8.push(new O.EntitiesListTile(client, C.EntityType_expense, t3, t4.call$2(t7, J.$index$asx(t5._list, t6).expenseState.map).present$2(t1.get$active(t1), t1.get$archived()), _this.isFilter, false, _null)); } if (company.isModuleEnabled$1(C.EntityType_payment)) { t3 = t1.get$payments(); @@ -363250,19 +363263,12 @@ t6 = t2.uiState.selectedCompanyIndex; t8.push(new O.EntitiesListTile(client, C.EntityType_project, t3, t4.call$2(t7, J.$index$asx(t5._list, t6).projectState.map).present$2(t1.get$active(t1), t1.get$archived()), _this.isFilter, false, _null)); } - if (company.isModuleEnabled$1(C.EntityType_task)) { - t3 = t1.get$tasks(); - t4 = $.$get$memoizedTaskStatsForClient(); + if (company.isModuleEnabled$1(C.EntityType_recurringInvoice)) { + t3 = t1.get$recurringInvoices(); + t4 = $.$get$memoizedRecurringInvoiceStatsForClient(); t5 = t2.userCompanyStates; t6 = t2.uiState.selectedCompanyIndex; - t8.push(new O.EntitiesListTile(client, C.EntityType_task, t3, t4.call$2(t7, J.$index$asx(t5._list, t6).taskState.map).present$2(t1.get$active(t1), t1.get$archived()), _this.isFilter, false, _null)); - } - if (company.isModuleEnabled$1(C.EntityType_expense)) { - t3 = t1.get$expenses(); - t4 = $.$get$memoizedExpenseStatsForClient(); - t5 = t2.userCompanyStates; - t6 = t2.uiState.selectedCompanyIndex; - t8.push(new O.EntitiesListTile(client, C.EntityType_expense, t3, t4.call$2(t7, J.$index$asx(t5._list, t6).expenseState.map).present$2(t1.get$active(t1), t1.get$archived()), _this.isFilter, false, _null)); + t8.push(new O.EntitiesListTile(client, C.EntityType_recurringInvoice, t3, t4.call$2(t7, J.$index$asx(t5._list, t6).recurringInvoiceState.map).present$2(t1.get$active(t1), t1.get$archived()), _this.isFilter, false, _null)); } if (company.isModuleEnabled$1(C.EntityType_recurringExpense)) { t3 = t1.get$recurringExpenses();