@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.
@@ -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;
@@ -88,6 +88,7 @@ export interface QuoteRequestForm {
88
88
  value?: number;
89
89
  storage_location?: string;
90
90
  is_heavy?: boolean;
91
+ main_driver?: string;
91
92
  drivers: {
92
93
  id?: number;
93
94
  first_name?: string;
@@ -19,4 +19,5 @@ export interface QuoteRequestVehicle {
19
19
  quote_request_id?: string;
20
20
  drivers?: QuoteRequestVehicleDriver[];
21
21
  key?: string;
22
+ main_driver?: string;
22
23
  }