@bcrs-shared-components/staff-payment 2.1.22 → 2.1.24

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.
@@ -1,13 +1,12 @@
1
+ import type { Meta } from '@storybook/vue'
1
2
  import { StaffPayment } from './index'
2
3
  import { StaffPaymentOptions } from '@bcrs-shared-components/enums'
3
4
  import { StaffPaymentIF } from '@bcrs-shared-components/interfaces'
4
5
 
5
- export default {
6
- title: 'component/StaffPayment',
7
- component: StaffPayment,
8
- argTypes: {
9
- }
6
+ const meta: Meta<typeof StaffPayment> = {
7
+ title: 'component/StaffPayment'
10
8
  }
9
+ export default meta
11
10
 
12
11
  const Template = (args, { argTypes }) => ({
13
12
  props: Object.keys(argTypes),
@@ -25,6 +24,6 @@ const staffPaymentData: StaffPaymentIF = {
25
24
  }
26
25
 
27
26
  export const Default = Template.bind({})
28
- Default.args = {
27
+ Default['args'] = {
29
28
  staffPaymentData: staffPaymentData
30
29
  }
package/StaffPayment.vue CHANGED
@@ -1,18 +1,41 @@
1
1
  <template>
2
2
  <div id="staff-payment-container">
3
3
  <v-row no-gutters>
4
- <v-col v-if="displaySideLabel" cols="12" sm="3" class="pr-4 pb-4">
5
- <label class="title-label" :class="{'error-text': invalidSection}">Payment</label>
4
+ <v-col
5
+ v-if="displaySideLabel"
6
+ cols="12"
7
+ sm="3"
8
+ class="pr-4 pb-4"
9
+ >
10
+ <label
11
+ class="title-label"
12
+ :class="{'error-text': invalidSection}"
13
+ >Payment</label>
6
14
  </v-col>
7
15
 
8
- <v-col cols="12" :sm="displaySideLabel ? 9 : 12">
9
- <v-radio-group class="payment-group" v-model="paymentOption">
16
+ <v-col
17
+ cols="12"
18
+ :sm="displaySideLabel ? 9 : 12"
19
+ >
20
+ <v-radio-group
21
+ v-model="paymentOption"
22
+ class="payment-group"
23
+ >
10
24
  <!-- Cash or Cheque radio button and form -->
11
- <v-radio id="fas-radio" class="mb-0" label="Cash or Cheque" :value="StaffPaymentOptions.FAS" />
12
- <v-form class="mt-4 ml-8" ref="fasForm" v-model="fasFormValid">
25
+ <v-radio
26
+ id="fas-radio"
27
+ class="mb-0"
28
+ label="Cash or Cheque"
29
+ :value="StaffPaymentOptions.FAS"
30
+ />
31
+ <v-form
32
+ ref="fasForm"
33
+ v-model="fasFormValid"
34
+ class="mt-4 ml-8"
35
+ >
13
36
  <v-text-field
14
- filled
15
37
  id="routing-slip-number-textfield"
38
+ filled
16
39
  label="Routing Slip Number"
17
40
  :value="staffPaymentData.routingSlipNumber"
18
41
  :rules="validate ? routingSlipNumberRules : []"
@@ -24,11 +47,20 @@
24
47
  </v-form>
25
48
 
26
49
  <!-- BC Online radio button and form -->
27
- <v-radio id="bcol-radio" class="mb-0 pt-2" label="BC Online" :value="StaffPaymentOptions.BCOL" />
28
- <v-form class="mt-4 ml-8" ref="bcolForm" v-model="bcolFormValid">
50
+ <v-radio
51
+ id="bcol-radio"
52
+ class="mb-0 pt-2"
53
+ label="BC Online"
54
+ :value="StaffPaymentOptions.BCOL"
55
+ />
56
+ <v-form
57
+ ref="bcolForm"
58
+ v-model="bcolFormValid"
59
+ class="mt-4 ml-8"
60
+ >
29
61
  <v-text-field
30
- filled
31
62
  id="bcol-account-number-textfield"
63
+ filled
32
64
  label="BC Online Account Number"
33
65
  :value="staffPaymentData.bcolAccountNumber"
34
66
  :rules="validate ? bcolAccountNumberRules : []"
@@ -38,8 +70,8 @@
38
70
  @input="emitStaffPaymentData({ option: StaffPaymentOptions.BCOL, bcolAccountNumber: $event })"
39
71
  />
40
72
  <v-text-field
41
- filled
42
73
  id="dat-number-textfield"
74
+ filled
43
75
  label="DAT Number"
44
76
  :value="staffPaymentData.datNumber"
45
77
  :rules="validate ? datNumberRules : []"
@@ -52,18 +84,23 @@
52
84
  ref="folioNumberInputRef"
53
85
  :folioNumber="staffPaymentData.folioNumber"
54
86
  :disabled="paymentOption === StaffPaymentOptions.FAS || paymentOption === StaffPaymentOptions.NO_FEE"
87
+ validate="true"
55
88
  @focus="paymentOption = StaffPaymentOptions.BCOL"
56
89
  @emitFolioNumber="paymentOption === StaffPaymentOptions.BCOL &&
57
90
  emitStaffPaymentData({ option: StaffPaymentOptions.BCOL, folioNumber: $event })"
58
- validate="true"
59
91
  />
60
92
  </v-form>
61
93
 
62
94
  <!-- No Fee radio button -->
63
- <v-radio id="no-fee-radio" class="mb-0 pt-2" label="No Fee" :value="StaffPaymentOptions.NO_FEE" />
95
+ <v-radio
96
+ id="no-fee-radio"
97
+ class="mb-0 pt-2"
98
+ label="No Fee"
99
+ :value="StaffPaymentOptions.NO_FEE"
100
+ />
64
101
 
65
102
  <template v-if="displayPriorityCheckbox">
66
- <v-divider class="mt-6"></v-divider>
103
+ <v-divider class="mt-6" />
67
104
 
68
105
  <!-- Priority checkbox -->
69
106
  <v-checkbox
@@ -204,6 +241,7 @@ export default class StaffPayment extends Vue {
204
241
 
205
242
  /** Watches for change to FAS form validity. */
206
243
  @Watch('fasFormValid')
244
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
207
245
  private onFasFormValid (val: boolean) {
208
246
  // ignore initial condition
209
247
  if (!this.isMounted) return
@@ -212,6 +250,7 @@ export default class StaffPayment extends Vue {
212
250
 
213
251
  /** Watches for change to BCOL form validity. */
214
252
  @Watch('bcolFormValid')
253
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
215
254
  private onBcolFormValid (val: boolean) {
216
255
  // ignore initial condition
217
256
  if (!this.isMounted) return
package/package.json CHANGED
@@ -1,14 +1,17 @@
1
1
  {
2
2
  "name": "@bcrs-shared-components/staff-payment",
3
- "version": "2.1.22",
3
+ "version": "2.1.24",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "dependencies": {
8
- "@bcrs-shared-components/enums": "^1.0.41",
9
- "@bcrs-shared-components/folio-number-input": "^1.1.22",
10
- "@bcrs-shared-components/interfaces": "^1.0.65",
8
+ "@bcrs-shared-components/enums": "^1.0.43",
9
+ "@bcrs-shared-components/folio-number-input": "^1.1.24",
10
+ "@bcrs-shared-components/interfaces": "^1.0.67",
11
+ "vue": "^2.7.14"
12
+ },
13
+ "devDependencies": {
11
14
  "vue-property-decorator": "^9.1.2"
12
15
  },
13
- "gitHead": "83c6bb9ef06117fe581381b5e8e86a4fddbbe9e7"
16
+ "gitHead": "971ab584d46f6f4cd1c25dcde622e9d6c39f08f8"
14
17
  }