@managesome/eposmatic-toolkit 0.2.235 → 0.2.237
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -425,8 +425,8 @@ const getLegacyItemReportHead = ({ monochrome, width, zeroPadding }) => {
|
|
|
425
425
|
box-sizing: inherit;
|
|
426
426
|
display: flex;
|
|
427
427
|
flex-direction: row;
|
|
428
|
-
-webkit-box-align:
|
|
429
|
-
align-items:
|
|
428
|
+
-webkit-box-align: start;
|
|
429
|
+
align-items: flex-start;
|
|
430
430
|
margin: 0;
|
|
431
431
|
}
|
|
432
432
|
|
|
@@ -898,6 +898,9 @@ function getLegacyItemReportBody({ categoriesChannel, itemsChannels, modifiersCh
|
|
|
898
898
|
const hasDeal = dealCount > 0;
|
|
899
899
|
for (const subItem of item.subChannels) {
|
|
900
900
|
const isReferenced = subItem.referenceId != null;
|
|
901
|
+
const subDealCount = subItem.dealCount ?? 0;
|
|
902
|
+
const subIndividualCount = subItem.individualCount ?? Math.max(0, subItem.count - subDealCount);
|
|
903
|
+
const showModifierSplit = !isReferenced && subDealCount > 0;
|
|
901
904
|
const nameStyle = isReferenced ? `color:${dealTextColor};font-style:italic;` : '';
|
|
902
905
|
const dealBadge = isReferenced
|
|
903
906
|
? `<span style="border:1px solid ${dealBadgeColor};color:${dealBadgeColor};border-radius:10px;padding:2px 6px;margin-left:6px;font-size:12px;">Deal Item</span>`
|
|
@@ -907,7 +910,12 @@ function getLegacyItemReportBody({ categoriesChannel, itemsChannels, modifiersCh
|
|
|
907
910
|
<div class="css-1x9oqjh-askk">
|
|
908
911
|
<div class="css-95rbei-askk">
|
|
909
912
|
<h6 class="css-1kyyrbe-jskk">${subItem.count}</h6>
|
|
910
|
-
<
|
|
913
|
+
<div style="display:flex;flex-direction:column;gap:0;">
|
|
914
|
+
<p class="css-1jq5hv-jskk" style="${nameStyle}">${subItem.name}${dealBadge}</p>
|
|
915
|
+
${showModifierSplit
|
|
916
|
+
? `<p class="css-1jq5hv-jskk" style="color:${dealMetaColor};font-size:10px;line-height:12px;display:block;margin-top:2px;">Individual: ${subIndividualCount} • Deal: ${subDealCount}</p>`
|
|
917
|
+
: ''}
|
|
918
|
+
</div>
|
|
911
919
|
</div>
|
|
912
920
|
|
|
913
921
|
${shouldShowRevenue && subItem.grossAmount > 0
|
|
@@ -920,10 +928,12 @@ function getLegacyItemReportBody({ categoriesChannel, itemsChannels, modifiersCh
|
|
|
920
928
|
<div class="css-1aua8yd-askk">
|
|
921
929
|
<div class="css-95rbei-askk">
|
|
922
930
|
<h6 class="css-zfkluy-jskk">${item.count}</h6>
|
|
923
|
-
<
|
|
924
|
-
|
|
931
|
+
<div style="display:flex;flex-direction:column;gap:0;">
|
|
932
|
+
<h6 class="css-21997j-jskk" style="margin-left:4px;">${item.name}</h6>
|
|
933
|
+
${hasDeal
|
|
925
934
|
? `<p class="css-1jq5hv-jskk" style="color:${dealMetaColor};font-size:10px;line-height:12px;display:block;margin-top:2px;">Individual: ${individualCount} • Deal: ${dealCount}</p>`
|
|
926
935
|
: ''}
|
|
936
|
+
</div>
|
|
927
937
|
</div>
|
|
928
938
|
${shouldShowRevenue && item.grossAmount > 0
|
|
929
939
|
? `<h6 class="css-1z023sx-jskk">${(0, common_1.localeAmount)(currency_symbol, item.grossAmount)}</h6>`
|
|
@@ -960,13 +970,21 @@ function getLegacyItemReportBody({ categoriesChannel, itemsChannels, modifiersCh
|
|
|
960
970
|
const getExtraSales = (title, channels) => {
|
|
961
971
|
let items = '';
|
|
962
972
|
for (const channel of channels) {
|
|
973
|
+
const channelDealCount = channel.dealCount ?? 0;
|
|
974
|
+
const channelIndividualCount = channel.individualCount ?? Math.max(0, channel.count - channelDealCount);
|
|
975
|
+
const showChannelSplit = channelDealCount > 0;
|
|
963
976
|
items += `<div class="css-nen11g-askk">
|
|
964
977
|
<div class="css-1aua8yd-askk">
|
|
965
978
|
<div class="css-95rbei-askk">
|
|
966
979
|
<h6 class="css-zfkluy-jskk">${channel.count}</h6>
|
|
967
|
-
<
|
|
968
|
-
|
|
969
|
-
|
|
980
|
+
<div style="display:flex;flex-direction:column;gap:0;">
|
|
981
|
+
<h6 class="css-21997j-jskk" style="margin-left:4px;">
|
|
982
|
+
${channel.name}
|
|
983
|
+
</h6>
|
|
984
|
+
${showChannelSplit
|
|
985
|
+
? `<p class="css-1jq5hv-jskk" style="color:${dealMetaColor};font-size:10px;line-height:12px;display:block;margin-top:2px;">Individual: ${channelIndividualCount} • Deal: ${channelDealCount}</p>`
|
|
986
|
+
: ''}
|
|
987
|
+
</div>
|
|
970
988
|
</div>
|
|
971
989
|
${shouldShowRevenue && channel.grossAmount > 0
|
|
972
990
|
? `<h6 class="css-1z023sx-jskk">${(0, common_1.localeAmount)(currency_symbol, channel.grossAmount)}</h6>`
|
|
@@ -1360,8 +1378,8 @@ const getNewItemReportHead = ({ zeroPadding, monochrome }) => {
|
|
|
1360
1378
|
box-sizing: inherit;
|
|
1361
1379
|
display: flex;
|
|
1362
1380
|
flex-direction: row;
|
|
1363
|
-
-webkit-box-align:
|
|
1364
|
-
align-items:
|
|
1381
|
+
-webkit-box-align: start;
|
|
1382
|
+
align-items: flex-start;
|
|
1365
1383
|
margin: 0;
|
|
1366
1384
|
}
|
|
1367
1385
|
|
|
@@ -1792,8 +1810,8 @@ const getNewItemReportHead = ({ zeroPadding, monochrome }) => {
|
|
|
1792
1810
|
box-sizing: inherit;
|
|
1793
1811
|
display: flex;
|
|
1794
1812
|
flex-direction: row;
|
|
1795
|
-
-webkit-box-align:
|
|
1796
|
-
align-items:
|
|
1813
|
+
-webkit-box-align: start;
|
|
1814
|
+
align-items: flex-start;
|
|
1797
1815
|
margin: 0px;
|
|
1798
1816
|
}
|
|
1799
1817
|
|
|
@@ -1842,8 +1860,8 @@ const getNewItemReportHead = ({ zeroPadding, monochrome }) => {
|
|
|
1842
1860
|
box-sizing: inherit;
|
|
1843
1861
|
display: flex;
|
|
1844
1862
|
flex-direction: row;
|
|
1845
|
-
-webkit-box-align:
|
|
1846
|
-
align-items:
|
|
1863
|
+
-webkit-box-align: start;
|
|
1864
|
+
align-items: flex-start;
|
|
1847
1865
|
}
|
|
1848
1866
|
|
|
1849
1867
|
.css-zfkluz{
|
|
@@ -2154,6 +2172,9 @@ function getNewItemReportBody({ categoriesChannel, itemsChannels, modifiersChann
|
|
|
2154
2172
|
const hasDeal = dealCount > 0;
|
|
2155
2173
|
for (const subItem of item.subChannels) {
|
|
2156
2174
|
const isReferenced = subItem.referenceId != null;
|
|
2175
|
+
const subDealCount = subItem.dealCount ?? 0;
|
|
2176
|
+
const subIndividualCount = subItem.individualCount ?? Math.max(0, subItem.count - subDealCount);
|
|
2177
|
+
const showModifierSplit = !isReferenced && subDealCount > 0;
|
|
2157
2178
|
const nameStyle = isReferenced ? 'color:#9e9e9e;font-style:italic;' : '';
|
|
2158
2179
|
const dealBadge = isReferenced
|
|
2159
2180
|
? '<span style="border:1px solid #f1c24a;color:#f1c24a;border-radius:10px;padding:2px 6px;margin-left:6px;font-size:12px;">Deal Item</span>'
|
|
@@ -2163,7 +2184,12 @@ function getNewItemReportBody({ categoriesChannel, itemsChannels, modifiersChann
|
|
|
2163
2184
|
<div class="css-199tt1z">
|
|
2164
2185
|
<div class="css-lmzl00">
|
|
2165
2186
|
<h6 class="css-1tjle8i">${subItem.count}</h6>
|
|
2166
|
-
<
|
|
2187
|
+
<div style="display:flex;flex-direction:column;gap:0;">
|
|
2188
|
+
<p class="css-1qqbci" style="${nameStyle}">${subItem.name}${dealBadge}</p>
|
|
2189
|
+
${showModifierSplit
|
|
2190
|
+
? `<p class="css-1qqbci" style="color:#777;font-size:10px;line-height:12px;display:block;margin-top:2px;">Individual: ${subIndividualCount} • Deal: ${subDealCount}</p>`
|
|
2191
|
+
: ''}
|
|
2192
|
+
</div>
|
|
2167
2193
|
</div>
|
|
2168
2194
|
|
|
2169
2195
|
${shouldShowRevenue && subItem.grossAmount
|
|
@@ -2187,12 +2213,14 @@ function getNewItemReportBody({ categoriesChannel, itemsChannels, modifiersChann
|
|
|
2187
2213
|
<h6 class="css-zfkluz">
|
|
2188
2214
|
${item.count}
|
|
2189
2215
|
</h6>
|
|
2190
|
-
<
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2216
|
+
<div style="display:flex;flex-direction:column;gap:0;">
|
|
2217
|
+
<h6 class="css-21997z" style="margin-left:4px;">
|
|
2218
|
+
${item.name}
|
|
2219
|
+
</h6>
|
|
2220
|
+
${hasDeal
|
|
2194
2221
|
? `<p class="css-1qqbci" style="color:#777;font-size:10px;line-height:12px;display:block;margin-top:2px;">Individual: ${individualCount} • Deal: ${dealCount}</p>`
|
|
2195
2222
|
: ''}
|
|
2223
|
+
</div>
|
|
2196
2224
|
</div>
|
|
2197
2225
|
</td>
|
|
2198
2226
|
${shouldShowRevenue
|
|
@@ -2330,15 +2358,23 @@ function getNewItemReportBody({ categoriesChannel, itemsChannels, modifiersChann
|
|
|
2330
2358
|
if (categoriesChannel != null && categoriesChannel.length > 0) {
|
|
2331
2359
|
let categories = '';
|
|
2332
2360
|
for (const category of categoriesChannel) {
|
|
2361
|
+
const categoryDealCount = category.dealCount ?? 0;
|
|
2362
|
+
const categoryIndividualCount = category.individualCount ?? Math.max(0, category.count - categoryDealCount);
|
|
2363
|
+
const showCategorySplit = categoryDealCount > 0;
|
|
2333
2364
|
categories += `<tr class="css-1qi8dkl" style="border-bottom: 1px solid rgb(250, 250, 250);">
|
|
2334
2365
|
<td class="css-5u79pd">
|
|
2335
2366
|
<div class="css-95rbey">
|
|
2336
2367
|
<h6 class="css-zfkluz">
|
|
2337
2368
|
${category.count}
|
|
2338
2369
|
</h6>
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2370
|
+
<div style="display:flex;flex-direction:column;gap:0;">
|
|
2371
|
+
<h6 class="css-21997z" style="margin-left:4px;">
|
|
2372
|
+
${category.name}
|
|
2373
|
+
</h6>
|
|
2374
|
+
${showCategorySplit
|
|
2375
|
+
? `<p class="css-1qqbci" style="color:#777;font-size:10px;line-height:12px;display:block;margin-top:2px;">Individual: ${categoryIndividualCount} • Deal: ${categoryDealCount}</p>`
|
|
2376
|
+
: ''}
|
|
2377
|
+
</div>
|
|
2342
2378
|
</div>
|
|
2343
2379
|
</td>
|
|
2344
2380
|
${shouldShowRevenue
|
|
@@ -2425,13 +2461,21 @@ function getNewItemReportBody({ categoriesChannel, itemsChannels, modifiersChann
|
|
|
2425
2461
|
const getExtraSales = (title, channels) => {
|
|
2426
2462
|
let items = '';
|
|
2427
2463
|
for (const channel of channels) {
|
|
2464
|
+
const channelDealCount = channel.dealCount ?? 0;
|
|
2465
|
+
const channelIndividualCount = channel.individualCount ?? Math.max(0, channel.count - channelDealCount);
|
|
2466
|
+
const showChannelSplit = channelDealCount > 0;
|
|
2428
2467
|
items += `<div class="css-nen11g-askk">
|
|
2429
2468
|
<div class="css-1aua8yd-askk">
|
|
2430
2469
|
<div class="css-95rbei-askk">
|
|
2431
2470
|
<h6 class="css-zfkluy-jskk">${channel.count}</h6>
|
|
2432
|
-
<
|
|
2433
|
-
|
|
2434
|
-
|
|
2471
|
+
<div style="display:flex;flex-direction:column;gap:0;">
|
|
2472
|
+
<h6 class="css-21997j-jskk" style="margin-left:4px;">
|
|
2473
|
+
${channel.name}
|
|
2474
|
+
</h6>
|
|
2475
|
+
${showChannelSplit
|
|
2476
|
+
? `<p class="css-1jq5hv-jskk" style="color:#777;font-size:10px;line-height:12px;display:block;margin-top:2px;">Individual: ${channelIndividualCount} • Deal: ${channelDealCount}</p>`
|
|
2477
|
+
: ''}
|
|
2478
|
+
</div>
|
|
2435
2479
|
</div>
|
|
2436
2480
|
${shouldShowRevenue && channel.grossAmount > 0
|
|
2437
2481
|
? `<h6 class="css-1z023sx-jskk">${(0, common_1.localeAmount)(currency_symbol, channel.grossAmount)}</h6>`
|