1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Admin Portal - Profile

This commit is contained in:
hillelcoren 2023-02-07 15:45:34 +00:00
parent b5d9131caa
commit 64944bffd6

View File

@ -125850,10 +125850,10 @@
_.pageMargin = t2;
_.key = t3;
},
PdfPreview$(allowPrinting, allowSharing, build, canChangeOrientation, canChangePageFormat, canDebug, maxPageWidth, pages) {
return new A.PdfPreview(build, allowPrinting, allowSharing, maxPageWidth, false, false, false, pages, null);
PdfPreview$(allowPrinting, allowSharing, build, canChangeOrientation, canChangePageFormat, canDebug, maxPageWidth, pages, pdfFileName) {
return new A.PdfPreview(build, allowPrinting, allowSharing, maxPageWidth, false, false, false, pdfFileName, pages, null);
},
PdfPreview: function PdfPreview(t0, t1, t2, t3, t4, t5, t6, t7, t8) {
PdfPreview: function PdfPreview(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) {
var _ = this;
_.build = t0;
_.allowPrinting = t1;
@ -125862,8 +125862,9 @@
_.canChangePageFormat = t4;
_.canChangeOrientation = t5;
_.canDebug = t6;
_.pages = t7;
_.key = t8;
_.pdfFileName = t7;
_.pages = t8;
_.key = t9;
},
_PdfPreviewState: function _PdfPreviewState(t0, t1) {
var _ = this;
@ -438747,12 +438748,11 @@
t6 = A.Container$(_null, new A.DatePicker(t2.get$startDate(), _this._client_pdf$_startDate, new A._ClientPdfViewState_build_closure8(_this), _null, false, _null, _null, _null), B.Clip_0, _null, _null, _null, _null, _null, _null, _null, B.EdgeInsets_16_8_16_8, _null, _null, 180);
t7 = A.Container$(_null, new A.DatePicker(t2.get$endDate(), _this._client_pdf$_endDate, new A._ClientPdfViewState_build_closure9(_this), _null, false, _null, _null, _null), B.Clip_0, _null, _null, _null, _null, _null, _null, _null, B.EdgeInsets_16_8_16_8, _null, _null, 180);
t8 = $.$get$LocalizationsProvider__localizedValues();
t2 = J.$index$asx(t8.$index(0, t2.localeCode), _s8_);
if (t2 == null)
t2 = J.$index$asx(t8.$index(0, "en"), _s8_);
t4.push(A.Container$(_null, A.Wrap$(B.WrapAlignment_2, A._setArrayType([t6, t7, new A.Padding(B.EdgeInsets_16_0_16_0, new A.AppButton(_null, _null, t2, new A._ClientPdfViewState_build_closure10(_this), _null, _null), _null)], t3), B.Clip_0, B.WrapCrossAlignment_0, 0), B.Clip_0, t5, _null, _null, _null, _null, _null, _null, _null, _null, _null, 1 / 0));
t9 = J.$index$asx(t8.$index(0, t2.localeCode), _s8_);
t8 = t9 == null ? J.$index$asx(t8.$index(0, "en"), _s8_) : t9;
t4.push(A.Container$(_null, A.Wrap$(B.WrapAlignment_2, A._setArrayType([t6, t7, new A.Padding(B.EdgeInsets_16_0_16_0, new A.AppButton(_null, _null, t8, new A._ClientPdfViewState_build_closure10(_this), _null, _null), _null)], t3), B.Clip_0, B.WrapCrossAlignment_0, 0), B.Clip_0, t5, _null, _null, _null, _null, _null, _null, _null, _null, _null, 1 / 0));
}
t4.push(A.Expanded$(_this._client_pdf$_isLoading || _this._client_pdf$_response == null ? new A.LoadingIndicator(_null, false, _null) : A.PdfPreview$(true, true, new A._ClientPdfViewState_build_closure11(_this), false, false, false, 800, _null), 1));
t4.push(A.Expanded$(_this._client_pdf$_isLoading || _this._client_pdf$_response == null ? new A.LoadingIndicator(_null, false, _null) : A.PdfPreview$(true, true, new A._ClientPdfViewState_build_closure11(_this), false, false, false, 800, _null, t2.get$statement() + "_" + client.number + ".pdf"), 1));
return A.Scaffold$(t1, B.Color_4292927712, A.Column$(t4, B.CrossAxisAlignment_2, _null, B.MainAxisAlignment_0, B.MainAxisSize_1, B.VerticalDirection_1), _null, _null, _null, _null, _null);
}
};
@ -438886,7 +438886,7 @@
call$0() {
var $async$goto = 0,
$async$completer = A._makeAsyncAwaitCompleter(type$.Null),
$async$self = this, t1;
$async$self = this;
var $async$call$0 = A._wrapJsFunctionForAsync(function($async$errorCode, $async$result) {
if ($async$errorCode === 1)
return A._asyncRethrow($async$result, $async$completer);
@ -438894,10 +438894,7 @@
switch ($async$goto) {
case 0:
// Function start
t1 = J.$index$asx($.$get$LocalizationsProvider__localizedValues().$index(0, $async$self.localization.localeCode), "statement");
if (t1 == null)
t1 = "";
A.WebUtils_downloadBinaryFile(t1 + "_" + $async$self.client.number + ".pdf", $async$self.$this._client_pdf$_response.bodyBytes);
A.WebUtils_downloadBinaryFile($async$self.localization.get$statement() + "_" + $async$self.client.number + ".pdf", $async$self.$this._client_pdf$_response.bodyBytes);
// implicit return
return A._asyncReturn(null, $async$completer);
}
@ -448826,7 +448823,7 @@
if (this._widget.pdfBytes == null)
t2.push(new A.SizedBox(_null, _null, _null, _null));
else
t2.push(A.PdfPreview$(false, false, new A._PdfDesignPreviewState_build_closure(this), false, false, false, 800, _null));
t2.push(A.PdfPreview$(false, false, new A._PdfDesignPreviewState_build_closure(this), false, false, false, 800, _null, _null));
if (this._widget.isLoading)
t2.push(A.Column$(A._setArrayType([A.LinearProgressIndicator$(), A.Expanded$(new A.SizedBox(_null, _null, _null, _null), 1)], t1), B.CrossAxisAlignment_2, _null, B.MainAxisAlignment_0, B.MainAxisSize_1, B.VerticalDirection_1));
return A.Container$(B.Alignment_0_0, new A.Stack(B.Alignment_0_0, _null, B.StackFit_0, B.Clip_1, t2, _null), B.Clip_0, B.MaterialColor_Map_HFpTk_4288585374, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null);
@ -455336,7 +455333,7 @@
t5 = _this._currentPage == _this._pageCount ? _null : new A.__PdfPreviewState_build_closure0(_this);
t4.push(new A.Padding(B.EdgeInsets_0_0_0_16, A.Row$(A._setArrayType([new A.AppButton(_null, B._MdiIconData_Gjc1, t6, t7, 180, _null), new A.SizedBox(16, _null, _null, _null), new A.AppButton(_null, B._MdiIconData_Up30, t1, t5, 180, _null)], t3), B.CrossAxisAlignment_2, B.MainAxisAlignment_2, B.MainAxisSize_1, _null), _null));
}
t4.push(A.Expanded$(_this._invoice_edit_desktop$_response == null ? A.Container$(_null, _null, B.Clip_0, B.Color_4292927712, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null) : A.PdfPreview$(false, false, new A.__PdfPreviewState_build_closure1(_this), false, false, false, 800, A._setArrayType([_this._currentPage - 1], type$.JSArray_legacy_int)), 1));
t4.push(A.Expanded$(_this._invoice_edit_desktop$_response == null ? A.Container$(_null, _null, B.Clip_0, B.Color_4292927712, _null, _null, _null, _null, _null, _null, _null, _null, _null, _null) : A.PdfPreview$(false, false, new A.__PdfPreviewState_build_closure1(_this), false, false, false, 800, A._setArrayType([_this._currentPage - 1], type$.JSArray_legacy_int), _null), 1));
t1 = A._setArrayType([A.Column$(t4, B.CrossAxisAlignment_3, _null, B.MainAxisAlignment_0, B.MainAxisSize_1, B.VerticalDirection_1)], t3);
if (_this._invoice_edit_desktop$_isLoading)
t1.push(A.Center$(A.CircularProgressIndicator$(_null, _null, _null, _null, _null, 4, _null, _null), _null, _null));
@ -457934,7 +457931,7 @@
return new A.HelpText(A.Localizations_of(context, B.Type_AppLocalization_KyD, type$.legacy_AppLocalization).get$noClientSelected(), _null);
if (this._invoice_edit_pdf$_response == null)
return A.Center$(A.CircularProgressIndicator$(_null, _null, _null, _null, _null, 4, _null, _null), _null, _null);
return A.Center$(A.PdfPreview$(false, false, new A.InvoiceEditPDFState_build_closure(this), false, false, false, 800, _null), _null, _null);
return A.Center$(A.PdfPreview$(false, false, new A.InvoiceEditPDFState_build_closure(this), false, false, false, 800, _null, _null), _null, _null);
}
};
A.InvoiceEditPDFState_didChangeDependencies_closure.prototype = {
@ -459096,7 +459093,7 @@
t1 = A.AppBar$(t3, _null, t5 === B.AppLayout_mobile, _null, _null, _null, 1, _null, false, _null, false, _null, _null, _null, _null, _null, true, _null, _null, _null, _null, _null, _null, t4, _null, _null, _null, 1, _null);
} else
t1 = _null;
return A.Scaffold$(t1, B.Color_4292927712, _this._invoice_pdf$_isLoading || _this._invoice_pdf$_response == null ? new A.LoadingIndicator(_null, false, _null) : A.PdfPreview$(true, true, new A._InvoicePdfViewState_build_closure3(_this), false, false, false, 800, _null), _null, _null, _null, _null, _null);
return A.Scaffold$(t1, B.Color_4292927712, _this._invoice_pdf$_isLoading || _this._invoice_pdf$_response == null ? new A.LoadingIndicator(_null, false, _null) : A.PdfPreview$(true, true, new A._InvoicePdfViewState_build_closure3(_this), false, false, false, 800, _null, J.$add$ansx(t2.lookup$1(A.toSnakeCase(invoice.entityType.name)), "_") + invoice.number + ".pdf"), _null, _null, _null, _null, _null);
}
};
A._InvoicePdfViewState_loadPdf_closure.prototype = {
@ -481613,7 +481610,7 @@
var t1, _null = null;
if (this.response == null)
return new A.LoadingIndicator(_null, false, _null);
t1 = A._setArrayType([A.PdfPreview$(false, false, new A._PdfPreviewState_build_closure0(this), false, false, false, 800, _null)], type$.JSArray_legacy_Widget);
t1 = A._setArrayType([A.PdfPreview$(false, false, new A._PdfPreviewState_build_closure0(this), false, false, false, 800, _null, _null)], type$.JSArray_legacy_Widget);
if (this.isLoading)
t1.push(A.LinearProgressIndicator$());
return new A.Stack(B.AlignmentDirectional_m1_m1, _null, B.StackFit_0, B.Clip_1, t1, _null);
@ -503076,6 +503073,10 @@
var t1 = J.$index$asx($.$get$LocalizationsProvider__localizedValues().$index(0, this.localeCode), "hours");
return t1 == null ? "" : t1;
},
get$statement() {
var t1 = J.$index$asx($.$get$LocalizationsProvider__localizedValues().$index(0, this.localeCode), "statement");
return t1 == null ? "" : t1;
},
get$gateway() {
var t1 = J.$index$asx($.$get$LocalizationsProvider__localizedValues().$index(0, this.localeCode), "gateway");
return t1 == null ? "" : t1;
@ -504191,9 +504192,11 @@
_this.super$State$initState();
markdown = _this._widget.value;
markdown.toString;
markdown = A.stringReplaceAllUnchecked(markdown, "<p/>", "\n");
markdown = A.stringReplaceAllUnchecked(markdown, "<p>", "\n");
markdown = A.stringReplaceAllUnchecked(markdown, "</p>", "\n");
t1 = A.deserializeMarkdownToDocument(A.stringReplaceAllUnchecked(markdown, "<p/>", "\n"));
markdown = A.stringReplaceAllUnchecked(markdown, "<div>", "\n");
markdown = A.stringReplaceAllUnchecked(markdown, "</p>", "");
t1 = A.deserializeMarkdownToDocument(A.stringReplaceAllUnchecked(markdown, "</div>", ""));
t2 = _this.get$_hideOrShowToolbar();
t1.addListener$1(0, t2);
t1.addListener$1(0, _this.get$_super_editor$_onChanged());
@ -510466,20 +510469,26 @@
actions = A._setArrayType([], t1);
t2 = _this._widget;
if (t2.allowPrinting) {
t2 = _this.info;
t2 = (t2 == null ? _null : t2.canPrint) === true;
t3 = _this.info;
t3 = (t3 == null ? _null : t3.canPrint) === true;
} else
t2 = false;
if (t2)
actions.push(new A.PdfPrintAction(B.Icon_IID0, "Document", true, _null, _null, _null));
t3 = false;
if (t3) {
t2 = t2.pdfFileName;
actions.push(new A.PdfPrintAction(B.Icon_IID0, t2 == null ? "Document" : t2, true, _null, _null, _null));
}
t2 = _this._widget;
if (t2.allowSharing) {
t2 = _this.info;
t2 = (t2 == null ? _null : t2.canShare) === true;
t3 = _this.info;
t3 = (t3 == null ? _null : t3.canShare) === true;
} else
t2 = false;
if (t2)
actions.push(new A.PdfShareAction(B.Icon_OxR0, "document.pdf", _null, new A.LabeledGlobalKey(_null, type$.LabeledGlobalKey_State_StatefulWidget), _null));
t3 = false;
if (t3) {
t2 = t2.pdfFileName;
if (t2 == null)
t2 = "document.pdf";
actions.push(new A.PdfShareAction(B.Icon_OxR0, t2, _null, new A.LabeledGlobalKey(_null, type$.LabeledGlobalKey_State_StatefulWidget), _null));
}
_this._widget.toString;
t2 = _this.___PdfPreviewState_previewData_A;
t2 === $ && A.throwUnnamedLateFieldNI();