Admin Portal - Profile

This commit is contained in:
hillelcoren 2022-10-06 09:23:34 +00:00
parent 23c41222c9
commit 511634bc87

View File

@ -95122,13 +95122,13 @@
_.currentQuoteData = t6; _.currentQuoteData = t6;
_.currentTaskData = t7; _.currentTaskData = t7;
_.currentExpenseData = t8; _.currentExpenseData = t8;
_.userCompanySettings = t9; _.previousInvoiceData = t9;
_.previousInvoiceData = t10; _.previousPaymentData = t10;
_.sidebarTabs = t11; _.previousQuoteData = t11;
_.previousPaymentData = t12; _.previousTaskData = t12;
_.previousQuoteData = t13; _.previousExpenseData = t13;
_.previousTaskData = t14; _.userCompanySettings = t14;
_.previousExpenseData = t15; _.sidebarTabs = t15;
_.runningTasks = t16; _.runningTasks = t16;
}, },
DashboardPanels_build__closure: function DashboardPanels_build__closure(t0) { DashboardPanels_build__closure: function DashboardPanels_build__closure(t0) {
@ -95140,12 +95140,13 @@
DashboardPanels_build__closure1: function DashboardPanels_build__closure1(t0) { DashboardPanels_build__closure1: function DashboardPanels_build__closure1(t0) {
this.context = t0; this.context = t0;
}, },
DashboardPanels_build__closure2: function DashboardPanels_build__closure2(t0, t1, t2, t3) { DashboardPanels_build__closure2: function DashboardPanels_build__closure2(t0, t1, t2, t3, t4) {
var _ = this; var _ = this;
_.fieldMap = t0; _.currentFieldMap = t0;
_.localization = t1; _.previousFieldMap = t1;
_.textTheme = t2; _.localization = t2;
_.context = t3; _.textTheme = t3;
_.context = t4;
}, },
DashboardPanels_build__closure4: function DashboardPanels_build__closure4(t0, t1) { DashboardPanels_build__closure4: function DashboardPanels_build__closure4(t0, t1) {
this.$this = t0; this.$this = t0;
@ -434241,7 +434242,6 @@
didChangeDependencies$0() { didChangeDependencies$0() {
var t1, _this = this; var t1, _this = this;
_this.super$State$didChangeDependencies(); _this.super$State$didChangeDependencies();
A.print("## LOADING SETTINGS");
t1 = _this._dashboard_date_range_picker$_settings = A.DashboardSettings_fromState(_this._widget.state); t1 = _this._dashboard_date_range_picker$_settings = A.DashboardSettings_fromState(_this._widget.state);
if (t1.dateRange !== B.DateRange_custom) { if (t1.dateRange !== B.DateRange_custom) {
t1.startDate = ""; t1.startDate = "";
@ -434547,7 +434547,7 @@
t1.push(B.EntityType_task); t1.push(B.EntityType_task);
if (company.isModuleEnabled$1(B.EntityType_expense)) if (company.isModuleEnabled$1(B.EntityType_expense))
t1.push(B.EntityType_expense); t1.push(B.EntityType_expense);
t1 = A._setArrayType([new A.Padding(B.EdgeInsets_0_50_0_0, new A.ScrollableListViewBuilder(new A.DashboardPanels_build_closure4(_this, t2, state, t4, currentInvoiceData, currentPaymentData, currentQuoteData, currentTaskData, currentExpenseData, userCompanySettings, previousInvoiceData, t1, previousPaymentData, previousQuoteData, previousTaskData, previousExpenseData, runningTasks), _null, t2.length + 1, _this.scrollController, _null, _null), _null), _this._header$1(context)], type$.JSArray_legacy_Widget); t1 = A._setArrayType([new A.Padding(B.EdgeInsets_0_50_0_0, new A.ScrollableListViewBuilder(new A.DashboardPanels_build_closure4(_this, t2, state, t4, currentInvoiceData, currentPaymentData, currentQuoteData, currentTaskData, currentExpenseData, previousInvoiceData, previousPaymentData, previousQuoteData, previousTaskData, previousExpenseData, userCompanySettings, t1, runningTasks), _null, t2.length + 1, _this.scrollController, _null, _null), _null), _this._header$1(context)], type$.JSArray_legacy_Widget);
if (state.isLoading || state.isSaving) if (state.isLoading || state.isSaving)
t1.push(A.LinearProgressIndicator$()); t1.push(A.LinearProgressIndicator$());
return new A.Stack(B.AlignmentDirectional_m1_m1, _null, B.StackFit_0, B.Clip_1, t1, _null); return new A.Stack(B.AlignmentDirectional_m1_m1, _null, B.StackFit_0, B.Clip_1, t1, _null);
@ -434795,9 +434795,23 @@
}; };
A.DashboardPanels_build_closure4.prototype = { A.DashboardPanels_build_closure4.prototype = {
call$2(context, index) { call$2(context, index) {
var t2, t3, t4, t5, t6, settings, state, isLoaded, invoiceData, paymentData, expenseData, textTheme, t7, t8, t9, t10, t11, t12, t13, fieldMap, _this = this, _null = null, _86400000000 = 864e8, var t2, t3, t4, t5, t6, settings, state, isLoaded, invoiceData, paymentData, expenseData, textTheme, t7, t8, t9, t10, t11, t12, t13, t14, t15, currentFieldMap, previousFieldMap, _this = this, _null = null, _86400000000 = 864e8,
_s24_ = "add_gateway_help_message", _s24_ = "add_gateway_help_message",
_s11_ = "add_gateway", _s11_ = "add_gateway",
_s21_ = "total_active_invoices",
_s26_ = "total_outstanding_invoices",
_s24_0 = "total_completed_payments",
_s23_ = "total_refunded_payments",
_s19_ = "total_active_quotes",
_s21_0 = "total_approved_quotes",
_s23_0 = "total_unapproved_quotes",
_s18_ = "total_logged_tasks",
_s20_ = "total_invoiced_tasks",
_s16_ = "total_paid_tasks",
_s21_1 = "total_logged_expenses",
_s22_ = "total_pending_expenses",
_s23_1 = "total_invoiced_expenses",
_s27_ = "total_invoice_paid_expenses",
t1 = _this.sections; t1 = _this.sections;
if (index === t1.length) if (index === t1.length)
return new A.SizedBox(_null, 500, _null, _null); return new A.SizedBox(_null, 500, _null, _null);
@ -434871,13 +434885,24 @@
t11 = J.getInterceptor$asx(t10); t11 = J.getInterceptor$asx(t10);
t12 = _this.currentExpenseData; t12 = _this.currentExpenseData;
t13 = J.getInterceptor$asx(t12); t13 = J.getInterceptor$asx(t12);
fieldMap = A.LinkedHashMap_LinkedHashMap$_literal(["total_active_invoices", t6.$index(t4, 0), "total_outstanding_invoices", t6.$index(t4, 1), "total_completed_payments", t7.$index(t5, 0), "total_refunded_payments", t7.$index(t5, 1), "total_active_quotes", t9.$index(t8, 0), "total_approved_quotes", t9.$index(t8, 1), "total_unapproved_quotes", t9.$index(t8, 2), "total_logged_tasks", t11.$index(t10, 0), "total_invoiced_tasks", t11.$index(t10, 1), "total_paid_tasks", t11.$index(t10, 2), "total_logged_expenses", t13.$index(t12, 0), "total_pending_expenses", t13.$index(t12, 1), "total_invoiced_expenses", t13.$index(t12, 2), "total_invoice_paid_expenses", t13.$index(t12, 3)], type$.legacy_String, type$.legacy_ChartDataGroup); t14 = type$.legacy_String;
t15 = type$.legacy_ChartDataGroup;
currentFieldMap = A.LinkedHashMap_LinkedHashMap$_literal([_s21_, t6.$index(t4, 0), _s26_, t6.$index(t4, 1), _s24_0, t7.$index(t5, 0), _s23_, t7.$index(t5, 1), _s19_, t9.$index(t8, 0), _s21_0, t9.$index(t8, 1), _s23_0, t9.$index(t8, 2), _s18_, t11.$index(t10, 0), _s20_, t11.$index(t10, 1), _s16_, t11.$index(t10, 2), _s21_1, t13.$index(t12, 0), _s22_, t13.$index(t12, 1), _s23_1, t13.$index(t12, 2), _s27_, t13.$index(t12, 3)], t14, t15);
t12 = _this.previousInvoiceData;
t13 = J.getInterceptor$asx(t12);
t8 = _this.previousPaymentData;
t9 = J.getInterceptor$asx(t8);
t5 = _this.previousQuoteData;
t7 = J.getInterceptor$asx(t5);
t4 = _this.previousExpenseData;
t6 = J.getInterceptor$asx(t4);
previousFieldMap = A.LinkedHashMap_LinkedHashMap$_literal([_s21_, t13.$index(t12, 0), _s26_, t13.$index(t12, 1), _s24_0, t9.$index(t8, 0), _s23_, t9.$index(t8, 1), _s19_, t7.$index(t5, 0), _s21_0, t7.$index(t5, 1), _s23_0, t7.$index(t5, 2), _s18_, t11.$index(t10, 0), _s20_, J.$index$asx(_this.previousTaskData, 1), _s16_, t11.$index(t10, 2), _s21_1, t6.$index(t4, 0), _s22_, t6.$index(t4, 1), _s23_1, t6.$index(t4, 2), _s27_, t6.$index(t4, 3)], t14, t15);
t4 = _this.userCompanySettings; t4 = _this.userCompanySettings;
t4 = A.getLayout(context) === B.AppLayout_mobile ? t4.dashboardFieldsPerRowMobile : t4.dashboardFieldsPerRowDesktop; t4 = A.getLayout(context) === B.AppLayout_mobile ? t4.dashboardFieldsPerRowMobile : t4.dashboardFieldsPerRowDesktop;
t5 = _this.localization; t5 = _this.localization;
t2 = t3[t2].userCompany.settings.dashboardFields._list; t2 = t3[t2].userCompany.settings.dashboardFields._list;
t3 = A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Widget*>"); t3 = A._arrayInstanceType(t2)._eval$1("MappedListIterable<1,Widget*>");
return A.Column$(A._setArrayType([new A.SizedBox(_null, 20, _null, _null), new A.Padding(B.EdgeInsets_12_0_12_0, new A.StaggeredGrid(new A.StaggeredGridDelegateWithFixedCrossAxisCount(t4), 12, 8, _null, A.List_List$of(new A.MappedListIterable(t2, new A.DashboardPanels_build__closure2(fieldMap, t5, textTheme, context), t3), true, t3._eval$1("ListIterable.E")), _null), _null), new A._OverviewPanel(t1, t5.get$overview(), invoiceData, paymentData, expenseData, isLoaded, _null, _null)], type$.JSArray_legacy_Widget), B.CrossAxisAlignment_2, _null, B.MainAxisAlignment_0, B.MainAxisSize_1, B.VerticalDirection_1); return A.Column$(A._setArrayType([new A.SizedBox(_null, 20, _null, _null), new A.Padding(B.EdgeInsets_12_0_12_0, new A.StaggeredGrid(new A.StaggeredGridDelegateWithFixedCrossAxisCount(t4), 12, 8, _null, A.List_List$of(new A.MappedListIterable(t2, new A.DashboardPanels_build__closure2(currentFieldMap, previousFieldMap, t5, textTheme, context), t3), true, t3._eval$1("ListIterable.E")), _null), _null), new A._OverviewPanel(t1, t5.get$overview(), invoiceData, paymentData, expenseData, isLoaded, _null, _null)], type$.JSArray_legacy_Widget), B.CrossAxisAlignment_2, _null, B.MainAxisAlignment_0, B.MainAxisSize_1, B.VerticalDirection_1);
case 3: case 3:
t1 = _this.$this; t1 = _this.$this;
t2 = _this.currentInvoiceData; t2 = _this.currentInvoiceData;
@ -434958,19 +434983,17 @@
}; };
A.DashboardPanels_build__closure2.prototype = { A.DashboardPanels_build__closure2.prototype = {
call$1(dashboardField) { call$1(dashboardField) {
var value, t3, t4, _this = this, _null = null, var value, t2, t3, _this = this, _null = null,
t1 = dashboardField.field, t1 = dashboardField.period;
data = _this.fieldMap.$index(0, t1), if (t1 === "current_period")
t2 = dashboardField.period; value = _this.currentFieldMap.$index(0, dashboardField.field).periodTotal;
if (t2 === "current_period") else if (t1 === "previous_period")
value = data.periodTotal; value = _this.previousFieldMap.$index(0, dashboardField.field).periodTotal;
else if (t2 === "previous_period")
value = data.previousTotal;
else else
value = t2 === "total" ? data.total : 0; value = t1 === "total" ? _this.currentFieldMap.$index(0, dashboardField.field).total : 0;
t3 = _this.localization; t2 = _this.localization;
t4 = _this.textTheme; t3 = _this.textTheme;
return A.FormCard$(_null, A._setArrayType([A.Text$(t3.lookup$1(t1), _null, _null, _null, _null, _null, t4.titleMedium, B.TextAlign_2, _null, _null), new A.SizedBox(_null, 6, _null, _null), A.Text$(A.formatNumber(value, _this.context, _null, _null, B.FormatNumberType_0, true, _null, false), _null, _null, _null, _null, _null, t4.headlineSmall, B.TextAlign_2, _null, _null), new A.SizedBox(_null, 6, _null, _null), A.Text$(t3.lookup$1(t2), _null, _null, _null, _null, _null, t4.bodySmall, B.TextAlign_2, _null, _null)], type$.JSArray_legacy_Widget), _null, _null, false, _null, false, B.EdgeInsets_0_0_0_0); return A.FormCard$(_null, A._setArrayType([A.Text$(t2.lookup$1(dashboardField.field), _null, _null, _null, _null, _null, t3.titleMedium, B.TextAlign_2, _null, _null), new A.SizedBox(_null, 6, _null, _null), A.Text$(A.formatNumber(value, _this.context, _null, _null, B.FormatNumberType_0, true, _null, false), _null, _null, _null, _null, _null, t3.headlineSmall, B.TextAlign_2, _null, _null), new A.SizedBox(_null, 6, _null, _null), A.Text$(t2.lookup$1(t1), _null, _null, _null, _null, _null, t3.bodySmall, B.TextAlign_2, _null, _null)], type$.JSArray_legacy_Widget), _null, _null, false, _null, false, B.EdgeInsets_0_0_0_0);
}, },
$signature: 2465 $signature: 2465
}; };