mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Admin Portal - Profile
This commit is contained in:
parent
376f7fb727
commit
23300a4e87
203
public/main.profile.dart.js
vendored
203
public/main.profile.dart.js
vendored
@ -85477,12 +85477,13 @@
|
||||
this.$this = t0;
|
||||
this.x = t1;
|
||||
},
|
||||
PortalLinks: function PortalLinks(t0, t1, t2, t3) {
|
||||
PortalLinks: function PortalLinks(t0, t1, t2, t3, t4) {
|
||||
var _ = this;
|
||||
_.viewLink = t0;
|
||||
_.copyLink = t1;
|
||||
_.client = t2;
|
||||
_.key = t3;
|
||||
_.useIcons = t3;
|
||||
_.key = t4;
|
||||
},
|
||||
PortalLinks_build_closure: function PortalLinks_build_closure(t0) {
|
||||
this._box_0 = t0;
|
||||
@ -87373,7 +87374,7 @@
|
||||
_._debugLifecycleState = t2;
|
||||
_._framework$_element = null;
|
||||
},
|
||||
_ClientViewFullwidthState_build_closure: function _ClientViewFullwidthState_build_closure(t0, t1, t2, t3, t4, t5, t6, t7) {
|
||||
_ClientViewFullwidthState_build_closure: function _ClientViewFullwidthState_build_closure(t0, t1, t2, t3, t4, t5, t6, t7, t8) {
|
||||
var _ = this;
|
||||
_.$this = t0;
|
||||
_.localization = t1;
|
||||
@ -87381,8 +87382,9 @@
|
||||
_.state = t3;
|
||||
_.billingAddress = t4;
|
||||
_.shippingAddress = t5;
|
||||
_.documents = t6;
|
||||
_.viewModel = t7;
|
||||
_.showStanding = t6;
|
||||
_.documents = t7;
|
||||
_.viewModel = t8;
|
||||
},
|
||||
_ClientViewFullwidthState_build__closure: function _ClientViewFullwidthState_build__closure(t0) {
|
||||
this.billingAddress = t0;
|
||||
@ -109245,15 +109247,16 @@
|
||||
_._debugLifecycleState = t2;
|
||||
_._framework$_element = null;
|
||||
},
|
||||
_VendorViewFullwidthState_build_closure: function _VendorViewFullwidthState_build_closure(t0, t1, t2, t3, t4, t5, t6) {
|
||||
_VendorViewFullwidthState_build_closure: function _VendorViewFullwidthState_build_closure(t0, t1, t2, t3, t4, t5, t6, t7) {
|
||||
var _ = this;
|
||||
_.$this = t0;
|
||||
_.localization = t1;
|
||||
_.vendor = t2;
|
||||
_.state = t3;
|
||||
_.billingAddress = t4;
|
||||
_.documents = t5;
|
||||
_.viewModel = t6;
|
||||
_.showStanding = t5;
|
||||
_.documents = t6;
|
||||
_.viewModel = t7;
|
||||
},
|
||||
_VendorViewFullwidthState_build__closure: function _VendorViewFullwidthState_build__closure(t0) {
|
||||
this.billingAddress = t0;
|
||||
@ -333188,14 +333191,14 @@
|
||||
});
|
||||
return A._asyncStartSync($async$bulkAction$3, $async$completer);
|
||||
},
|
||||
saveData$2(credentials, product) {
|
||||
return this.saveData$body$ProductRepository(credentials, product);
|
||||
saveData$3$changedStock(credentials, product, changedStock) {
|
||||
return this.saveData$body$ProductRepository(credentials, product, changedStock);
|
||||
},
|
||||
saveData$body$ProductRepository(credentials, product) {
|
||||
saveData$body$ProductRepository(credentials, product, changedStock) {
|
||||
var $async$goto = 0,
|
||||
$async$completer = A._makeAsyncAwaitCompleter(type$.legacy_ProductEntity),
|
||||
$async$returnValue, t1, data, t2, t3, response;
|
||||
var $async$saveData$2 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
|
||||
$async$returnValue, t1, data, t2, response, url;
|
||||
var $async$saveData$3$changedStock = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
|
||||
if ($async$errorCode === 1)
|
||||
return A._asyncRethrow($async$result, $async$completer);
|
||||
while (true)
|
||||
@ -333206,27 +333209,30 @@
|
||||
t1 = $.$get$serializers();
|
||||
data = t1.serializeWith$2($.$get$_$productEntitySerializer(), product);
|
||||
t2 = credentials.url;
|
||||
t3 = credentials.token;
|
||||
$async$goto = product.get$isNew() ? 3 : 5;
|
||||
break;
|
||||
case 3:
|
||||
// then
|
||||
$async$goto = 6;
|
||||
return A._asyncAwait(B.C_WebClient.post$3$data(t2 + "/products", t3, B.C_JsonCodec.encode$1(data)), $async$saveData$2);
|
||||
return A._asyncAwait(B.C_WebClient.post$3$data(t2 + "/products", credentials.token, B.C_JsonCodec.encode$1(data)), $async$saveData$3$changedStock);
|
||||
case 6:
|
||||
// returning from await.
|
||||
response = $async$result;
|
||||
// goto join
|
||||
$async$goto = 4;
|
||||
break;
|
||||
case 5:
|
||||
// else
|
||||
url = t2 + ("/products/" + product.id);
|
||||
if (changedStock)
|
||||
url += "?update_in_stock_quantity=true";
|
||||
$async$goto = 7;
|
||||
return A._asyncAwait(B.C_WebClient.put$3$data(0, t2 + ("/products/" + product.id), t3, B.C_JsonCodec.encode$1(data)), $async$saveData$2);
|
||||
return A._asyncAwait(B.C_WebClient.put$3$data(0, url, credentials.token, B.C_JsonCodec.encode$1(data)), $async$saveData$3$changedStock);
|
||||
case 7:
|
||||
// returning from await.
|
||||
response = $async$result;
|
||||
case 4:
|
||||
// join
|
||||
response = $async$result;
|
||||
$async$returnValue = t1.deserializeWith$1$2($.$get$_$productItemResponseSerializer(), response, type$.legacy_ProductItemResponse).data;
|
||||
// goto return
|
||||
$async$goto = 1;
|
||||
@ -333236,7 +333242,7 @@
|
||||
return A._asyncReturn($async$returnValue, $async$completer);
|
||||
}
|
||||
});
|
||||
return A._asyncStartSync($async$saveData$2, $async$completer);
|
||||
return A._asyncStartSync($async$saveData$3$changedStock, $async$completer);
|
||||
},
|
||||
uploadDocument$3(credentials, entity, multipartFile) {
|
||||
return this.uploadDocument$body$ProductRepository(credentials, entity, multipartFile);
|
||||
@ -360690,8 +360696,16 @@
|
||||
};
|
||||
A._saveProduct_closure.prototype = {
|
||||
call$3(store, dynamicAction, next) {
|
||||
var product, t1, t2, origProduct;
|
||||
type$.legacy_SaveProductRequest._as(dynamicAction);
|
||||
this.repository.saveData$2(J.get$credentials$z(A._lateReadCheck(store.__Store__state, "_state")), dynamicAction.product).then$1$1(0, new A._saveProduct__closure(dynamicAction, store), type$.Null).catchError$1(new A._saveProduct__closure0(store, dynamicAction));
|
||||
product = dynamicAction.product;
|
||||
t1 = A._lateReadCheck(store.__Store__state, "_state");
|
||||
t2 = t1.userCompanyStates;
|
||||
t1 = t1.uiState.selectedCompanyIndex;
|
||||
origProduct = t2._list[t1].productState.$get$1(0, product.id);
|
||||
t1 = product.stockQuantity;
|
||||
t2 = origProduct.stockQuantity;
|
||||
this.repository.saveData$3$changedStock(J.get$credentials$z(A._lateReadCheck(store.__Store__state, "_state")), product, t1 !== t2).then$1$1(0, new A._saveProduct__closure(dynamicAction, store), type$.Null).catchError$1(new A._saveProduct__closure0(store, dynamicAction));
|
||||
next.call$1(dynamicAction);
|
||||
},
|
||||
"call*": "call$3",
|
||||
@ -395325,17 +395339,25 @@
|
||||
};
|
||||
A.PortalLinks.prototype = {
|
||||
build$1(_, context) {
|
||||
var copyLinkWithHash, _null = null, t1 = {},
|
||||
var copyLinkWithHash, viewLinkPressed, copyLinkPressed, _this = this, _null = null, t1 = {},
|
||||
prefState = A._lateReadCheck(A.StoreProvider_of(context, type$.legacy_AppState).__Store__state, "_state").prefState,
|
||||
t2 = A.Localizations_of(context, B.Type_AppLocalization_KyD, type$.legacy_AppLocalization),
|
||||
viewLinkWithHash = t1.viewLinkWithHash = this.viewLink,
|
||||
viewLinkWithHash = t1.viewLinkWithHash = _this.viewLink,
|
||||
t3 = !B.JSString_methods.contains$1(viewLinkWithHash, "?") ? t1.viewLinkWithHash = viewLinkWithHash + "?" : viewLinkWithHash,
|
||||
t4 = "&client_hash=" + this.client.clientHash;
|
||||
t4 = "&client_hash=" + _this.client.clientHash;
|
||||
t1.viewLinkWithHash = t3 + t4;
|
||||
copyLinkWithHash = t1.copyLinkWithHash = this.copyLink;
|
||||
copyLinkWithHash = t1.copyLinkWithHash = _this.copyLink;
|
||||
t1.copyLinkWithHash = (!B.JSString_methods.contains$1(copyLinkWithHash, "?") ? t1.copyLinkWithHash = copyLinkWithHash + "?" : copyLinkWithHash) + t4;
|
||||
t2.toString;
|
||||
t3 = J.$index$asx($.$get$LocalizationsProvider__localizedValues().$index(0, t2.localeCode), "view_portal");
|
||||
return A.Row$(A._setArrayType([A.Expanded$(A.OutlinedButton$(A.Text$(t3 == null ? "" : t3, _null, 2, B.TextOverflow_2, _null, _null, _null, B.TextAlign_2, _null, _null), _null, new A.PortalLinks_build_closure(t1), _null), 1), new A.SizedBox(8, _null, _null, _null), A.Expanded$(A.OutlinedButton$(A.Text$(t2.get$copyLink(), _null, 2, B.TextOverflow_2, _null, _null, _null, B.TextAlign_2, _null, _null), _null, new A.PortalLinks_build_closure0(t1, t2), _null), 1)], type$.JSArray_legacy_Widget), B.CrossAxisAlignment_2, B.MainAxisAlignment_0, B.MainAxisSize_1, _null);
|
||||
viewLinkPressed = new A.PortalLinks_build_closure(t1);
|
||||
copyLinkPressed = new A.PortalLinks_build_closure0(t1, t2);
|
||||
if (_this.useIcons) {
|
||||
t1 = A.Icon$(B.IconData_58460_MaterialIcons_null_true, _null, _null);
|
||||
t3 = prefState.enableTooltips;
|
||||
t1 = A.IconButton$(B.Alignment_0_0, _null, _null, true, t1, _null, viewLinkPressed, B.EdgeInsets_8_8_8_8, _null, t3 ? t2.get$viewPortal() : "", _null);
|
||||
t4 = A.Icon$(B.IconData_57744_MaterialIcons_null_false, _null, _null);
|
||||
return A.Row$(A._setArrayType([t1, A.IconButton$(B.Alignment_0_0, _null, _null, true, t4, _null, copyLinkPressed, B.EdgeInsets_8_8_8_8, _null, t3 ? t2.get$copyLink() : "", _null)], type$.JSArray_legacy_Widget), B.CrossAxisAlignment_2, B.MainAxisAlignment_5, B.MainAxisSize_1, _null);
|
||||
}
|
||||
return A.Row$(A._setArrayType([A.Expanded$(A.OutlinedButton$(A.Text$(t2.get$viewPortal(), _null, 2, B.TextOverflow_2, _null, _null, _null, B.TextAlign_2, _null, _null), _null, viewLinkPressed, _null), 1), new A.SizedBox(8, _null, _null, _null), A.Expanded$(A.OutlinedButton$(A.Text$(t2.get$copyLink(), _null, 2, B.TextOverflow_2, _null, _null, _null, B.TextAlign_2, _null, _null), _null, copyLinkPressed, _null), 1)], type$.JSArray_legacy_Widget), B.CrossAxisAlignment_2, B.MainAxisAlignment_0, B.MainAxisSize_1, _null);
|
||||
}
|
||||
};
|
||||
A.PortalLinks_build_closure.prototype = {
|
||||
@ -400815,7 +400837,7 @@
|
||||
t4 = contact.email,
|
||||
t5 = _this.$this,
|
||||
t6 = _this.context;
|
||||
t1.push(A.AppListTile$(new A.PortalLinks(t2 + "?silent=true", t2, _this.client, null), t4, B.IconData_57898_MaterialIcons_null_false, new A._ClientViewDetailsState_build__buildDetailsList__closure1(t5, contact, t6), t4, t3));
|
||||
t1.push(A.AppListTile$(new A.PortalLinks(t2 + "?silent=true", t2, _this.client, false, null), t4, B.IconData_57898_MaterialIcons_null_false, new A._ClientViewDetailsState_build__buildDetailsList__closure1(t5, contact, t6), t4, t3));
|
||||
t2 = contact.phone;
|
||||
if (t2.length !== 0) {
|
||||
t3 = contact.get$fullName().length === 0 ? _this.localization.get$blankContact() : contact.get$fullName();
|
||||
@ -400947,7 +400969,7 @@
|
||||
_this.super$__ClientViewFullwidthState_State_TickerProviderStateMixin$dispose(0);
|
||||
},
|
||||
build$1(_, context) {
|
||||
var client, documents, viewModel,
|
||||
var client, documents, viewModel, billingAddress, shippingAddress,
|
||||
t1 = A.Localizations_of(context, B.Type_AppLocalization_KyD, type$.legacy_AppLocalization),
|
||||
state = A._lateReadCheck(A.StoreProvider_of(context, type$.legacy_AppState).__Store__state, "_state"),
|
||||
t2 = state.userCompanyStates,
|
||||
@ -400964,12 +400986,15 @@
|
||||
client = t4.$get$1(0, t2);
|
||||
documents = client.documents;
|
||||
viewModel = this._widget.viewModel;
|
||||
return new A.LayoutBuilder(new A._ClientViewFullwidthState_build_closure(this, t1, client, state, A.formatAddress(state, "\n", false, client), A.formatAddress(state, "\n", true, client), documents, viewModel), null);
|
||||
billingAddress = A.formatAddress(state, "\n", false, client);
|
||||
shippingAddress = A.formatAddress(state, "\n", true, client);
|
||||
t2 = state.prefState;
|
||||
return new A.LayoutBuilder(new A._ClientViewFullwidthState_build_closure(this, t1, client, state, billingAddress, shippingAddress, !t2.isPreviewVisible && !t3.get$isEditing() && t2.moduleLayout !== B.ModuleLayout_list, documents, viewModel), null);
|
||||
}
|
||||
};
|
||||
A._ClientViewFullwidthState_build_closure.prototype = {
|
||||
call$2(context, layout) {
|
||||
var t8, t9, t10, t11, t12, t13, _this = this, _null = null,
|
||||
var t8, t9, t10, t11, t12, _this = this, _null = null,
|
||||
minHeight = layout.maxHeight - 24 - 43,
|
||||
t1 = _this.$this,
|
||||
t2 = t1._client_view_fullwidth$_scrollController1,
|
||||
@ -400994,17 +401019,16 @@
|
||||
t7 = t6.settings;
|
||||
t8 = t7.currencyId;
|
||||
t9 = _this.state;
|
||||
t10 = t9.uiState;
|
||||
t11 = t10.selectedCompanyIndex;
|
||||
t12 = t9.userCompanyStates._list;
|
||||
t13 = t12[t11].userCompany.company.settings.currencyId;
|
||||
if (t8 !== (t13 == null ? "1" : t13)) {
|
||||
t10 = t9.uiState.selectedCompanyIndex;
|
||||
t11 = t9.userCompanyStates._list;
|
||||
t12 = t11[t10].userCompany.company.settings.currencyId;
|
||||
if (t8 !== (t12 == null ? "1" : t12)) {
|
||||
t8 = t9.staticState.currencyMap._map$_map.$index(0, t8);
|
||||
t8 = t8 == null ? _null : t8.name;
|
||||
t5.push(new A.Padding(B.EdgeInsets_0_0_0_1, A.Text$(t8 == null ? "" : t8, _null, 1, B.TextOverflow_2, _null, _null, _null, _null, _null, _null), _null));
|
||||
}
|
||||
t8 = t7.languageId;
|
||||
if ((t8 == null ? "" : t8).length !== 0 && t8 != t12[t11].userCompany.company.settings.languageId) {
|
||||
if ((t8 == null ? "" : t8).length !== 0 && t8 != t11[t10].userCompany.company.settings.languageId) {
|
||||
t8 = t9.staticState.languageMap._map$_map.$index(0, t8);
|
||||
t8 = t8 == null ? _null : t8.name;
|
||||
t5.push(new A.Padding(B.EdgeInsets_0_0_0_1, A.Text$(t8 == null ? "" : t8, _null, 1, B.TextOverflow_2, _null, _null, _null, _null, _null, _null), _null));
|
||||
@ -401016,8 +401040,12 @@
|
||||
t5 = t1._client_view_fullwidth$_scrollController2;
|
||||
t7 = A._setArrayType([A.Text$(t3.get$address(), _null, _null, _null, _null, _null, A.Theme_of(context).textTheme.titleLarge, _null, _null, _null), new A.SizedBox(_null, 8, _null, _null)], t4);
|
||||
t8 = _this.billingAddress;
|
||||
if (t8.length !== 0)
|
||||
B.JSArray_methods.addAll$1(t7, A._setArrayType([A.Row$(A._setArrayType([A.Expanded$(new A.CopyToClipboard(A.Row$(A._setArrayType([new A.Flexible(1, B.FlexFit_1, A.Text$(t8, _null, _null, _null, _null, _null, _null, _null, _null, _null), _null)], t4), B.CrossAxisAlignment_2, B.MainAxisAlignment_0, B.MainAxisSize_1, _null), t8, false, _null, _null, _null), 1), new A.SizedBox(8, _null, _null, _null), A.IconButton$(B.Alignment_0_0, _null, _null, true, A.Icon$(B.IconData_58312_MaterialIcons_null_false, _null, _null), _null, new A._ClientViewFullwidthState_build__closure(t8), B.EdgeInsets_8_8_8_8, _null, _null, _null)], t4), B.CrossAxisAlignment_2, B.MainAxisAlignment_0, B.MainAxisSize_1, _null), new A.SizedBox(_null, 8, _null, _null)], t4));
|
||||
if (t8.length !== 0) {
|
||||
t10 = A.Expanded$(new A.CopyToClipboard(A.Row$(A._setArrayType([new A.Flexible(1, B.FlexFit_1, A.Text$(t8, _null, _null, _null, _null, _null, _null, _null, _null, _null), _null)], t4), B.CrossAxisAlignment_2, B.MainAxisAlignment_0, B.MainAxisSize_1, _null), t8, false, _null, _null, _null), 1);
|
||||
t11 = A.Icon$(B.IconData_58312_MaterialIcons_null_false, _null, _null);
|
||||
t9 = t9.prefState.enableTooltips ? t3.get$viewMap() : "";
|
||||
B.JSArray_methods.addAll$1(t7, A._setArrayType([A.Row$(A._setArrayType([t10, new A.SizedBox(8, _null, _null, _null), A.IconButton$(B.Alignment_0_0, _null, _null, true, t11, _null, new A._ClientViewFullwidthState_build__closure(t8), B.EdgeInsets_8_8_8_8, _null, t9, _null)], t4), B.CrossAxisAlignment_2, B.MainAxisAlignment_0, B.MainAxisSize_1, _null), new A.SizedBox(_null, 8, _null, _null)], t4));
|
||||
}
|
||||
t8 = _this.shippingAddress;
|
||||
if (t8.length !== 0)
|
||||
B.JSArray_methods.addAll$1(t7, A._setArrayType([A.Row$(A._setArrayType([A.Expanded$(new A.CopyToClipboard(A.Row$(A._setArrayType([new A.Flexible(1, B.FlexFit_1, A.Text$(t8, _null, _null, _null, _null, _null, _null, _null, _null, _null), _null)], t4), B.CrossAxisAlignment_2, B.MainAxisAlignment_0, B.MainAxisSize_1, _null), t8, false, _null, _null, _null), 1), new A.SizedBox(8, _null, _null, _null), A.IconButton$(B.Alignment_0_0, _null, _null, true, A.Icon$(B.IconData_58312_MaterialIcons_null_false, _null, _null), _null, new A._ClientViewFullwidthState_build__closure0(t8), B.EdgeInsets_8_8_8_8, _null, _null, _null)], t4), B.CrossAxisAlignment_2, B.MainAxisAlignment_0, B.MainAxisSize_1, _null), new A.SizedBox(_null, 8, _null, _null)], t4));
|
||||
@ -401025,15 +401053,15 @@
|
||||
if (t8.length !== 0)
|
||||
t7.push(A.Text$(t8, _null, _null, _null, _null, _null, _null, _null, _null, _null));
|
||||
t5 = A.Expanded$(A.FormCard$(A.ListView$(t7, t5, _null, B.Axis_1, false), _null, new A.BoxConstraints(0, 1 / 0, minHeight, 1 / 0), B.CrossAxisAlignment_0, false, _null, true, B.EdgeInsets_6_12_6_12), 1);
|
||||
t7 = t9.prefState.isPreviewVisible;
|
||||
t8 = t7 ? 1 : 2;
|
||||
t7 = _this.showStanding;
|
||||
t8 = !t7 ? 1 : 2;
|
||||
t1 = t1._client_view_fullwidth$_scrollController3;
|
||||
t9 = A._setArrayType([A.Text$(t3.get$contacts(), _null, _null, _null, _null, _null, A.Theme_of(context).textTheme.titleLarge, _null, _null, _null), new A.SizedBox(_null, 8, _null, _null)], t4);
|
||||
t11 = t6.contacts._list;
|
||||
t12 = A._arrayInstanceType(t11)._eval$1("MappedListIterable<1,Column*>");
|
||||
B.JSArray_methods.addAll$1(t9, A.List_List$of(new A.MappedListIterable(t11, new A._ClientViewFullwidthState_build__closure1(context, t6), t12), true, t12._eval$1("ListIterable.E")));
|
||||
t10 = t6.contacts._list;
|
||||
t11 = A._arrayInstanceType(t10)._eval$1("MappedListIterable<1,Column*>");
|
||||
B.JSArray_methods.addAll$1(t9, A.List_List$of(new A.MappedListIterable(t10, new A._ClientViewFullwidthState_build__closure1(context, t6), t11), true, t11._eval$1("ListIterable.E")));
|
||||
t8 = A._setArrayType([t2, t5, A.Expanded$(A.FormCard$(A.ListView$(t9, t1, _null, B.Axis_1, false), _null, new A.BoxConstraints(0, 1 / 0, minHeight, 1 / 0), B.CrossAxisAlignment_0, false, _null, true, new A.EdgeInsets(6, 12, 12 / t8, 12)), 1)], t4);
|
||||
if (!t7 && !t10.get$isEditing()) {
|
||||
if (t7) {
|
||||
t1 = A.Tab$(A.Text$(t3.get$standing(), _null, _null, _null, _null, _null, _null, _null, _null, _null), _null);
|
||||
t2 = _this.documents._list;
|
||||
t1 = A._setArrayType([t1, A.Tab$(_null, t2.length === 0 ? t3.get$documents() : t3.get$documents() + " (" + t2.length + ")"), A.Tab$(_null, t3.get$ledger()), A.Tab$(_null, t3.get$activity()), A.Tab$(_null, t3.get$systemLogs())], t4);
|
||||
@ -401077,7 +401105,7 @@
|
||||
t1.push(new A.Padding(B.EdgeInsets_0_4_0_4, new A.CopyToClipboard(new A.IconText(t2, B.IconData_58530_MaterialIcons_null_false, _null, _null, _null), t2, false, _null, _null, _null), _null));
|
||||
t1.push(new A.SizedBox(_null, 8, _null, _null));
|
||||
t2 = contact.link;
|
||||
t1.push(new A.PortalLinks(t2 + "?silent=true", t2, this.client, _null));
|
||||
t1.push(new A.PortalLinks(t2 + "?silent=true", t2, this.client, true, _null));
|
||||
t1.push(new A.SizedBox(_null, 16, _null, _null));
|
||||
return A.Column$(t1, B.CrossAxisAlignment_0, _null, B.MainAxisAlignment_0, B.MainAxisSize_1, B.VerticalDirection_1);
|
||||
},
|
||||
@ -401279,7 +401307,7 @@
|
||||
t8 = A.EntityHeader$(client, t3, t1.get$balanceDue(), A.formatNumber(client.balance, context, t7, _null, B.FormatNumberType_0, true, _null, false), _null, _null, t8);
|
||||
t3 = contact.link;
|
||||
t9 = type$.JSArray_legacy_Widget;
|
||||
t3 = A._setArrayType([t8, new A.ListDivider(_null), new A.Padding(B.EdgeInsets_20_16_20_16, new A.PortalLinks(t3 + "?silent=true", t3, client, _null), _null), new A.ListDivider(_null)], t9);
|
||||
t3 = A._setArrayType([t8, new A.ListDivider(_null), new A.Padding(B.EdgeInsets_20_16_20_16, new A.PortalLinks(t3 + "?silent=true", t3, client, false, _null), _null), new A.ListDivider(_null)], t9);
|
||||
t8 = client.privateNotes;
|
||||
if (t8.length !== 0)
|
||||
B.JSArray_methods.addAll$1(t3, A._setArrayType([new A.IconMessage(t8, B.IconData_58286_MaterialIcons_null_false, _null, _null, _null), new A.ListDivider(_null)], t9));
|
||||
@ -417335,7 +417363,7 @@
|
||||
t4.push(new A.Padding(B.EdgeInsets_0_0_0_4, A.Text$(t1.get$viewed() + ": " + A.formatDate(t5, context, true, true, true), _null, _null, _null, _null, _null, _null, _null, _null, _null), _null));
|
||||
t4.push(new A.SizedBox(_null, 8, _null, _null));
|
||||
t1 = t2.link;
|
||||
t4.push(new A.PortalLinks(t1 + "?silent=true", t1, client, _null));
|
||||
t4.push(new A.PortalLinks(t1 + "?silent=true", t1, client, false, _null));
|
||||
return A.ListTile$(false, new A.EdgeInsets(16, 16, 16, 16), _null, _null, true, _null, _null, true, _null, icon, _null, _null, false, _null, _null, A.Column$(t4, B.CrossAxisAlignment_0, _null, B.MainAxisAlignment_0, B.MainAxisSize_1, B.VerticalDirection_1), _null, t3, _null, _null);
|
||||
}
|
||||
};
|
||||
@ -417583,7 +417611,7 @@
|
||||
widgets = A._setArrayType([A.EntityHeader$(invoice, t9, t10, t15, color, t7, t14), new A.ListDivider(_null)], t16);
|
||||
t7 = invoice.invitations._list;
|
||||
t9 = t7.length === 0 ? "" : B.JSArray_methods.get$first(t7).link + "?silent=true";
|
||||
B.JSArray_methods.addAll$1(widgets, A._setArrayType([new A.Padding(B.EdgeInsets_20_16_20_16, new A.PortalLinks(t9, t7.length === 0 ? "" : B.JSArray_methods.get$first(t7).link, client, _null), _null), new A.ListDivider(_null)], t16));
|
||||
B.JSArray_methods.addAll$1(widgets, A._setArrayType([new A.Padding(B.EdgeInsets_20_16_20_16, new A.PortalLinks(t9, t7.length === 0 ? "" : B.JSArray_methods.get$first(t7).link, client, false, _null), _null), new A.ListDivider(_null)], t16));
|
||||
t7 = invoice.privateNotes;
|
||||
if (t7.length !== 0)
|
||||
B.JSArray_methods.addAll$1(widgets, A._setArrayType([new A.IconMessage(t7, B.IconData_58286_MaterialIcons_null_false, _null, _null, _null), new A.ListDivider(_null)], t16));
|
||||
@ -448470,7 +448498,7 @@
|
||||
_this.super$__VendorViewFullwidthState_State_TickerProviderStateMixin$dispose(0);
|
||||
},
|
||||
build$1(_, context) {
|
||||
var vendor, documents, viewModel,
|
||||
var vendor, documents, viewModel, billingAddress,
|
||||
t1 = A.Localizations_of(context, B.Type_AppLocalization_KyD, type$.legacy_AppLocalization),
|
||||
state = A._lateReadCheck(A.StoreProvider_of(context, type$.legacy_AppState).__Store__state, "_state"),
|
||||
t2 = state.userCompanyStates,
|
||||
@ -448487,12 +448515,14 @@
|
||||
vendor = t4.$get$1(0, t2);
|
||||
documents = vendor.documents;
|
||||
viewModel = this._widget.viewModel;
|
||||
return new A.LayoutBuilder(new A._VendorViewFullwidthState_build_closure(this, t1, vendor, state, A.formatAddress(state, "\n", false, vendor), documents, viewModel), null);
|
||||
billingAddress = A.formatAddress(state, "\n", false, vendor);
|
||||
t2 = state.prefState;
|
||||
return new A.LayoutBuilder(new A._VendorViewFullwidthState_build_closure(this, t1, vendor, state, billingAddress, !t2.isPreviewVisible && !t3.get$isEditing() && t2.moduleLayout !== B.ModuleLayout_list, documents, viewModel), null);
|
||||
}
|
||||
};
|
||||
A._VendorViewFullwidthState_build_closure.prototype = {
|
||||
call$2(context, layout) {
|
||||
var t8, t9, t10, t11, t12, t13, t14, t15, _this = this, _null = null,
|
||||
var t8, t9, t10, t11, t12, t13, t14, _this = this, _null = null,
|
||||
minHeight = layout.maxHeight - 24 - 43,
|
||||
t1 = _this.$this,
|
||||
t2 = t1._scrollController1,
|
||||
@ -448516,49 +448546,52 @@
|
||||
t5.push(new A.SizedBox(_null, 4, _null, _null));
|
||||
t7 = t6.currencyId;
|
||||
t8 = _this.state;
|
||||
t9 = t8.uiState;
|
||||
t10 = t9.selectedCompanyIndex;
|
||||
t11 = t8.userCompanyStates._list;
|
||||
t12 = t11[t10].userCompany.company.settings.currencyId;
|
||||
if (t7 !== (t12 == null ? "1" : t12)) {
|
||||
t12 = t8.staticState.currencyMap._map$_map.$index(0, t7);
|
||||
t12 = t12 == null ? _null : t12.name;
|
||||
t5.push(new A.Padding(B.EdgeInsets_0_0_0_1, A.Text$(t12 == null ? "" : t12, _null, 1, B.TextOverflow_2, _null, _null, _null, _null, _null, _null), _null));
|
||||
t9 = t8.uiState.selectedCompanyIndex;
|
||||
t10 = t8.userCompanyStates._list;
|
||||
t11 = t10[t9].userCompany.company.settings.currencyId;
|
||||
if (t7 !== (t11 == null ? "1" : t11)) {
|
||||
t11 = t8.staticState.currencyMap._map$_map.$index(0, t7);
|
||||
t11 = t11 == null ? _null : t11.name;
|
||||
t5.push(new A.Padding(B.EdgeInsets_0_0_0_1, A.Text$(t11 == null ? "" : t11, _null, 1, B.TextOverflow_2, _null, _null, _null, _null, _null, _null), _null));
|
||||
}
|
||||
t2 = A.Expanded$(A.FormCard$(A.ListView$(t5, t2, _null, B.Axis_1, false), _null, new A.BoxConstraints(0, 1 / 0, minHeight, 1 / 0), B.CrossAxisAlignment_0, false, _null, true, B.EdgeInsets_12_12_6_12), 1);
|
||||
t5 = t1._scrollController2;
|
||||
t12 = A._setArrayType([A.Text$(t3.get$address(), _null, _null, _null, _null, _null, A.Theme_of(context).textTheme.titleLarge, _null, _null, _null), new A.SizedBox(_null, 8, _null, _null)], t4);
|
||||
t13 = _this.billingAddress;
|
||||
if (t13.length !== 0)
|
||||
B.JSArray_methods.addAll$1(t12, A._setArrayType([A.Row$(A._setArrayType([A.Expanded$(new A.CopyToClipboard(A.Row$(A._setArrayType([new A.Flexible(1, B.FlexFit_1, A.Text$(t13, _null, _null, _null, _null, _null, _null, _null, _null, _null), _null)], t4), B.CrossAxisAlignment_2, B.MainAxisAlignment_0, B.MainAxisSize_1, _null), t13, false, _null, _null, _null), 1), new A.SizedBox(8, _null, _null, _null), A.IconButton$(B.Alignment_0_0, _null, _null, true, A.Icon$(B.IconData_58312_MaterialIcons_null_false, _null, _null), _null, new A._VendorViewFullwidthState_build__closure(t13), B.EdgeInsets_8_8_8_8, _null, _null, _null)], t4), B.CrossAxisAlignment_2, B.MainAxisAlignment_0, B.MainAxisSize_1, _null), new A.SizedBox(_null, 8, _null, _null)], t4));
|
||||
t13 = t6.publicNotes;
|
||||
if (t13.length !== 0)
|
||||
t12.push(A.Text$(t13, _null, _null, _null, _null, _null, _null, _null, _null, _null));
|
||||
t5 = A.Expanded$(A.FormCard$(A.ListView$(t12, t5, _null, B.Axis_1, false), _null, new A.BoxConstraints(0, 1 / 0, minHeight, 1 / 0), B.CrossAxisAlignment_0, false, _null, true, B.EdgeInsets_6_12_6_12), 1);
|
||||
t8 = t8.prefState.isPreviewVisible;
|
||||
t12 = t8 ? 1 : 2;
|
||||
t11 = A._setArrayType([A.Text$(t3.get$address(), _null, _null, _null, _null, _null, A.Theme_of(context).textTheme.titleLarge, _null, _null, _null), new A.SizedBox(_null, 8, _null, _null)], t4);
|
||||
t12 = _this.billingAddress;
|
||||
if (t12.length !== 0) {
|
||||
t13 = A.Expanded$(new A.CopyToClipboard(A.Row$(A._setArrayType([new A.Flexible(1, B.FlexFit_1, A.Text$(t12, _null, _null, _null, _null, _null, _null, _null, _null, _null), _null)], t4), B.CrossAxisAlignment_2, B.MainAxisAlignment_0, B.MainAxisSize_1, _null), t12, false, _null, _null, _null), 1);
|
||||
t14 = A.Icon$(B.IconData_58312_MaterialIcons_null_false, _null, _null);
|
||||
t8 = t8.prefState.enableTooltips ? t3.get$viewMap() : "";
|
||||
B.JSArray_methods.addAll$1(t11, A._setArrayType([A.Row$(A._setArrayType([t13, new A.SizedBox(8, _null, _null, _null), A.IconButton$(B.Alignment_0_0, _null, _null, true, t14, _null, new A._VendorViewFullwidthState_build__closure(t12), B.EdgeInsets_8_8_8_8, _null, t8, _null)], t4), B.CrossAxisAlignment_2, B.MainAxisAlignment_0, B.MainAxisSize_1, _null), new A.SizedBox(_null, 8, _null, _null)], t4));
|
||||
}
|
||||
t8 = t6.publicNotes;
|
||||
if (t8.length !== 0)
|
||||
t11.push(A.Text$(t8, _null, _null, _null, _null, _null, _null, _null, _null, _null));
|
||||
t5 = A.Expanded$(A.FormCard$(A.ListView$(t11, t5, _null, B.Axis_1, false), _null, new A.BoxConstraints(0, 1 / 0, minHeight, 1 / 0), B.CrossAxisAlignment_0, false, _null, true, B.EdgeInsets_6_12_6_12), 1);
|
||||
t8 = _this.showStanding;
|
||||
t11 = !t8 ? 1 : 2;
|
||||
t1 = t1._scrollController3;
|
||||
t13 = A._setArrayType([A.Text$(t3.get$contacts(), _null, _null, _null, _null, _null, A.Theme_of(context).textTheme.titleLarge, _null, _null, _null), new A.SizedBox(_null, 8, _null, _null)], t4);
|
||||
t14 = t6.contacts._list;
|
||||
t15 = A._arrayInstanceType(t14)._eval$1("MappedListIterable<1,Column*>");
|
||||
B.JSArray_methods.addAll$1(t13, A.List_List$of(new A.MappedListIterable(t14, new A._VendorViewFullwidthState_build__closure0(context), t15), true, t15._eval$1("ListIterable.E")));
|
||||
t12 = A._setArrayType([t2, t5, A.Expanded$(A.FormCard$(A.ListView$(t13, t1, _null, B.Axis_1, false), _null, new A.BoxConstraints(0, 1 / 0, minHeight, 1 / 0), B.CrossAxisAlignment_0, false, _null, true, new A.EdgeInsets(6, 12, 12 / t12, 12)), 1)], t4);
|
||||
if (!t8 && !t9.get$isEditing()) {
|
||||
t12 = A._setArrayType([A.Text$(t3.get$contacts(), _null, _null, _null, _null, _null, A.Theme_of(context).textTheme.titleLarge, _null, _null, _null), new A.SizedBox(_null, 8, _null, _null)], t4);
|
||||
t13 = t6.contacts._list;
|
||||
t14 = A._arrayInstanceType(t13)._eval$1("MappedListIterable<1,Column*>");
|
||||
B.JSArray_methods.addAll$1(t12, A.List_List$of(new A.MappedListIterable(t13, new A._VendorViewFullwidthState_build__closure0(context), t14), true, t14._eval$1("ListIterable.E")));
|
||||
t11 = A._setArrayType([t2, t5, A.Expanded$(A.FormCard$(A.ListView$(t12, t1, _null, B.Axis_1, false), _null, new A.BoxConstraints(0, 1 / 0, minHeight, 1 / 0), B.CrossAxisAlignment_0, false, _null, true, new A.EdgeInsets(6, 12, 12 / t11, 12)), 1)], t4);
|
||||
if (t8) {
|
||||
t1 = A.Tab$(A.Text$(t3.get$standing(), _null, _null, _null, _null, _null, _null, _null, _null, _null), _null);
|
||||
t2 = _this.documents._list;
|
||||
t1 = A._setArrayType([t1, A.Tab$(_null, t2.length === 0 ? t3.get$documents() : t3.get$documents() + " (" + t2.length + ")")], t4);
|
||||
t3 = t3.get$total(t3);
|
||||
t2 = $.$get$memoizedCalculateVendorBalance();
|
||||
t10 = t11[t10].expenseState;
|
||||
t10 = t2.call$4(t6.id, t7, t10.map, t10.list);
|
||||
t2 = A._setArrayType([A.EntityHeader$(t6, t3, _null, _null, _null, _null, A.formatNumber(t10, context, _null, t7, B.FormatNumberType_0, true, _null, false))], t4);
|
||||
t9 = t10[t9].expenseState;
|
||||
t9 = t2.call$4(t6.id, t7, t9.map, t9.list);
|
||||
t2 = A._setArrayType([A.EntityHeader$(t6, t3, _null, _null, _null, _null, A.formatNumber(t9, context, _null, t7, B.FormatNumberType_0, true, _null, false))], t4);
|
||||
t3 = t6.privateNotes;
|
||||
if (t3.length !== 0)
|
||||
t2.push(new A.IconText(t3, B.IconData_58286_MaterialIcons_null_false, _null, _null, _null));
|
||||
t3 = _this.viewModel;
|
||||
t12.push(A.Expanded$(A.FormCard$(A.DefaultTabController$(new A.SizedBox(_null, minHeight, A.Column$(A._setArrayType([new A.AppTabBar(t1, _null, true, _null, _null), new A.Flexible(1, B.FlexFit_1, A.TabBarView$(A._setArrayType([A.ListView$(t2, _null, _null, B.Axis_1, false), A.RefreshIndicator$(new A.VendorViewDocuments(t3, new A.ValueKey(t3.vendor.id, type$.ValueKey_legacy_String)), new A._VendorViewFullwidthState_build__closure1(t3, context))], t4), _null, _null), _null)], t4), B.CrossAxisAlignment_2, _null, B.MainAxisAlignment_0, B.MainAxisSize_0, B.VerticalDirection_1), _null), 2), _null, new A.BoxConstraints(0, 1 / 0, minHeight, 600), B.CrossAxisAlignment_0, false, _null, true, B.EdgeInsets_6_12_12_12), 2));
|
||||
t11.push(A.Expanded$(A.FormCard$(A.DefaultTabController$(new A.SizedBox(_null, minHeight, A.Column$(A._setArrayType([new A.AppTabBar(t1, _null, true, _null, _null), new A.Flexible(1, B.FlexFit_1, A.TabBarView$(A._setArrayType([A.ListView$(t2, _null, _null, B.Axis_1, false), A.RefreshIndicator$(new A.VendorViewDocuments(t3, new A.ValueKey(t3.vendor.id, type$.ValueKey_legacy_String)), new A._VendorViewFullwidthState_build__closure1(t3, context))], t4), _null, _null), _null)], t4), B.CrossAxisAlignment_2, _null, B.MainAxisAlignment_0, B.MainAxisSize_0, B.VerticalDirection_1), _null), 2), _null, new A.BoxConstraints(0, 1 / 0, minHeight, 600), B.CrossAxisAlignment_0, false, _null, true, B.EdgeInsets_6_12_12_12), 2));
|
||||
}
|
||||
return A.Row$(t12, B.CrossAxisAlignment_0, B.MainAxisAlignment_0, B.MainAxisSize_1, _null);
|
||||
return A.Row$(t11, B.CrossAxisAlignment_0, B.MainAxisAlignment_0, B.MainAxisSize_1, _null);
|
||||
},
|
||||
$signature: 638
|
||||
};
|
||||
@ -451390,6 +451423,10 @@
|
||||
var t1 = J.$index$asx($.$get$LocalizationsProvider__localizedValues().$index(0, this.localeCode), "copy_link");
|
||||
return t1 == null ? "" : t1;
|
||||
},
|
||||
get$viewPortal() {
|
||||
var t1 = J.$index$asx($.$get$LocalizationsProvider__localizedValues().$index(0, this.localeCode), "view_portal");
|
||||
return t1 == null ? "" : t1;
|
||||
},
|
||||
get$systemLogs() {
|
||||
var t1 = J.$index$asx($.$get$LocalizationsProvider__localizedValues().$index(0, this.localeCode), "system_logs");
|
||||
return t1 == null ? "" : t1;
|
||||
@ -451771,6 +451808,12 @@
|
||||
t2 = J.$index$asx(t1.$index(0, this.localeCode), _s11_);
|
||||
return t2 == null ? J.$index$asx(t1.$index(0, "en"), _s11_) : t2;
|
||||
},
|
||||
get$viewMap() {
|
||||
var _s8_ = "view_map",
|
||||
t1 = $.$get$LocalizationsProvider__localizedValues(),
|
||||
t2 = J.$index$asx(t1.$index(0, this.localeCode), _s8_);
|
||||
return t2 == null ? J.$index$asx(t1.$index(0, "en"), _s8_) : t2;
|
||||
},
|
||||
get$standing() {
|
||||
var _s8_ = "standing",
|
||||
t1 = $.$get$LocalizationsProvider__localizedValues(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user