@managesome/eposmatic-toolkit 0.2.220 → 0.2.222
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.
|
@@ -883,6 +883,9 @@ const getLegacyItemReportHead = ({ monochrome, width, zeroPadding }) => {
|
|
|
883
883
|
function getLegacyItemReportBody({ categoriesChannel, itemsChannels, modifiersChannel, currency_symbol, from, to, tenantName, menuName, itemNetAmount, count, isFilterApplied, monochrome, showRevenue, }) {
|
|
884
884
|
// ======================>>>><<<<=====================
|
|
885
885
|
const shouldShowRevenue = showRevenue ?? true;
|
|
886
|
+
const dealTextColor = monochrome ? '#000000' : '#9e9e9e';
|
|
887
|
+
const dealBadgeColor = monochrome ? '#000000' : '#f1c24a';
|
|
888
|
+
const dealMetaColor = monochrome ? '#000000' : '#777';
|
|
886
889
|
let itemSales = '';
|
|
887
890
|
if (itemsChannels != null && itemsChannels.length > 0) {
|
|
888
891
|
let categoryItems = '';
|
|
@@ -895,9 +898,9 @@ function getLegacyItemReportBody({ categoriesChannel, itemsChannels, modifiersCh
|
|
|
895
898
|
const hasDeal = dealCount > 0;
|
|
896
899
|
for (const subItem of item.subChannels) {
|
|
897
900
|
const isReferenced = subItem.referenceId != null;
|
|
898
|
-
const nameStyle = isReferenced ?
|
|
901
|
+
const nameStyle = isReferenced ? `color:${dealTextColor};font-style:italic;` : '';
|
|
899
902
|
const dealBadge = isReferenced
|
|
900
|
-
?
|
|
903
|
+
? `<span style="border:1px solid ${dealBadgeColor};color:${dealBadgeColor};border-radius:10px;padding:2px 6px;margin-left:6px;font-size:12px;">Deal Item</span>`
|
|
901
904
|
: '';
|
|
902
905
|
subItems += `<div class="css-1oxswqj-askk">
|
|
903
906
|
<div class="css-1qfrzlclkjs" style="margin-left: ${subItem.level * 30}px;"></div>
|
|
@@ -919,14 +922,14 @@ function getLegacyItemReportBody({ categoriesChannel, itemsChannels, modifiersCh
|
|
|
919
922
|
<h6 class="css-zfkluy-jskk">${item.count}</h6>
|
|
920
923
|
<h6 class="css-21997j-jskk">${item.name}</h6>
|
|
921
924
|
${hasDeal
|
|
922
|
-
? `<p class="css-1jq5hv-jskk" style="color
|
|
925
|
+
? `<p class="css-1jq5hv-jskk" style="color:${dealMetaColor};font-size:10px;line-height:12px;display:block;margin-top:2px;">Individual: ${individualCount} • Deal: ${dealCount}</p>`
|
|
923
926
|
: ''}
|
|
924
927
|
</div>
|
|
925
928
|
${shouldShowRevenue && item.grossAmount > 0
|
|
926
929
|
? `<h6 class="css-1z023sx-jskk">${(0, common_1.localeAmount)(currency_symbol, item.grossAmount)}</h6>`
|
|
927
930
|
: ''}
|
|
928
931
|
${shouldShowRevenue && hasDeal && item.grossAmount > 0
|
|
929
|
-
? `<p class="css-1jq5hv-jskk" style="color
|
|
932
|
+
? `<p class="css-1jq5hv-jskk" style="color:${dealMetaColor};font-size:10px;line-height:12px;display:block;margin-top:2px;">Individual revenue</p>`
|
|
930
933
|
: ''}
|
|
931
934
|
</div>
|
|
932
935
|
${subItems}
|