Refactor code structure for improved readability and maintainability
Playwright Tests / test (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
This commit is contained in:
@@ -96,6 +96,14 @@ table.if td.num {
|
||||
margin: 0.2rem 0;
|
||||
}
|
||||
|
||||
@keyframes fis_spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
.edit_frm .invoice_layout {
|
||||
margin: 2rem 2rem 2rem auto; /* align right */
|
||||
width: 50rem;
|
||||
@@ -381,6 +389,21 @@ table.if td.num {
|
||||
.edit_frm .invoice_layout.freeze::before tr:hover > td.aux > .axf {
|
||||
display: inline-flex;
|
||||
}
|
||||
.edit_frm .invoice_layout.freeze::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
margin: -1.5rem 0 0 -1.5rem;
|
||||
border: 0.4rem solid rgba(255, 255, 255, 0.35);
|
||||
border-top-color: #FFF;
|
||||
border-radius: 50%;
|
||||
z-index: 11;
|
||||
pointer-events: none;
|
||||
animation: fis_spin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
.modal-body .lstfrm {
|
||||
display: block;
|
||||
|
||||
@@ -1509,7 +1509,6 @@ $inv.sprev = (change) => {
|
||||
}
|
||||
$ocms.postXT({
|
||||
url: $ocms.url('req/' + (change === true ?'sedit':'sprep')), data: { invc: JSON.stringify($inv.invcPayload(d)), id: d.invid ||'' }, success: (response) => {
|
||||
l.rC('freeze');
|
||||
let c = $$.dc('imagecollection pdfpreview'), vhr = Math.round(vh() * 0.88), invid = response.id, invtp = response.total;
|
||||
if (invtp > 10) {
|
||||
$$.dc('note warn', c).text($ict.tpe);
|
||||
@@ -1523,15 +1522,20 @@ $inv.sprev = (change) => {
|
||||
$ocms.dlg(c, {
|
||||
size: [vhr, Math.round(vw() * 0.88)], zindex: 50, form: false, button: $rct.crI, confirm: function (e) {
|
||||
let ct = $(this);
|
||||
l.aC('freeze'); /* spinner while the invoice is finalized/emailed on the backend */
|
||||
$ocms.postXT({
|
||||
url: $ocms.url('req/sconf'), data: { id: invid }, success: () => {
|
||||
url: $ocms.url('req/sconf'), data: { id: invid }, success: (cresp) => {
|
||||
ct.trigger('modal_close');
|
||||
window.open($ocms.url('req/idoc') + '?id=' + invid, '_blank'); /* open pdf in new tab */
|
||||
if (cresp.hasFile === true) {
|
||||
window.open($ocms.url('req/idoc') + '?id=' + invid, '_blank'); /* open pdf in new tab, only if a file was actually created */
|
||||
}
|
||||
$ocms.init('req'); /* go back to request list */
|
||||
$inv.rReload();
|
||||
}, error: () => {
|
||||
alert($t.f1);
|
||||
ct.trigger('modal_close');
|
||||
}, complete: () => {
|
||||
l.rC('freeze');
|
||||
}
|
||||
});
|
||||
}, cancel: function (e) {
|
||||
@@ -1546,6 +1550,10 @@ $inv.sprev = (change) => {
|
||||
$inv.rReload();
|
||||
}
|
||||
});
|
||||
}, error: () => {
|
||||
alert($ict.eis);
|
||||
}, complete: () => {
|
||||
l.rC('freeze');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -233,6 +233,14 @@ table.if th.keep, table.if td.keep {
|
||||
content: "\e067";
|
||||
}
|
||||
|
||||
@keyframes fis_spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
.edit_frm .invoice_layout {
|
||||
margin: 2rem 2rem 2rem auto; /* align right */
|
||||
width: 50rem;
|
||||
@@ -518,6 +526,21 @@ table.if th.keep, table.if td.keep {
|
||||
.edit_frm .invoice_layout.freeze::before tr:hover > td.aux > .axf {
|
||||
display: inline-flex;
|
||||
}
|
||||
.edit_frm .invoice_layout.freeze::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
margin: -1.5rem 0 0 -1.5rem;
|
||||
border: 0.4rem solid rgba(255, 255, 255, 0.35);
|
||||
border-top-color: #FFF;
|
||||
border-radius: 50%;
|
||||
z-index: 11;
|
||||
pointer-events: none;
|
||||
animation: fis_spin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
.modal-body .lstfrm {
|
||||
display: block;
|
||||
|
||||
@@ -1490,7 +1490,6 @@ $inv.sprev = (change) => {
|
||||
}
|
||||
$ocms.postXT({
|
||||
url: $ocms.url('req/' + (change === true ?'sedit':'sprep')), data: { invc: JSON.stringify($inv.invcPayload(d)), id: d.invid ||'' }, success: (response) => {
|
||||
l.rC('freeze');
|
||||
let c = $$.dc('imagecollection pdfpreview'), vhr = Math.round(vh() * 0.88), invid = response.id, invtp = response.total;
|
||||
if (invtp > 10) {
|
||||
$$.dc('note warn', c).text($ict.tpe);
|
||||
@@ -1504,15 +1503,20 @@ $inv.sprev = (change) => {
|
||||
$ocms.dlg(c, {
|
||||
size: [vhr, Math.round(vw() * 0.88)], zindex: 50, form: false, button: $rct.crI, confirm: function (e) {
|
||||
let ct = $(this);
|
||||
l.aC('freeze'); /* spinner while the invoice is finalized/emailed on the backend */
|
||||
$ocms.postXT({
|
||||
url: $ocms.url('req/sconf'), data: { id: invid }, success: () => {
|
||||
url: $ocms.url('req/sconf'), data: { id: invid }, success: (cresp) => {
|
||||
ct.trigger('modal_close');
|
||||
window.open($ocms.url('req/idoc') + '?id=' + invid, '_blank'); /* open pdf in new tab */
|
||||
if (cresp.hasFile === true) {
|
||||
window.open($ocms.url('req/idoc') + '?id=' + invid, '_blank'); /* open pdf in new tab, only if a file was actually created */
|
||||
}
|
||||
$ocms.init('req'); /* go back to request list */
|
||||
$inv.rReload();
|
||||
}, error: () => {
|
||||
alert($t.f1);
|
||||
ct.trigger('modal_close');
|
||||
}, complete: () => {
|
||||
l.rC('freeze');
|
||||
}
|
||||
});
|
||||
}, cancel: function (e) {
|
||||
@@ -1527,6 +1531,10 @@ $inv.sprev = (change) => {
|
||||
$inv.rReload();
|
||||
}
|
||||
});
|
||||
}, error: () => {
|
||||
alert($ict.eis);
|
||||
}, complete: () => {
|
||||
l.rC('freeze');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user