mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Admin Portal - Profile
This commit is contained in:
parent
4c3174e87d
commit
6d6a95d1de
67
public/main.profile.dart.js
vendored
67
public/main.profile.dart.js
vendored
@ -272260,9 +272260,19 @@
|
||||
return _this.getCustomFieldLabel$1("surcharge1").length !== 0 || _this.getCustomFieldLabel$1("surcharge2").length !== 0 || _this.getCustomFieldLabel$1("surcharge3").length !== 0 || _this.getCustomFieldLabel$1("surcharge4").length !== 0;
|
||||
},
|
||||
getCustomFieldLabel$1(field) {
|
||||
var t1;
|
||||
if (J.contains$1$asx(field, ".custom"))
|
||||
field = B.JSString_methods.replaceFirst$2(B.JSString_methods.replaceFirst$2(field, ".custom", ""), "$", "");
|
||||
var t1,
|
||||
_s8_ = ".product";
|
||||
field = J.replaceFirst$2$s(field, "$", "");
|
||||
if (B.JSString_methods.contains$1(field, ".custom"))
|
||||
field = B.JSString_methods.replaceFirst$2(field, ".custom", "");
|
||||
if (B.JSString_methods.contains$1(field, _s8_))
|
||||
field = B.JSString_methods.replaceFirst$2(field, _s8_, "");
|
||||
else if (B.JSString_methods.contains$1(field, ".task"))
|
||||
field = B.JSString_methods.replaceFirst$2(field, ".task", "");
|
||||
if (B.JSString_methods.contains$1(field, "quote"))
|
||||
field = B.JSString_methods.replaceFirst$2(field, "quote", "invoice");
|
||||
else if (B.JSString_methods.contains$1(field, "credit"))
|
||||
field = B.JSString_methods.replaceFirst$2(field, "credit", "invoice");
|
||||
t1 = this.customFields._map$_map;
|
||||
if (t1.containsKey$1(0, field))
|
||||
return B.JSArray_methods.get$first(J.split$1$s(t1.$index(0, field), "|"));
|
||||
@ -384871,7 +384881,7 @@
|
||||
this._updateColumns$0();
|
||||
},
|
||||
_updateColumns$0() {
|
||||
var includedLineItems, hasTax1, hasTax2, hasTax3, customField1, customField2, customField3, customField4, pdfColumns, t3, t4, t5, t6, _this = this,
|
||||
var includedLineItems, hasTax1, hasTax2, hasTax3, customField1, customField2, customField3, customField4, pdfColumns, t3, t4, _i, column, t5, _this = this,
|
||||
viewModel = _this._widget.viewModel,
|
||||
lineItems = viewModel.invoice.lineItems,
|
||||
state = viewModel.state,
|
||||
@ -384890,53 +384900,62 @@
|
||||
customField3 = t1 ? "task3" : "product3";
|
||||
customField4 = t1 ? "task4" : "product4";
|
||||
t2 = company.settings;
|
||||
pdfColumns = J.map$1$1$ax(t2.getFieldsForSection$1(t1 ? "task_columns" : "product_columns"), new A._InvoiceEditItemsDesktopState__updateColumns_closure3(), type$.legacy_String);
|
||||
t2 = J.map$1$1$ax(t2.getFieldsForSection$1(t1 ? "task_columns" : "product_columns"), new A._InvoiceEditItemsDesktopState__updateColumns_closure3(), type$.legacy_String);
|
||||
pdfColumns = A.List_List$of(t2, true, t2.$ti._eval$1("ListIterable.E"));
|
||||
if (_this._widget.isTasks) {
|
||||
if (pdfColumns.get$length(pdfColumns) === 0)
|
||||
if (pdfColumns.length === 0)
|
||||
pdfColumns = A._setArrayType(["service", "description", "rate", "hours"], type$.JSArray_legacy_String);
|
||||
else if (!pdfColumns.contains$1(0, "service")) {
|
||||
else if (!B.JSArray_methods.contains$1(pdfColumns, "service")) {
|
||||
t1 = A._setArrayType(["service"], type$.JSArray_legacy_String);
|
||||
B.JSArray_methods.addAll$1(t1, pdfColumns);
|
||||
pdfColumns = t1;
|
||||
}
|
||||
} else if (pdfColumns.get$length(pdfColumns) === 0)
|
||||
} else if (pdfColumns.length === 0)
|
||||
pdfColumns = A._setArrayType(["item", "description", "unit_cost", "quantity"], type$.JSArray_legacy_String);
|
||||
else if (!pdfColumns.contains$1(0, "item")) {
|
||||
else if (!B.JSArray_methods.contains$1(pdfColumns, "item")) {
|
||||
t1 = A._setArrayType(["item"], type$.JSArray_legacy_String);
|
||||
B.JSArray_methods.addAll$1(t1, pdfColumns);
|
||||
pdfColumns = t1;
|
||||
}
|
||||
for (t1 = J.get$iterator$ax(pdfColumns), t2 = !company.enableProductQuantity, t3 = company.enableProductDiscount, t4 = _this._invoice_edit_items_desktop$_columns; t1.moveNext$0();) {
|
||||
t5 = t1.get$current(t1);
|
||||
if ("item" === t5 || "service" === t5)
|
||||
if (company.getCustomFieldLabel$1(customField1).length !== 0 && !B.JSArray_methods.contains$1(pdfColumns, customField1))
|
||||
B.JSArray_methods.add$1(pdfColumns, customField1);
|
||||
if (company.getCustomFieldLabel$1(customField2).length !== 0 && !B.JSArray_methods.contains$1(pdfColumns, customField2))
|
||||
B.JSArray_methods.add$1(pdfColumns, customField2);
|
||||
if (company.getCustomFieldLabel$1(customField3).length !== 0 && !B.JSArray_methods.contains$1(pdfColumns, customField3))
|
||||
B.JSArray_methods.add$1(pdfColumns, customField3);
|
||||
if (company.getCustomFieldLabel$1(customField4).length !== 0 && !B.JSArray_methods.contains$1(pdfColumns, customField4))
|
||||
B.JSArray_methods.add$1(pdfColumns, customField4);
|
||||
for (t1 = pdfColumns.length, t2 = !company.enableProductQuantity, t3 = company.enableProductDiscount, t4 = _this._invoice_edit_items_desktop$_columns, _i = 0; _i < pdfColumns.length; pdfColumns.length === t1 || (0, A.throwConcurrentModificationError)(pdfColumns), ++_i) {
|
||||
column = pdfColumns[_i];
|
||||
if ("item" === column || "service" === column)
|
||||
t4.push("item");
|
||||
else if ("description" === t5)
|
||||
else if ("description" === column)
|
||||
t4.push("description");
|
||||
else if ("unit_cost" === t5 || "rate" === t5)
|
||||
else if ("unit_cost" === column || "rate" === column)
|
||||
t4.push("unit_cost");
|
||||
else {
|
||||
if ("quantity" === t5 || "hours" === t5)
|
||||
t6 = !t2 || _this._widget.isTasks;
|
||||
if ("quantity" === column || "hours" === column)
|
||||
t5 = !t2 || _this._widget.isTasks;
|
||||
else
|
||||
t6 = false;
|
||||
if (t6)
|
||||
t5 = false;
|
||||
if (t5)
|
||||
t4.push("quantity");
|
||||
else if (("product1" === t5 || "task1" === t5) && company.getCustomFieldLabel$1(customField1).length !== 0)
|
||||
else if (("product1" === column || "task1" === column) && company.getCustomFieldLabel$1(customField1).length !== 0)
|
||||
t4.push("custom1");
|
||||
else if (("product2" === t5 || "task2" === t5) && company.getCustomFieldLabel$1(customField2).length !== 0)
|
||||
else if (("product2" === column || "task2" === column) && company.getCustomFieldLabel$1(customField2).length !== 0)
|
||||
t4.push("custom2");
|
||||
else if (("product3" === t5 || "task3" === t5) && company.getCustomFieldLabel$1(customField3).length !== 0)
|
||||
else if (("product3" === column || "task3" === column) && company.getCustomFieldLabel$1(customField3).length !== 0)
|
||||
t4.push("custom3");
|
||||
else if (("product4" === t5 || "task4" === t5) && company.getCustomFieldLabel$1(customField4).length !== 0)
|
||||
else if (("product4" === column || "task4" === column) && company.getCustomFieldLabel$1(customField4).length !== 0)
|
||||
t4.push("custom4");
|
||||
else if ("tax" === t5) {
|
||||
else if ("tax" === column) {
|
||||
if (hasTax1)
|
||||
t4.push("tax1");
|
||||
if (hasTax2)
|
||||
t4.push("tax2");
|
||||
if (hasTax3)
|
||||
t4.push("tax3");
|
||||
} else if ("discount" === t5 && t3)
|
||||
} else if ("discount" === column && t3)
|
||||
t4.push("discount");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user