@lancom/shared 0.0.186 → 0.0.188

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.
@@ -569,8 +569,8 @@ export default {
569
569
  removeEmailTemplate(id) {
570
570
  return _delete(`admin/email-templates/${id}`);
571
571
  },
572
- fetchPrinters() {
573
- return _get('admin/printers');
572
+ fetchPrinters(type) {
573
+ return _get('admin/printers', { type });
574
574
  },
575
575
  sendToPrinter(job) {
576
576
  return _post('admin/printers/job', job);
@@ -29,10 +29,10 @@
29
29
  <i
30
30
  v-if="togable"
31
31
  class="icon-cancel FAQ__group-caret"
32
- :class="{ active: openedGroup === group.type }"></i>
32
+ :class="{ active: openedGroups.includes(group.type) }"></i>
33
33
  </div>
34
34
  <div
35
- v-show="openedGroup === group.type"
35
+ v-show="openedGroups.includes(group.type)"
36
36
  class="FAQ__group-content">
37
37
  <div
38
38
  v-for="entity in group.entities"
@@ -83,22 +83,20 @@ export default {
83
83
  }
84
84
  },
85
85
  data() {
86
+ const groups = this.groups || [];
86
87
  return {
87
- openedGroup: null,
88
- openedEntities: []
88
+ openedGroups: groups.map(({ type }) => type),
89
+ openedEntities: groups.reduce((items, { entities }) => [...items, ...entities.map(({ _id }) => _id)], [])
89
90
  };
90
91
  },
91
- created() {
92
- if (this.preopenedGroup) {
93
- this.toggleGroup({ type: this.preopenedGroup });
94
- }
95
- if (this.preopenedEntity) {
96
- this.toggleEntity({ _id: this.preopenedEntity });
97
- }
98
- },
99
92
  methods: {
100
93
  toggleGroup({ type }) {
101
- this.openedGroup = this.openedGroup === type ? null : type;
94
+ const index = this.openedGroups.indexOf(type);
95
+ if (~index) {
96
+ this.$delete(this.openedGroups, index);
97
+ } else {
98
+ this.openedGroups.push(type);
99
+ }
102
100
  },
103
101
  toggleEntity({ _id }) {
104
102
  const index = this.openedEntities.indexOf(_id);
@@ -1,10 +1,14 @@
1
1
  <template>
2
2
  <div class="SimpleProductsPriceInfo__wrapper">
3
- <pricing-table :items="sizesPrices" :bordered="true" />
3
+ <pricing-table
4
+ :items="sizesPrices"
5
+ :bordered="true"
6
+ :with-gst="priceIncludeGST" />
4
7
  </div>
5
8
  </template>
6
9
 
7
10
  <script>
11
+ import { mapGetters } from 'vuex';
8
12
  import PricingTable from '@lancom/shared/components/common/pricing_table/pricing-table';
9
13
 
10
14
  export default {
@@ -19,6 +23,7 @@ export default {
19
23
  }
20
24
  },
21
25
  computed: {
26
+ ...mapGetters('product', ['priceIncludeGST']),
22
27
  sizesPrices() {
23
28
  return [...(this.simpleProducts || []).reduce((sizes, product) => {
24
29
  sizes.set(product.size._id, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lancom/shared",
3
- "version": "0.0.186",
3
+ "version": "0.0.188",
4
4
  "description": "lancom common scripts",
5
5
  "author": "e.tokovenko <e.tokovenko@gmail.com>",
6
6
  "repository": {