From 0a6550b0fee5248820ca088d2da6792c0381c82f Mon Sep 17 00:00:00 2001 From: hillelcoren Date: Mon, 6 Dec 2021 07:02:58 +0000 Subject: [PATCH] Admin Portal - Profile --- public/main.profile.dart.js | 81 +++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 34 deletions(-) diff --git a/public/main.profile.dart.js b/public/main.profile.dart.js index d6aad4b118d3..b4aac3fc9e0a 100644 --- a/public/main.profile.dart.js +++ b/public/main.profile.dart.js @@ -319067,19 +319067,32 @@ client = this.clientMap._map$_map.$index(0, t1); if (client == null) client = A.ClientEntity_ClientEntity(null, t1, null, null); - if (!(expense.get$isArchived() || expense.isDeleted || client.get$isArchived() || client.isDeleted)) + if (!(client.get$isArchived() || client.isDeleted)) + if (!(expense.get$isArchived() || expense.isDeleted)) { + t1 = expense.invoiceId; + t1 = t1 != null && t1.length !== 0; + } else + t1 = true; + else + t1 = true; + if (!t1) this.expenses.push(expense); }, $signature: 91 }; A._recentExpenses_closure0.prototype = { call$2(expenseA, expenseB) { - var t2, - t1 = expenseA.date; - if (t1 == null) - t1 = ""; - t2 = expenseB.date; - return B.JSString_methods.compareTo$1(t1, t2 == null ? "" : t2); + var expenseBdate, + expenseAdate = expenseA.date; + if (expenseAdate == null) + expenseAdate = ""; + expenseBdate = expenseB.date; + if (expenseBdate == null) + expenseBdate = ""; + if (expenseAdate === expenseBdate) + return B.JSString_methods.compareTo$1(expenseB.number, expenseA.number); + else + return B.JSString_methods.compareTo$1(expenseBdate, expenseAdate); }, $signature: 585 }; @@ -383096,7 +383109,7 @@ A._InvoiceEditItemsDesktopState_build_closure31.prototype = { call$1(value) { var t1 = this.index; - return this.$this._invoice_edit_items_desktop$_onChanged$2(J.$index$asx(this.lineItems._copy_on_write_list$_list, t1).rebuild$1(new A._InvoiceEditItemsDesktopState_build__closure2(value)), t1); + return this.$this._invoice_edit_items_desktop$_onChanged$3$debounce(J.$index$asx(this.lineItems._copy_on_write_list$_list, t1).rebuild$1(new A._InvoiceEditItemsDesktopState_build__closure2(value)), t1, false); }, $signature: 57 }; @@ -383117,7 +383130,7 @@ A._InvoiceEditItemsDesktopState_build_closure33.prototype = { call$1(value) { var t1 = this.index; - return this.$this._invoice_edit_items_desktop$_onChanged$2(J.$index$asx(this.lineItems._copy_on_write_list$_list, t1).rebuild$1(new A._InvoiceEditItemsDesktopState_build__closure1(value)), t1); + return this.$this._invoice_edit_items_desktop$_onChanged$3$debounce(J.$index$asx(this.lineItems._copy_on_write_list$_list, t1).rebuild$1(new A._InvoiceEditItemsDesktopState_build__closure1(value)), t1, false); }, $signature: 57 }; @@ -385907,7 +385920,7 @@ if (currency != null) { t2 = state.uiState.selectedCompanyIndex; client = state.userCompanyStates._list[t2].clientState.$get$1(0, payment.clientId); - t2 = t1.exchangeRate = A.getExchangeRate(state.staticState.currencyMap, currency.get$id(currency), client.settings.currencyId); + t2 = t1.exchangeRate = A.getExchangeRate(state.staticState.currencyMap, client.settings.currencyId, currency.get$id(currency)); } t3 = _this._exchangeRateController; t4 = _this.get$_payment_edit$_onChanged(); @@ -387782,7 +387795,7 @@ }; A._PaymentViewState_build_closure.prototype = { call$1(context) { - var t6, t7, t8, t9, t10, t11, t12, t13, t14, _i, paymentable, t15, t16, t17, _this = this, _null = null, + var t6, t7, t8, t9, t10, t11, t12, t13, t14, _i, paymentable, t15, t16, t17, t18, _this = this, _null = null, t1 = _this.payment, t2 = _this.state, t3 = t1.statusId, @@ -387799,33 +387812,33 @@ t13 = _this.$this; t14 = type$.JSArray_legacy_Widget; t9 = A._setArrayType([A.EntityHeader$(t1, t6, t5.get$applied(), A.formatNumber(t12, context, t10, _null, B.FormatNumberType_0, true, _null, false), t4, t3, t11), new A.ListDivider(_null), A.EntityListTile$(t9, t13._widget.isFilter, _null)], t14); - for (t3 = t1.get$invoicePaymentables(), t4 = t3.length, t6 = t2.userCompanyStates, t2 = t2.uiState, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { + for (t3 = t1.get$invoicePaymentables(), t4 = t3.length, t6 = t2.userCompanyStates, t2 = t2.uiState, t10 = t1.clientId, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { paymentable = t3[_i]; - t10 = t13._widget.isFilter; - t11 = t2.selectedCompanyIndex; - t11 = t6._list[t11].invoiceState.map; - t15 = paymentable.invoiceId; - t15 = t11._map$_map.$index(0, t15); - t11 = J.$add$ansx(A.formatNumber(paymentable.amount, context, _null, _null, B.FormatNumberType_0, true, _null, false), " \u2022 "); - t16 = paymentable.createdAt; - t16 = (t16 == null ? 0 : t16) * 1000; - t17 = new A.DateTime(t16, false); - t17.DateTime$_withValue$2$isUtc(t16, false); - t9.push(new A.EntityListTile(t11 + A.formatDate(t17.toIso8601String$0(), context, true, true, false), t15, t10, _null)); + t11 = t13._widget.isFilter; + t15 = t2.selectedCompanyIndex; + t15 = t6._list[t15].invoiceState.map; + t16 = paymentable.invoiceId; + t16 = t15._map$_map.$index(0, t16); + t15 = J.$add$ansx(A.formatNumber(paymentable.amount, context, t10, _null, B.FormatNumberType_0, true, _null, false), " \u2022 "); + t17 = paymentable.createdAt; + t17 = (t17 == null ? 0 : t17) * 1000; + t18 = new A.DateTime(t17, false); + t18.DateTime$_withValue$2$isUtc(t17, false); + t9.push(new A.EntityListTile(t15 + A.formatDate(t18.toIso8601String$0(), context, true, true, false), t16, t11, _null)); } for (t3 = t1.get$creditPaymentables(), t4 = t3.length, _i = 0; _i < t3.length; t3.length === t4 || (0, A.throwConcurrentModificationError)(t3), ++_i) { paymentable = t3[_i]; - t10 = t13._widget.isFilter; - t11 = t2.selectedCompanyIndex; - t11 = t6._list[t11].creditState.map; - t15 = paymentable.creditId; - t15 = t11._map$_map.$index(0, t15); - t11 = J.$add$ansx(A.formatNumber(paymentable.amount, context, _null, _null, B.FormatNumberType_0, true, _null, false), " \u2022 "); - t16 = paymentable.createdAt; - t16 = (t16 == null ? 0 : t16) * 1000; - t17 = new A.DateTime(t16, false); - t17.DateTime$_withValue$2$isUtc(t16, false); - t9.push(new A.EntityListTile(t11 + A.formatDate(t17.toIso8601String$0(), context, true, true, false), t15, t10, _null)); + t11 = t13._widget.isFilter; + t15 = t2.selectedCompanyIndex; + t15 = t6._list[t15].creditState.map; + t16 = paymentable.creditId; + t16 = t15._map$_map.$index(0, t16); + t15 = J.$add$ansx(A.formatNumber(paymentable.amount, context, t10, _null, B.FormatNumberType_0, true, _null, false), " \u2022 "); + t17 = paymentable.createdAt; + t17 = (t17 == null ? 0 : t17) * 1000; + t18 = new A.DateTime(t17, false); + t18.DateTime$_withValue$2$isUtc(t17, false); + t9.push(new A.EntityListTile(t15 + A.formatDate(t18.toIso8601String$0(), context, true, true, false), t16, t11, _null)); } if (t1.companyGatewayId.length !== 0) { t2 = A.Text$(t5.get$gateway() + " \u203a " + _this.companyGateway.label, _null, _null, _null, _null, _null, _null, _null, _null, _null);