@star-insure/sdk 2.5.0 → 2.5.2
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/dist/components/forms/DateOfBirthField.d.ts +2 -1
- package/dist/sdk.cjs.development.js +11 -4
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +11 -4
- package/dist/sdk.esm.js.map +1 -1
- package/dist/types/models/quotes/QuoteRequest.d.ts +5 -0
- package/dist/types/models/quotes/QuoteRequestForm.d.ts +1 -0
- package/dist/types/models/quotes/QuoteRequestVehicle.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/forms/DateOfBirthField.tsx +5 -3
- package/src/lib/quoteRequestForm.tsx +5 -0
- package/src/types/models/quotes/QuoteRequest.ts +5 -0
- package/src/types/models/quotes/QuoteRequestForm.ts +1 -0
- package/src/types/models/quotes/QuoteRequestVehicle.ts +1 -0
|
@@ -9,6 +9,7 @@ interface Props {
|
|
|
9
9
|
value?: string;
|
|
10
10
|
maxYear?: number;
|
|
11
11
|
showAge?: boolean;
|
|
12
|
+
isRequired?: boolean;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export default function DateOfBirthField({
|
|
@@ -18,6 +19,7 @@ export default function DateOfBirthField({
|
|
|
18
19
|
value,
|
|
19
20
|
maxYear = 0,
|
|
20
21
|
showAge = false,
|
|
22
|
+
isRequired = true
|
|
21
23
|
}: Props) {
|
|
22
24
|
const dayOptions = [...Array.from(Array(31).keys())].map(value => {
|
|
23
25
|
return padStart(`${value + 1}`, 2, '0');
|
|
@@ -76,7 +78,7 @@ export default function DateOfBirthField({
|
|
|
76
78
|
value={day}
|
|
77
79
|
className="flex-grow focus:outline-none border-0"
|
|
78
80
|
onChange={handleChange}
|
|
79
|
-
required
|
|
81
|
+
required={isRequired}
|
|
80
82
|
>
|
|
81
83
|
<option value="">Day</option>
|
|
82
84
|
{dayOptions.map(option => (
|
|
@@ -91,7 +93,7 @@ export default function DateOfBirthField({
|
|
|
91
93
|
value={month}
|
|
92
94
|
className="flex-grow focus:outline-none border-0"
|
|
93
95
|
onChange={handleChange}
|
|
94
|
-
required
|
|
96
|
+
required={isRequired}
|
|
95
97
|
>
|
|
96
98
|
<option value="">Month</option>
|
|
97
99
|
{monthOptions.map(option => (
|
|
@@ -106,7 +108,7 @@ export default function DateOfBirthField({
|
|
|
106
108
|
value={year}
|
|
107
109
|
className="flex-grow focus:outline-none border-0"
|
|
108
110
|
onChange={handleChange}
|
|
109
|
-
required
|
|
111
|
+
required={isRequired}
|
|
110
112
|
>
|
|
111
113
|
<option value="">Year</option>
|
|
112
114
|
{yearOptions.map(option => (
|
|
@@ -27,6 +27,11 @@ export const initialData: QuoteRequestForm = {
|
|
|
27
27
|
club_membership_number: '',
|
|
28
28
|
length_of_insurance: '',
|
|
29
29
|
dob: '',
|
|
30
|
+
secondary_first_name: '',
|
|
31
|
+
secondary_last_name: '',
|
|
32
|
+
secondary_licence: '',
|
|
33
|
+
secondary_licence_other: '',
|
|
34
|
+
secondary_dob: '',
|
|
30
35
|
club_id: undefined,
|
|
31
36
|
street_address: {
|
|
32
37
|
address: '',
|
|
@@ -53,11 +53,16 @@ export interface QuoteRequest {
|
|
|
53
53
|
theme?: string;
|
|
54
54
|
notes?: string;
|
|
55
55
|
purchase_option_summaries?: QuoteRequestPurchaseOptionSummary[];
|
|
56
|
+
secondary_first_name?: string;
|
|
57
|
+
secondary_last_name?: string;
|
|
58
|
+
secondary_licence?: string;
|
|
59
|
+
secondary_licence_other?: string;
|
|
56
60
|
|
|
57
61
|
// Dates
|
|
58
62
|
created_at?: string;
|
|
59
63
|
updated_at?: string;
|
|
60
64
|
dob?: string;
|
|
65
|
+
secondary_dob?: string;
|
|
61
66
|
sold_at?: string;
|
|
62
67
|
sent_at?: string;
|
|
63
68
|
pricing_expires_at?: string;
|