@bcrs-shared-components/effective-date-time 1.1.21 → 1.1.23
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.
- package/EffectiveDateTime.stories.ts +5 -5
- package/EffectiveDateTime.vue +69 -21
- package/package.json +9 -5
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { Meta } from '@storybook/vue'
|
|
1
2
|
import { EffectiveDateTime } from './index'
|
|
2
3
|
import Vuetify from 'vuetify'
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
title: 'component/EffectiveDateTime'
|
|
6
|
-
component: EffectiveDateTime,
|
|
7
|
-
argTypes: {}
|
|
5
|
+
const meta: Meta<typeof EffectiveDateTime> = {
|
|
6
|
+
title: 'component/EffectiveDateTime'
|
|
8
7
|
}
|
|
8
|
+
export default meta
|
|
9
9
|
|
|
10
10
|
const Template = (args, { argTypes }) => ({
|
|
11
11
|
vuetify: new Vuetify({ iconfont: 'mdi' }),
|
|
@@ -15,7 +15,7 @@ const Template = (args, { argTypes }) => ({
|
|
|
15
15
|
})
|
|
16
16
|
|
|
17
17
|
export const Default = Template.bind({})
|
|
18
|
-
Default
|
|
18
|
+
Default['args'] = {
|
|
19
19
|
parseInitial: true,
|
|
20
20
|
currentJsDate: new Date(),
|
|
21
21
|
effectiveDateTime: {
|
package/EffectiveDateTime.vue
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-card
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<v-card
|
|
3
|
+
id="effective-date-time-box"
|
|
4
|
+
flat
|
|
5
|
+
>
|
|
6
|
+
<v-radio-group
|
|
7
|
+
v-model="effectiveDateType"
|
|
8
|
+
column
|
|
9
|
+
class="pt-0 mt-0"
|
|
10
|
+
>
|
|
11
|
+
<v-radio
|
|
12
|
+
label="Immediate (date and time of filing)"
|
|
13
|
+
:value="EffectiveDateTypes.IMMEDIATE"
|
|
14
|
+
/>
|
|
15
|
+
<v-radio
|
|
16
|
+
label="A date and time in the future"
|
|
17
|
+
:value="EffectiveDateTypes.FUTURE_EFFECTIVE"
|
|
18
|
+
/>
|
|
6
19
|
</v-radio-group>
|
|
7
20
|
|
|
8
|
-
<v-form
|
|
21
|
+
<v-form
|
|
22
|
+
ref="form"
|
|
23
|
+
class="date-time-selectors"
|
|
24
|
+
>
|
|
9
25
|
<DatePicker
|
|
10
26
|
ref="datePickerRef"
|
|
11
27
|
title="Date"
|
|
@@ -19,51 +35,83 @@
|
|
|
19
35
|
/>
|
|
20
36
|
|
|
21
37
|
<v-row>
|
|
22
|
-
<v-col
|
|
38
|
+
<v-col
|
|
39
|
+
cols="12"
|
|
40
|
+
sm="6"
|
|
41
|
+
md="3"
|
|
42
|
+
>
|
|
23
43
|
<v-combobox
|
|
24
44
|
id="hour-selector"
|
|
25
45
|
ref="hourSelector"
|
|
46
|
+
v-model="selectHour"
|
|
26
47
|
filled
|
|
27
48
|
class="mr-1"
|
|
28
|
-
v-model="selectHour"
|
|
29
49
|
label="Hour"
|
|
30
50
|
:items="hours"
|
|
31
51
|
:disabled="!isFutureEffective"
|
|
32
|
-
:rules="hourRules"
|
|
52
|
+
:rules="hourRules"
|
|
53
|
+
/>
|
|
33
54
|
</v-col>
|
|
34
|
-
<span
|
|
35
|
-
|
|
55
|
+
<span
|
|
56
|
+
class="time-colon"
|
|
57
|
+
:class="{ 'disabled': !isFutureEffective }"
|
|
58
|
+
>:</span>
|
|
59
|
+
<v-col
|
|
60
|
+
cols="12"
|
|
61
|
+
sm="6"
|
|
62
|
+
md="3"
|
|
63
|
+
>
|
|
36
64
|
<v-combobox
|
|
37
65
|
id="minute-selector"
|
|
38
66
|
ref="minuteSelector"
|
|
67
|
+
v-model="selectMinute"
|
|
39
68
|
filled
|
|
40
69
|
class="ml-1"
|
|
41
|
-
v-model="selectMinute"
|
|
42
70
|
label="Minute"
|
|
43
71
|
:items="minutes"
|
|
44
72
|
:disabled="!isFutureEffective"
|
|
45
|
-
:rules="minuteRules"
|
|
73
|
+
:rules="minuteRules"
|
|
74
|
+
/>
|
|
46
75
|
</v-col>
|
|
47
|
-
<v-col
|
|
76
|
+
<v-col
|
|
77
|
+
cols="12"
|
|
78
|
+
sm="6"
|
|
79
|
+
md="3"
|
|
80
|
+
>
|
|
48
81
|
<v-select
|
|
49
82
|
id="period-selector"
|
|
50
|
-
filled
|
|
51
83
|
v-model="selectPeriod"
|
|
84
|
+
filled
|
|
52
85
|
:items="timePeriod"
|
|
53
|
-
:disabled="!isFutureEffective"
|
|
86
|
+
:disabled="!isFutureEffective"
|
|
87
|
+
/>
|
|
54
88
|
</v-col>
|
|
55
|
-
<v-col
|
|
56
|
-
|
|
89
|
+
<v-col
|
|
90
|
+
cols="12"
|
|
91
|
+
sm="6"
|
|
92
|
+
md="3"
|
|
93
|
+
class="label-col"
|
|
94
|
+
>
|
|
95
|
+
<span
|
|
96
|
+
class="time-zone-label"
|
|
97
|
+
:class="{ 'disabled': !isFutureEffective }"
|
|
98
|
+
>Pacific time</span>
|
|
57
99
|
</v-col>
|
|
58
100
|
</v-row>
|
|
59
101
|
|
|
60
102
|
<!-- display validation alert only after date and time have been entered -->
|
|
61
103
|
<v-row v-if="isFutureEffective && dateText && (selectHour.length > 0) && (selectMinute.length > 0)">
|
|
62
104
|
<v-col class="validation-alert">
|
|
63
|
-
<p
|
|
105
|
+
<p
|
|
106
|
+
v-if="isUnderTime"
|
|
107
|
+
class="validation-alert-msg"
|
|
108
|
+
>
|
|
64
109
|
The time must be at least {{ dateToPacificTime(minDate) }} for the selected date
|
|
65
110
|
</p>
|
|
66
|
-
<p
|
|
111
|
+
<p
|
|
112
|
+
v-if="isOverTime"
|
|
113
|
+
class="validation-alert-msg"
|
|
114
|
+
>
|
|
67
115
|
The time must be at most {{ dateToPacificTime(maxDate) }} for the selected date
|
|
68
116
|
</p>
|
|
69
117
|
</v-col>
|
|
@@ -131,8 +179,8 @@ export default class EffectiveDateTime extends Mixins(DateMixin) {
|
|
|
131
179
|
|
|
132
180
|
// V-model values
|
|
133
181
|
private effectiveDateType: EffectiveDateTypes = null
|
|
134
|
-
private datePicker
|
|
135
|
-
private dateText
|
|
182
|
+
private datePicker = ''
|
|
183
|
+
private dateText = ''
|
|
136
184
|
private selectHour: string[] = []
|
|
137
185
|
private selectMinute: string[] = []
|
|
138
186
|
private selectPeriod = PeriodTypes.AM
|
package/package.json
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bcrs-shared-components/effective-date-time",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.23",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@bcrs-shared-components/date-picker": "^1.2.
|
|
9
|
-
"@bcrs-shared-components/enums": "^1.0.
|
|
10
|
-
"@bcrs-shared-components/interfaces": "^1.0.
|
|
8
|
+
"@bcrs-shared-components/date-picker": "^1.2.23",
|
|
9
|
+
"@bcrs-shared-components/enums": "^1.0.42",
|
|
10
|
+
"@bcrs-shared-components/interfaces": "^1.0.66",
|
|
11
|
+
"@bcrs-shared-components/mixins": "^1.1.16",
|
|
12
|
+
"vue": "^2.7.14"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
11
15
|
"vue-property-decorator": "^9.1.2"
|
|
12
16
|
},
|
|
13
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "bdee3d1bef1c16310b2bb77a353d9bd5dbf53b9a"
|
|
14
18
|
}
|