1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Admin Portal - Profile

This commit is contained in:
hillelcoren 2021-11-05 06:30:14 +00:00
parent 5e9e718445
commit 0be96b4608

View File

@ -280346,68 +280346,70 @@
return A.matchesStringsValue(H.setRuntimeTypeInfo([_this.poNumber, _this.publicNotes, _this.privateNotes, _this.customValue1, _this.customValue2, _this.customValue3, _this.customValue4], type$.JSArray_legacy_String), filter);
},
getActions$4$client$includeEdit$multiselect$userCompany: function(client, includeEdit, multiselect, userCompany) {
var t3, t4, countOtherTypes, _this = this,
t1 = type$.JSArray_legacy_EntityAction,
actions = H.setRuntimeTypeInfo([], t1),
t2 = !_this.isDeleted;
if (t2) {
var t2, t3, t4, countOtherTypes, _this = this,
actions = H.setRuntimeTypeInfo([], type$.JSArray_legacy_EntityAction),
t1 = !_this.isDeleted;
if (t1) {
if (userCompany.canEditEntity$1(_this)) {
if (includeEdit && !multiselect)
actions.push(C.EntityAction_edit);
if (_this.entityType === C.EntityType_recurringInvoice) {
t3 = type$.JSArray_legacy_String;
t4 = _this.statusId;
if (C.JSArray_methods.contains$1(H.setRuntimeTypeInfo(["1", "3"], t3), t4))
t2 = type$.JSArray_legacy_String;
t3 = _this.statusId;
if (C.JSArray_methods.contains$1(H.setRuntimeTypeInfo(["1", "3"], t2), t3))
actions.push(C.EntityAction_start);
else if (C.JSArray_methods.contains$1(H.setRuntimeTypeInfo(["-1", "2"], t3), t4))
else if (C.JSArray_methods.contains$1(H.setRuntimeTypeInfo(["-1", "2"], t2), t3))
actions.push(C.EntityAction_stop);
}
}
t3 = _this.invitations._list;
t4 = J.getInterceptor$asx(t3);
if (t4.get$isNotEmpty(t3))
t2 = _this.invitations._list;
t3 = J.getInterceptor$asx(t2);
if (t3.get$isNotEmpty(t2))
if (multiselect)
actions.push(C.EntityAction_bulkDownload);
else
C.JSArray_methods.addAll$1(actions, H.setRuntimeTypeInfo([C.EntityAction_viewPdf, C.EntityAction_download], t1));
else {
actions.push(C.EntityAction_viewPdf);
if (!C.JSArray_methods.contains$1(H.setRuntimeTypeInfo([C.EntityType_recurringInvoice], type$.JSArray_legacy_EntityType), _this.entityType))
actions.push(C.EntityAction_download);
}
if (userCompany.canEditEntity$1(_this)) {
t1 = _this.statusId;
t1 = !(t1 === "5" || t1 === "6");
t4 = _this.statusId;
t4 = !(t4 === "5" || t4 === "6");
} else
t1 = false;
if (t1) {
t4 = false;
if (t4) {
if (multiselect) {
t1 = _this.entityType;
if (t1 === C.EntityType_quote)
t4 = _this.entityType;
if (t4 === C.EntityType_quote)
actions.push(C.EntityAction_bulkEmailQuote);
else if (t1 === C.EntityType_credit)
else if (t4 === C.EntityType_credit)
actions.push(C.EntityAction_bulkEmailCredit);
else if (t1 === C.EntityType_invoice)
else if (t4 === C.EntityType_invoice)
actions.push(C.EntityAction_bulkEmailInvoice);
} else {
t1 = _this.entityType;
if (t1 === C.EntityType_quote)
t4 = _this.entityType;
if (t4 === C.EntityType_quote)
actions.push(C.EntityAction_emailQuote);
else if (t1 === C.EntityType_credit)
else if (t4 === C.EntityType_credit)
actions.push(C.EntityAction_emailCredit);
else if (t1 === C.EntityType_invoice)
else if (t4 === C.EntityType_invoice)
actions.push(C.EntityAction_emailInvoice);
}
if (_this.get$isPayable() && userCompany.can$2(C.UserPermission_create, C.EntityType_payment))
actions.push(C.EntityAction_newPayment);
if (_this.statusId === "1" && !C.JSArray_methods.contains$1(H.setRuntimeTypeInfo([C.EntityType_recurringInvoice], type$.JSArray_legacy_EntityType), t1))
if (_this.statusId === "1" && !C.JSArray_methods.contains$1(H.setRuntimeTypeInfo([C.EntityType_recurringInvoice], type$.JSArray_legacy_EntityType), t4))
actions.push(C.EntityAction_markSent);
if (_this.get$isPayable() && t1 === C.EntityType_invoice)
if (_this.get$isPayable() && t4 === C.EntityType_invoice)
actions.push(C.EntityAction_markPaid);
if (t1 === C.EntityType_quote) {
t1 = _this.invoiceId;
t1 = (t1 == null ? "" : t1).length === 0;
if (t4 === C.EntityType_quote) {
t4 = _this.invoiceId;
t4 = (t4 == null ? "" : t4).length === 0;
} else
t1 = false;
if (t1)
t4 = false;
if (t4)
actions.push(C.EntityAction_convertToInvoice);
}
if (t4.get$isNotEmpty(t3) && !multiselect)
if (t3.get$isNotEmpty(t2) && !multiselect)
actions.push(C.EntityAction_clientPortal);
}
if (actions.length !== 0 && C.JSArray_methods.get$last(actions) != null)
@ -280449,7 +280451,7 @@
actions.push(null);
}
if (userCompany.canEditEntity$1(_this))
if (t2) {
if (t1) {
t1 = _this.statusId;
t1 = !(t1 === "5" || t1 === "6");
} else
@ -376437,7 +376439,7 @@
_this._dashboard_screen$_scrollController = t1;
if (Y.cleanApiUrl(state.authState.url) !== "https://demo.invoiceninja.com") {
t1 = t4.$index(t3, t2).userCompany.company.settings.name;
t1 = (t1 == null ? "" : t1).length === 0;
t1 = (t1 == null ? "" : t1).length === 0 && !t4.$index(t3, t2).userCompany.company.get$isNew();
} else
t1 = false;
if (t1)
@ -386583,8 +386585,10 @@
t2 = H.setRuntimeTypeInfo([], t2);
if (showEmail)
t2.push(U.TextButton$(false, L.Text$(t1.get$email(), _null, _null, _null, _null, _null, A.TextStyle$(_null, _null, state.get$headerTextColor(), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, true, _null, _null, _null, _null, _null, _null, _null), _null, _null, _null), _null, new E._InvoicePdfViewState_build_closure2(invoice), _null));
t5 = t1.get$download(t1);
t2.push(new X.AppTextButton(t5, _this._invoice_pdf$_response == null ? _null : new E._InvoicePdfViewState_build_closure3(_this, invoice, t1), true, _null, _null));
if (!C.JSArray_methods.contains$1(H.setRuntimeTypeInfo([C.EntityType_recurringInvoice], type$.JSArray_legacy_EntityType), invoice.entityType)) {
t5 = t1.get$download(t1);
t2.push(new X.AppTextButton(t5, _this._invoice_pdf$_response == null ? _null : new E._InvoicePdfViewState_build_closure3(_this, invoice, t1), true, _null, _null));
}
if (D.getLayout(context) === C.AppLayout_desktop)
t2.push(U.TextButton$(false, L.Text$(t1.get$close(t1), _null, _null, _null, _null, _null, A.TextStyle$(_null, _null, state.get$headerTextColor(), _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null, true, _null, _null, _null, _null, _null, _null, _null), _null, _null, _null), _null, new E._InvoicePdfViewState_build_closure4(invoice), _null));
t1 = E.AppBar$(t2, _null, t4 === C.AppLayout_mobile, _null, _null, _null, 1, _null, false, _null, false, _null, _null, _null, _null, _null, true, _null, _null, _null, _null, t3, _null, _null, _null, 1, _null);
@ -398909,7 +398913,7 @@
_this._widget.viewModel.onSavePressed.call$1(context);
},
build$1: function(_, context) {
var t5, url, t6, t7, portalUrl, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, _this = this, _null = null,
var t5, account, company0, url, t6, portalUrl, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, _this = this, _null = null,
_s20_ = "https://invoicing.co",
_s12_ = "registration",
_s25_ = "client_portal_domain_hint",
@ -398923,200 +398927,207 @@
t4 = t3.selectedCompanyIndex;
t2 = t2._list;
t5 = J.getInterceptor$asx(t2);
url = t5.$index(t2, t4).userCompany.account.defaultUrl + "/client/register";
if (state.get$companies().length > 1 && t5.$index(t2, t4).userCompany.company.id !== t5.$index(t2, t4).userCompany.account.defaultCompanyId)
url += "/" + t5.$index(t2, t4).userCompany.company.companyKey;
t6 = state.authState;
t7 = t6.get$isHosted();
if (t7)
url = C.JSString_methods.replaceFirst$2(url, "//", "//" + t5.$index(t2, t4).userCompany.company.subdomain + ".");
account = t5.$index(t2, t4).userCompany.account;
company0 = t5.$index(t2, t4).userCompany.company;
if (company0.portalMode === "domain")
url = company0.portalDomain;
else {
url = account.defaultUrl;
t6 = state.authState.get$isHosted();
if (t6)
url = C.JSString_methods.replaceFirst$2(url, "//", "//" + company0.subdomain + ".");
}
url += "/client/register";
if (state.get$companies().length > 1 && company0.id !== account.defaultCompanyId)
url += "/" + company0.companyKey;
portalUrl = C.JSString_methods.replaceFirst$2(_s20_, "//", "//" + t5.$index(t2, t4).userCompany.company.subdomain + ".");
t7 = t1.get$clientPortal();
t6 = t1.get$clientPortal();
t3 = t3.settingsUIState;
t8 = t3.updatedAt;
t9 = _this._client_portal$_controller;
t10 = type$.JSArray_legacy_Widget;
t11 = H.setRuntimeTypeInfo([E.Tab$(_null, t1.get$settings())], t10);
t7 = t3.updatedAt;
t8 = _this._client_portal$_controller;
t9 = type$.JSArray_legacy_Widget;
t10 = H.setRuntimeTypeInfo([E.Tab$(_null, t1.get$settings())], t9);
t3 = t3.entityType === C.EntityType_company;
if (t3) {
t12 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t1.localeCode), _s12_);
t11.push(E.Tab$(_null, t12 == null ? J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, "en"), _s12_) : t12));
t11 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t1.localeCode), _s12_);
t10.push(E.Tab$(_null, t11 == null ? J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, "en"), _s12_) : t11));
}
t12 = t1.localeCode;
t13 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "authorization");
t11.push(E.Tab$(_null, t13 == null ? "" : t13));
t13 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "messages");
t11.push(E.Tab$(_null, t13 == null ? "" : t13));
t11.push(E.Tab$(_null, t1.get$customize()));
t8 = E.TabBar$(t9, _null, true, new D.ValueKey(t8, type$.ValueKey_legacy_int), _null, t11);
t9 = _this._client_portal$_controller;
t11 = $.$get$_ClientPortalState__formKey();
t13 = H.setRuntimeTypeInfo([], t10);
t11 = t1.localeCode;
t12 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "authorization");
t10.push(E.Tab$(_null, t12 == null ? "" : t12));
t12 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "messages");
t10.push(E.Tab$(_null, t12 == null ? "" : t12));
t10.push(E.Tab$(_null, t1.get$customize()));
t7 = E.TabBar$(t8, _null, true, new D.ValueKey(t7, type$.ValueKey_legacy_int), _null, t10);
t8 = _this._client_portal$_controller;
t10 = $.$get$_ClientPortalState__formKey();
t12 = H.setRuntimeTypeInfo([], t9);
if (t3) {
t14 = H.setRuntimeTypeInfo([], t10);
t15 = t6.get$isHosted();
t13 = H.setRuntimeTypeInfo([], t9);
t14 = state.authState;
t15 = t14.get$isHosted();
if (t15) {
t15 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "portal_mode");
t15 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "portal_mode");
if (t15 == null)
t15 = "";
t16 = company.portalMode;
t17 = type$.legacy_String;
t18 = K.DropdownMenuItem$(L.Text$(t1.get$subdomain(), _null, _null, _null, _null, _null, _null, _null, _null, _null), "subdomain", t17);
t19 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "domain");
t14.push(new Q.AppDropdownButton(t15, t16, new S._ClientPortalState_build_closure(viewModel), H.setRuntimeTypeInfo([t18, K.DropdownMenuItem$(L.Text$(t19 == null ? "" : t19, _null, _null, _null, _null, _null, _null, _null, _null, _null), "domain", t17)], type$.JSArray_legacy_DropdownMenuItem_legacy_String), _null, true, "", _null, _null, type$.AppDropdownButton_legacy_String));
t19 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "domain");
t13.push(new Q.AppDropdownButton(t15, t16, new S._ClientPortalState_build_closure(viewModel), H.setRuntimeTypeInfo([t18, K.DropdownMenuItem$(L.Text$(t19 == null ? "" : t19, _null, _null, _null, _null, _null, _null, _null, _null, _null), "domain", t17)], type$.JSArray_legacy_DropdownMenuItem_legacy_String), _null, true, "", _null, _null, type$.AppDropdownButton_legacy_String));
}
t15 = t6.get$isHosted();
t15 = t14.get$isHosted();
if (t15 && company.portalMode === "subdomain") {
t15 = t1.get$subdomain();
t16 = _this._client_portal$_autoValidate;
t17 = t1.get$subdomainHelp();
t14 = t1.get$subdomain();
t15 = _this._client_portal$_autoValidate;
t16 = t1.get$subdomainHelp();
if (_this._isCheckingSubdomain)
t18 = C.IconData_62057_MaterialIcons_null_false;
t17 = C.IconData_62057_MaterialIcons_null_false;
else
t18 = _this._isSubdomainUnique ? C.IconData_57690_MaterialIcons_null_false : C.IconData_57912_MaterialIcons_null_false;
t18 = L.Icon$(t18, _null, _null);
C.JSArray_methods.addAll$1(t14, H.setRuntimeTypeInfo([S.DecoratedFormField$(false, _null, false, t16, _this._subdomainController, _null, true, _null, t17, _null, H.setRuntimeTypeInfo([new B.FilteringTextInputFormatter(P.RegExp_RegExp("[a-z0-9\\-]", true, false), true)], type$.JSArray_legacy_TextInputFormatter), false, false, _null, _null, t15, _null, _null, false, new S._ClientPortalState_build_closure0(_this), _null, _null, true, t18, _null, C.TextAlign_4, new S._ClientPortalState_build_closure1(_this, t1)), new T.Padding(C.EdgeInsets_0_16_0_0, L.Text$(portalUrl, _null, _null, _null, _null, _null, _null, _null, _null, _null), _null)], t10));
t17 = _this._isSubdomainUnique ? C.IconData_57690_MaterialIcons_null_false : C.IconData_57912_MaterialIcons_null_false;
t17 = L.Icon$(t17, _null, _null);
C.JSArray_methods.addAll$1(t13, H.setRuntimeTypeInfo([S.DecoratedFormField$(false, _null, false, t15, _this._subdomainController, _null, true, _null, t16, _null, H.setRuntimeTypeInfo([new B.FilteringTextInputFormatter(P.RegExp_RegExp("[a-z0-9\\-]", true, false), true)], type$.JSArray_legacy_TextInputFormatter), false, false, _null, _null, t14, _null, _null, false, new S._ClientPortalState_build_closure0(_this), _null, _null, true, t17, _null, C.TextAlign_4, new S._ClientPortalState_build_closure1(_this, t1)), new T.Padding(C.EdgeInsets_0_16_0_0, L.Text$(portalUrl, _null, _null, _null, _null, _null, _null, _null, _null, _null), _null)], t9));
} else {
t15 = t6.url;
t15 = t14.url;
t16 = Y.cleanApiUrl(t15) !== _s20_ || t5.$index(t2, t4).userCompany.account.plan === "enterprise";
t17 = company.portalMode === "domain";
if (!t17)
t18 = !t6.get$isHosted();
t18 = !t14.get$isHosted();
else
t18 = true;
if (t18) {
t18 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "domain_url");
t18 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "domain_url");
if (t18 == null)
t18 = "";
} else {
t18 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "iframe_url");
t18 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "iframe_url");
if (t18 == null)
t18 = "";
}
t19 = t6.get$isHosted();
t19 = t14.get$isHosted();
if (!t19) {
t19 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), _s25_);
t19 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), _s25_);
if (t19 == null)
t19 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, "en"), _s25_);
} else
t19 = "";
t18 = H.setRuntimeTypeInfo([S.DecoratedFormField$(false, _null, false, false, _this._portalDomainController, _null, t16, _null, t19, _null, _null, false, false, _null, C.TextInputType_6_null_null, t18, _null, _null, false, _null, _null, viewModel.onSavePressed, true, _null, _null, C.TextAlign_4, new S._ClientPortalState_build_closure2(state, t1)), T.SizedBox$(_null, 16, _null)], t10);
t18 = H.setRuntimeTypeInfo([S.DecoratedFormField$(false, _null, false, false, _this._portalDomainController, _null, t16, _null, t19, _null, _null, false, false, _null, C.TextInputType_6_null_null, t18, _null, _null, false, _null, _null, viewModel.onSavePressed, true, _null, _null, C.TextAlign_4, new S._ClientPortalState_build_closure2(state, t1)), T.SizedBox$(_null, 16, _null)], t9);
if (Y.cleanApiUrl(t15) !== _s20_ || t5.$index(t2, t4).userCompany.account.plan === "enterprise") {
if (t17)
t15 = t6.get$isHosted();
t14 = t14.get$isHosted();
else
t15 = false;
if (t15)
t14 = false;
if (t14)
t18.push(B.OutlinedButton$(new T.Padding(C.EdgeInsets_8_8_8_8, new U.IconText(t1.get$viewDocs().toUpperCase(), C._MdiIconData_ujl, _null, _null, _null), _null), new S._ClientPortalState_build_closure3()));
else
t18.push(T.SizedBox$(_null, _null, _null));
} else
t18.push(L.Text$(t1.get$requiresAnEnterprisePlan(), _null, _null, _null, _null, _null, _null, _null, _null, _null));
C.JSArray_methods.addAll$1(t14, t18);
C.JSArray_methods.addAll$1(t13, t18);
}
t13.push(Y.FormCard$(_null, t14, C.CrossAxisAlignment_3, 4, false, _null, false, _null));
t12.push(Y.FormCard$(_null, t13, C.CrossAxisAlignment_3, 4, false, _null, false, _null));
}
t14 = K.BoolDropdownButton$(_null, _null, _null, C._MdiIconData_Qa6, t1.get$clientPortal(), _null, new S._ClientPortalState_build_closure4(viewModel, settings), _null, settings.enablePortal);
t15 = t1.get$tasks();
t16 = settings.enablePortalTasks;
t16 = K.BoolDropdownButton$(_null, _null, _null, Q.getEntityIcon(C.EntityType_task), t15, _null, new S._ClientPortalState_build_closure5(viewModel, settings), _null, t16);
t15 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "document_upload");
if (t15 == null)
t15 = "";
t17 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "document_upload_help");
if (t17 == null)
t17 = "";
t15 = H.setRuntimeTypeInfo([t14, t16, K.BoolDropdownButton$(_null, _null, t17, C._MdiIconData_EuK1, t15, _null, new S._ClientPortalState_build_closure6(viewModel, settings), _null, settings.enablePortalUploads)], t10);
t13 = K.BoolDropdownButton$(_null, _null, _null, C._MdiIconData_Qa6, t1.get$clientPortal(), _null, new S._ClientPortalState_build_closure4(viewModel, settings), _null, settings.enablePortal);
t14 = t1.get$tasks();
t15 = settings.enablePortalTasks;
t15 = K.BoolDropdownButton$(_null, _null, _null, Q.getEntityIcon(C.EntityType_task), t14, _null, new S._ClientPortalState_build_closure5(viewModel, settings), _null, t15);
t14 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "document_upload");
if (t14 == null)
t14 = "";
t16 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "document_upload_help");
if (t16 == null)
t16 = "";
t14 = H.setRuntimeTypeInfo([t13, t15, K.BoolDropdownButton$(_null, _null, t16, C._MdiIconData_EuK1, t14, _null, new S._ClientPortalState_build_closure6(viewModel, settings), _null, settings.enablePortalUploads)], t9);
if (t3) {
t14 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "storefront");
if (t14 == null)
t14 = "";
t16 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "storefront_help");
if (t16 == null)
t16 = "";
t15.push(K.BoolDropdownButton$(_null, _null, t16, C._MdiIconData_egL2, t14, _null, new S._ClientPortalState_build_closure7(viewModel, company), _null, company.enableShopApi));
}
if (Y.cleanApiUrl(t6.url) !== "https://demo.invoiceninja.com")
t6 = t5.$index(t2, t4).userCompany.company.enableShopApi;
else
t6 = false;
if (t6) {
t6 = T.SizedBox$(_null, 16, _null);
t14 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "company_key");
t14 = L.Text$(t14 == null ? "" : t14, _null, _null, _null, _null, _null, _null, _null, _null, _null);
C.JSArray_methods.addAll$1(t15, H.setRuntimeTypeInfo([t6, new G.ListDivider(_null), Q.ListTile$(false, _null, _null, true, false, _null, _null, _null, new S._ClientPortalState_build_closure8(company, t1), false, _null, _null, L.Text$(company.companyKey, _null, 1, C.TextOverflow_2, _null, _null, _null, _null, _null, _null), _null, t14, L.Icon$(C.IconData_57744_MaterialIcons_null_false, _null, _null))], t10));
}
t13.push(Y.FormCard$(_null, t15, _null, 4, false, _null, false, _null));
t13.push(Y.FormCard$(_null, H.setRuntimeTypeInfo([S.DecoratedFormField$(false, _null, false, false, _this._termsController, _null, true, _null, _null, _null, _null, false, false, _null, _null, t1.get$termsOfService(), 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null), S.DecoratedFormField$(false, _null, false, false, _this._privacyController, _null, true, _null, _null, _null, _null, false, false, _null, _null, t1.get$privacyPolicy(), 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null)], t10), C.CrossAxisAlignment_0, 4, false, _null, true, _null));
t6 = H.setRuntimeTypeInfo([new X.ScrollableListView(t13, _null, _null, false, _null)], t10);
if (t3) {
t3 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "client_registration");
if (t3 == null)
t3 = "";
t13 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "client_registration_help");
t13 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "storefront");
if (t13 == null)
t13 = "";
t3 = H.setRuntimeTypeInfo([K.BoolDropdownButton$(_null, _null, t13, C._MdiIconData_MO91, t3, _null, new S._ClientPortalState_build_closure9(viewModel, company), _null, company.clientCanRegister)], t10);
t15 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "storefront_help");
if (t15 == null)
t15 = "";
t14.push(K.BoolDropdownButton$(_null, _null, t15, C._MdiIconData_egL2, t13, _null, new S._ClientPortalState_build_closure7(viewModel, company), _null, company.enableShopApi));
}
if (Y.cleanApiUrl(state.authState.url) !== "https://demo.invoiceninja.com")
t13 = t5.$index(t2, t4).userCompany.company.enableShopApi;
else
t13 = false;
if (t13) {
t13 = T.SizedBox$(_null, 16, _null);
t15 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "company_key");
t15 = L.Text$(t15 == null ? "" : t15, _null, _null, _null, _null, _null, _null, _null, _null, _null);
C.JSArray_methods.addAll$1(t14, H.setRuntimeTypeInfo([t13, new G.ListDivider(_null), Q.ListTile$(false, _null, _null, true, false, _null, _null, _null, new S._ClientPortalState_build_closure8(company, t1), false, _null, _null, L.Text$(company.companyKey, _null, 1, C.TextOverflow_2, _null, _null, _null, _null, _null, _null), _null, t15, L.Icon$(C.IconData_57744_MaterialIcons_null_false, _null, _null))], t9));
}
t12.push(Y.FormCard$(_null, t14, _null, 4, false, _null, false, _null));
t12.push(Y.FormCard$(_null, H.setRuntimeTypeInfo([S.DecoratedFormField$(false, _null, false, false, _this._termsController, _null, true, _null, _null, _null, _null, false, false, _null, _null, t1.get$termsOfService(), 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null), S.DecoratedFormField$(false, _null, false, false, _this._privacyController, _null, true, _null, _null, _null, _null, false, false, _null, _null, t1.get$privacyPolicy(), 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null)], t9), C.CrossAxisAlignment_0, 4, false, _null, true, _null));
t12 = H.setRuntimeTypeInfo([new X.ScrollableListView(t12, _null, _null, false, _null)], t9);
if (t3) {
t3 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "client_registration");
if (t3 == null)
t3 = "";
t13 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "client_registration_help");
if (t13 == null)
t13 = "";
t3 = H.setRuntimeTypeInfo([K.BoolDropdownButton$(_null, _null, t13, C._MdiIconData_MO91, t3, _null, new S._ClientPortalState_build_closure9(viewModel, company), _null, company.clientCanRegister)], t9);
t2 = t5.$index(t2, t4).userCompany.company.clientCanRegister;
if (t2) {
t2 = T.SizedBox$(_null, 16, _null);
t4 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "registration_url");
t4 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "registration_url");
t4 = L.Text$(t4 == null ? "" : t4, _null, _null, _null, _null, _null, _null, _null, _null, _null);
C.JSArray_methods.addAll$1(t3, H.setRuntimeTypeInfo([t2, new G.ListDivider(_null), Q.ListTile$(false, _null, _null, true, false, _null, _null, _null, new S._ClientPortalState_build_closure10(url, t1), false, _null, _null, L.Text$(url, _null, 1, C.TextOverflow_2, _null, _null, _null, _null, _null, _null), _null, t4, L.Icon$(C.IconData_57744_MaterialIcons_null_false, _null, _null)), new G.ListDivider(_null)], t10));
C.JSArray_methods.addAll$1(t3, H.setRuntimeTypeInfo([t2, new G.ListDivider(_null), Q.ListTile$(false, _null, _null, true, false, _null, _null, _null, new S._ClientPortalState_build_closure10(url, t1), false, _null, _null, L.Text$(url, _null, 1, C.TextOverflow_2, _null, _null, _null, _null, _null, _null), _null, t4, L.Icon$(C.IconData_57744_MaterialIcons_null_false, _null, _null)), new G.ListDivider(_null)], t9));
}
t6.push(new X.ScrollableListView(H.setRuntimeTypeInfo([Y.FormCard$(_null, t3, _null, 4, false, _null, false, _null), Y.FormCard$(_null, J.map$1$1$ax(company.clientRegistrationFields._list, new S._ClientPortalState_build_closure11(context, t1, company, viewModel), type$.legacy_SwitchListTile).toList$0(0), _null, 4, false, _null, true, _null)], t10), _null, _null, false, _null));
t12.push(new X.ScrollableListView(H.setRuntimeTypeInfo([Y.FormCard$(_null, t3, _null, 4, false, _null, false, _null), Y.FormCard$(_null, J.map$1$1$ax(company.clientRegistrationFields._list, new S._ClientPortalState_build_closure11(context, t1, company, viewModel), type$.legacy_SwitchListTile).toList$0(0), _null, 4, false, _null, true, _null)], t9), _null, _null, false, _null));
}
t2 = t1.get$enablePortalPassword();
t3 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "enable_portal_password_help");
t3 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "enable_portal_password_help");
if (t3 == null)
t3 = "";
t2 = Y.FormCard$(_null, H.setRuntimeTypeInfo([K.BoolDropdownButton$(_null, _null, t3, C._MdiIconData_Gjc, t2, _null, new S._ClientPortalState_build_closure12(viewModel, settings), _null, settings.enablePortalPassword)], t10), _null, 4, false, _null, false, _null);
t2 = Y.FormCard$(_null, H.setRuntimeTypeInfo([K.BoolDropdownButton$(_null, _null, t3, C._MdiIconData_Gjc, t2, _null, new S._ClientPortalState_build_closure12(viewModel, settings), _null, settings.enablePortalPassword)], t9), _null, 4, false, _null, false, _null);
t3 = t1.get$showAcceptInvoiceTerms();
t4 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "show_accept_invoice_terms_help");
t4 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "show_accept_invoice_terms_help");
if (t4 == null)
t4 = "";
t3 = K.BoolDropdownButton$(_null, _null, t4, C._MdiIconData_EuK2, t3, _null, new S._ClientPortalState_build_closure13(viewModel, settings), _null, settings.showAcceptInvoiceTerms);
t4 = t1.get$showAcceptQuoteTerms();
t5 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "show_accept_quote_terms_help");
t5 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "show_accept_quote_terms_help");
if (t5 == null)
t5 = "";
t4 = Y.FormCard$(_null, H.setRuntimeTypeInfo([t3, K.BoolDropdownButton$(_null, _null, t5, C._MdiIconData_EuK2, t4, _null, new S._ClientPortalState_build_closure14(viewModel, settings), _null, settings.showAcceptQuoteTerms)], t10), _null, 4, false, _null, false, _null);
t4 = Y.FormCard$(_null, H.setRuntimeTypeInfo([t3, K.BoolDropdownButton$(_null, _null, t5, C._MdiIconData_EuK2, t4, _null, new S._ClientPortalState_build_closure14(viewModel, settings), _null, settings.showAcceptQuoteTerms)], t9), _null, 4, false, _null, false, _null);
t5 = t1.get$requireInvoiceSignature();
t5 = K.BoolDropdownButton$(_null, _null, t1.get$requireInvoiceSignatureHelp(), C._MdiIconData_I2F0, t5, _null, new S._ClientPortalState_build_closure15(viewModel, settings), _null, settings.requireInvoiceSignature);
t3 = t1.get$requireQuoteSignature();
t3 = K.BoolDropdownButton$(_null, _null, t1.get$requireInvoiceSignatureHelp(), C._MdiIconData_I2F0, t3, _null, new S._ClientPortalState_build_closure16(viewModel, settings), _null, settings.requireQuoteSignature);
t13 = t1.get$signatureOnPdf();
t14 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "signature_on_pdf_help");
t14 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "signature_on_pdf_help");
if (t14 == null)
t14 = "";
t15 = settings.signatureOnPdf;
t6.push(new X.ScrollableListView(H.setRuntimeTypeInfo([t2, t4, Y.FormCard$(_null, H.setRuntimeTypeInfo([t5, t3, K.BoolDropdownButton$(_null, _null, t14, Q.getEntityIcon(C.EntityType_invoice), t13, _null, new S._ClientPortalState_build_closure17(viewModel, settings), _null, t15)], t10), _null, 4, false, _null, true, _null)], t10), _null, _null, false, _null));
t12.push(new X.ScrollableListView(H.setRuntimeTypeInfo([t2, t4, Y.FormCard$(_null, H.setRuntimeTypeInfo([t5, t3, K.BoolDropdownButton$(_null, _null, t14, Q.getEntityIcon(C.EntityType_invoice), t13, _null, new S._ClientPortalState_build_closure17(viewModel, settings), _null, t15)], t9), _null, 4, false, _null, true, _null)], t9), _null, _null, false, _null));
t15 = S.DecoratedFormField$(false, _null, false, false, _this._client_portal$_customMessageDashboard, _null, true, _null, _null, _null, _null, false, false, _null, _null, t1.get$dashboard(), 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null);
t13 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "unpaid_invoice");
t13 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "unpaid_invoice");
t2 = t13 == null ? "" : t13;
t2 = S.DecoratedFormField$(false, _null, false, false, _this._client_portal$_customMessageUnpaidInvoice, _null, true, _null, _null, _null, _null, false, false, _null, _null, t2, 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null);
t3 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "paid_invoice");
t3 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "paid_invoice");
if (t3 == null)
t3 = "";
t3 = S.DecoratedFormField$(false, _null, false, false, _this._client_portal$_customMessagePaidInvoice, _null, true, _null, _null, _null, _null, false, false, _null, _null, t3, 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null);
t4 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "unapproved_quote");
t4 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "unapproved_quote");
if (t4 == null)
t4 = "";
t6.push(new X.ScrollableListView(H.setRuntimeTypeInfo([Y.FormCard$(_null, H.setRuntimeTypeInfo([t15, t2, t3, S.DecoratedFormField$(false, _null, false, false, _this._client_portal$_customMessageUnapprovedQuote, _null, true, _null, _null, _null, _null, false, false, _null, _null, t4, 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null)], t10), _null, 4, false, _null, true, _null)], t10), _null, _null, false, _null));
t12.push(new X.ScrollableListView(H.setRuntimeTypeInfo([Y.FormCard$(_null, H.setRuntimeTypeInfo([t15, t2, t3, S.DecoratedFormField$(false, _null, false, false, _this._client_portal$_customMessageUnapprovedQuote, _null, true, _null, _null, _null, _null, false, false, _null, _null, t4, 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null)], t9), _null, 4, false, _null, true, _null)], t9), _null, _null, false, _null));
t4 = S.DecoratedFormField$(false, _null, false, false, _this._customHeaderController, _null, true, _null, _null, _null, _null, false, false, _null, _null, t1.get$header(), 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null);
t1 = S.DecoratedFormField$(false, _null, false, false, _this._customFooterController, _null, true, _null, _null, _null, _null, false, false, _null, _null, t1.get$footer(), 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null);
t3 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "custom_css");
t3 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "custom_css");
t2 = t3 == null ? "" : t3;
t2 = H.setRuntimeTypeInfo([t4, t1, S.DecoratedFormField$(false, _null, false, false, _this._customCssController, _null, true, _null, _null, _null, _null, false, false, _null, _null, t2, 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null)], t10);
t2 = H.setRuntimeTypeInfo([t4, t1, S.DecoratedFormField$(false, _null, false, false, _this._customCssController, _null, true, _null, _null, _null, _null, false, false, _null, _null, t2, 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null)], t9);
t1 = O.StoreProvider_of(context, type$.legacy_AppState).get$_store$_state().authState.get$isHosted();
if (!t1) {
t1 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t12), "custom_javascript");
t1 = J.$index$asx($.LocalizationsProvider__localizedValues.$index(0, t11), "custom_javascript");
if (t1 == null)
t1 = "";
t2.push(S.DecoratedFormField$(false, _null, false, false, _this._customJavaScriptController, _null, true, _null, _null, _null, _null, false, false, _null, _null, t1, 6, _null, false, _null, _null, _null, true, _null, _null, C.TextAlign_4, _null));
}
t6.push(new X.ScrollableListView(H.setRuntimeTypeInfo([Y.FormCard$(_null, t2, _null, 4, false, _null, true, _null)], t10), _null, _null, false, _null));
return K.EditScaffold$(_null, t8, new X.AppTabForm(_this._client_portal$_focusNode, t11, t6, t9, _null, _null), _null, _null, _null, false, _null, _null, new S._ClientPortalState_build_closure18(_this), _null, t7);
t12.push(new X.ScrollableListView(H.setRuntimeTypeInfo([Y.FormCard$(_null, t2, _null, 4, false, _null, true, _null)], t9), _null, _null, false, _null));
return K.EditScaffold$(_null, t7, new X.AppTabForm(_this._client_portal$_focusNode, t10, t12, t8, _null, _null), _null, _null, _null, false, _null, _null, new S._ClientPortalState_build_closure18(_this), _null, t6);
}
};
S._ClientPortalState__validateSubdomain_closure.prototype = {