Skip to content

Commit

Permalink
Display product code in promo conditions and effects (#185)
Browse files Browse the repository at this point in the history
* Add product code to promo effects

Co-authored-by: Ivan Tselishchev <[email protected]>
  • Loading branch information
IvanTsel96 and Ivan Tselishchev authored May 25, 2021
1 parent 79d890b commit 16f17d9
Showing 1 changed file with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
element1.productIds.length > 1
? 'show ' + element1.productIds.length + ' items'
: element1.productNames && element1.productNames.length
? element1.productNames[0]
? element1.productCodes && element1.productCodes.length
? element1.productNames[0] + ' (' + element1.productCodes[0] + ')'
: element1.productNames[0]
: 'select product'
}}
</a>
<a ng-if="!element1.productIds && element1.productId" class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName ? element1.productName : 'select product' }}</a>
</a>
<a ng-if="!element1.productIds && element1.productId" class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName ? element1.productName + ' (' + element1.productCode + ')' : 'select product' }}</a>
<a ng-if="!element1.productIds && !element1.productId" class="__link" ng-click="openItemSelectWizard(element1, true)">{{'select product'}}</a>
</script>
<script type="text/ng-template" id="expression-ConditionCodeContains.html">
Expand Down Expand Up @@ -150,7 +152,7 @@
<div class="form-input __mini __number" ng-show='element1.compareCondition=="Between"'>
<input smart-float num-type="integer" required ng-model="element1.numItemSecond" name="secondValue">
</div>items of entry
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productId?element1.productName: 'select entry' }}</a>
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productId?element1.productName + ' (' + element1.productCode + ')' : 'select entry' }}</a>
are in shopping cart
<ul class="menu __context" role="menu" id="compareCondition_menu{{element1.id}}">
<li class="menu-item" ng-click='element1.compareCondition="Exactly";'>exactly</li>
Expand Down Expand Up @@ -185,14 +187,14 @@
<div class="form-input __mini __number">
<input smart-float num-type="integer" required ng-model="element1.numItem">
</div>free items of product
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName?element1.productName: 'select product' }}</a>
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName?element1.productName + ' (' + element1.productCode + ')' : 'select product' }}</a>
</script>
<script type="text/ng-template" id="expression-RewardItemGiftNumItem.html">
Gift
<div class="form-input __mini __number">
<input smart-float num-type="integer" required ng-model="element1.quantity">
</div>of product
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName?element1.productName: 'select product' }}</a> where:
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName?element1.productName + ' (' + element1.productCode + ')' : 'select product' }}</a> where:
<table>
<tr>
<td>name is</td>
Expand Down Expand Up @@ -233,14 +235,14 @@
<div class="form-input __mini">
<input money required ng-model="element1.amount">
</div>off for
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName?element1.productName: 'select product' }}</a>
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName?element1.productName + ' (' + element1.productCode + ')' : 'select product' }}</a>
</script>
<script type="text/ng-template" id="expression-RewardItemGetOfRel.html">
Get
<div class="form-input __mini __number">
<input smart-float num-type="float" required ng-model="element1.amount">
</div>% off
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName?element1.productName: 'select product' }}</a>
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName?element1.productName + ' (' + element1.productCode + ')' : 'select product' }}</a>
not to exceed $
<div class="form-input __mini">
<input money required ng-model="element1.maxLimit">
Expand All @@ -255,7 +257,7 @@
<div class="form-input __mini __number">
<input smart-float num-type="integer" required ng-model="element1.numItem">
</div>items of entry
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName?element1.productName: 'select entry' }}</a>
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName?element1.productName + ' (' + element1.productCode + ')' : 'select entry' }}</a>
</script>
<script type="text/ng-template" id="expression-RewardItemGetOfRelForNum.html">
Get
Expand All @@ -270,7 +272,7 @@
</div>
<div>
items of entry
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName?element1.productName: 'select entry' }}</a>
<a class="__link" ng-click="openItemSelectWizard(element1)">{{element1.productName?element1.productName + ' (' + element1.productCode + ')' : 'select entry' }}</a>

</div>
</script>
Expand Down Expand Up @@ -338,7 +340,7 @@
<input smart-float num-type="integer" required ng-model="element1.inEveryNthQuantity">
</div>
items of entry
<a class="__link" ng-click="openItemSelectWizard(element1.product)">{{ element1.product && element1.product.productName ? element1.product.productName : 'select entry' }}</a>
<a class="__link" ng-click="openItemSelectWizard(element1.product)">{{ element1.product && element1.product.productName ? element1.product.productName + ' (' + element1.product.productCode + ')' : 'select entry' }}</a>
<div>
Get
<div class="form-input __mini __number">
Expand All @@ -360,13 +362,13 @@
<input smart-float num-type="integer" required ng-model="element1.forNthQuantity">
</div>
of entry
<a class="__link" ng-click="openItemSelectWizard(element1.product)">{{ element1.product && element1.product.productName ? element1.product.productName : 'select entry' }}</a>
<a class="__link" ng-click="openItemSelectWizard(element1.product)">{{ element1.product && element1.product.productName ? element1.product.productName + ' (' + element1.product.productCode + ')' : 'select entry' }}</a>
in every
<div class="form-input __mini __number">
<input smart-float num-type="integer" required ng-model="element1.inEveryNthQuantity">
</div>
items of entry
<a class="__link" ng-click="openItemSelectWizard(element1.conditionalProduct)">{{ element1.conditionalProduct && element1.conditionalProduct.productName ? element1.conditionalProduct.productName: 'select entry' }}</a>
<a class="__link" ng-click="openItemSelectWizard(element1.conditionalProduct)">{{ element1.conditionalProduct && element1.conditionalProduct.productName ? element1.conditionalProduct.productName + ' (' + element1.conditionalProduct.productCode + ')' : 'select entry' }}</a>
<div>
Get
<div class="form-input __mini __number">
Expand All @@ -389,7 +391,7 @@
</script>
<script type="text/ng-template" id="expression-ExcludingProductCondition.html">
items of entry
<a class="__link" ng-click="openItemSelectWizard(element)">{{element.productId?element.productName || element.productId: 'select entry' }}</a>
<a class="__link" ng-click="openItemSelectWizard(element)">{{element.productName?element.productName + ' (' + element.productCode + ')' : 'select entry' }}</a>
</script>
<script type="text/ng-template" id="expression-UserGroupsContainsCondition.html">
User groups contains
Expand Down

0 comments on commit 16f17d9

Please sign in to comment.