@open-tender/utils 0.4.33 → 0.4.35

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.
@@ -47,8 +47,6 @@ const useSignUpForm = (loading, error, signUp, callback, checkConfig, hidePasswo
47
47
  toRemove.push('birth_date');
48
48
  if (optionalFields && !optionalFields.includes('gender'))
49
49
  toRemove.push('gender');
50
- if (!hasPunchh)
51
- toRemove.push('birth_date');
52
50
  const allFields = [
53
51
  {
54
52
  label: 'First Name',
@@ -77,19 +75,18 @@ const useSignUpForm = (loading, error, signUp, callback, checkConfig, hidePasswo
77
75
  autoComplete: 'new-password'
78
76
  },
79
77
  { label: 'Phone', name: 'phone', type: 'tel', required: true },
80
- {
81
- label: 'Birth Date',
82
- name: 'birth_date',
83
- type: 'date',
84
- required: true
85
- },
86
78
  {
87
79
  label: 'Company',
88
80
  name: 'company',
89
81
  type: 'text',
90
82
  required: companyRequired
91
83
  },
92
- { label: 'Birth Date (mm/dd/yyyy)', name: 'birth_date', type: 'tel' },
84
+ {
85
+ label: 'Birth Date (mm/dd/yyyy)',
86
+ name: 'birth_date',
87
+ type: 'tel',
88
+ required: hasPunchh
89
+ },
93
90
  {
94
91
  label: 'Gender',
95
92
  name: 'gender',
@@ -25,7 +25,7 @@ const useSignUpGuestForm = (email, guest, loading, error, guestErrors, signUp, s
25
25
  const guestDisabled = guestIncomplete || isLoading;
26
26
  const toRemove = [];
27
27
  if (!hasPunchh)
28
- toRemove.push('birth_date');
28
+ toRemove.push('birthday');
29
29
  if (hasThanx)
30
30
  toRemove.push('password');
31
31
  const allFields = [
@@ -50,9 +50,9 @@ const useSignUpGuestForm = (email, guest, loading, error, guestErrors, signUp, s
50
50
  },
51
51
  { label: 'Phone', name: 'phone', type: 'tel', required: true },
52
52
  {
53
- label: 'Birth Date',
54
- name: 'birth_date',
55
- type: 'date',
53
+ label: 'Birth Date (mm/dd/yyyy)',
54
+ name: 'birthday',
55
+ type: 'tel',
56
56
  required: false
57
57
  },
58
58
  {
@@ -81,12 +81,12 @@ const makeLimitations = (item) => {
81
81
  const comma = serviceType && orderType ? ', ' : '';
82
82
  const dash = (serviceType || orderType) && channelType ? ' - ' : '';
83
83
  if (serviceType || orderType || channelType) {
84
- return `
85
- ${serviceType || ''}
86
- ${comma}
87
- ${orderType || ''}
88
- ${dash}
89
- ${channelType || ''}
84
+ return `
85
+ ${serviceType || ''}
86
+ ${comma}
87
+ ${orderType || ''}
88
+ ${dash}
89
+ ${channelType || ''}
90
90
  `;
91
91
  }
92
92
  return 'Valid on all online & app orders';
@@ -44,8 +44,6 @@ export const useSignUpForm = (loading, error, signUp, callback, checkConfig, hid
44
44
  toRemove.push('birth_date');
45
45
  if (optionalFields && !optionalFields.includes('gender'))
46
46
  toRemove.push('gender');
47
- if (!hasPunchh)
48
- toRemove.push('birth_date');
49
47
  const allFields = [
50
48
  {
51
49
  label: 'First Name',
@@ -74,19 +72,18 @@ export const useSignUpForm = (loading, error, signUp, callback, checkConfig, hid
74
72
  autoComplete: 'new-password'
75
73
  },
76
74
  { label: 'Phone', name: 'phone', type: 'tel', required: true },
77
- {
78
- label: 'Birth Date',
79
- name: 'birth_date',
80
- type: 'date',
81
- required: true
82
- },
83
75
  {
84
76
  label: 'Company',
85
77
  name: 'company',
86
78
  type: 'text',
87
79
  required: companyRequired
88
80
  },
89
- { label: 'Birth Date (mm/dd/yyyy)', name: 'birth_date', type: 'tel' },
81
+ {
82
+ label: 'Birth Date (mm/dd/yyyy)',
83
+ name: 'birth_date',
84
+ type: 'tel',
85
+ required: hasPunchh
86
+ },
90
87
  {
91
88
  label: 'Gender',
92
89
  name: 'gender',
@@ -22,7 +22,7 @@ export const useSignUpGuestForm = (email, guest, loading, error, guestErrors, si
22
22
  const guestDisabled = guestIncomplete || isLoading;
23
23
  const toRemove = [];
24
24
  if (!hasPunchh)
25
- toRemove.push('birth_date');
25
+ toRemove.push('birthday');
26
26
  if (hasThanx)
27
27
  toRemove.push('password');
28
28
  const allFields = [
@@ -47,9 +47,9 @@ export const useSignUpGuestForm = (email, guest, loading, error, guestErrors, si
47
47
  },
48
48
  { label: 'Phone', name: 'phone', type: 'tel', required: true },
49
49
  {
50
- label: 'Birth Date',
51
- name: 'birth_date',
52
- type: 'date',
50
+ label: 'Birth Date (mm/dd/yyyy)',
51
+ name: 'birthday',
52
+ type: 'tel',
53
53
  required: false
54
54
  },
55
55
  {
@@ -77,12 +77,12 @@ export const makeLimitations = (item) => {
77
77
  const comma = serviceType && orderType ? ', ' : '';
78
78
  const dash = (serviceType || orderType) && channelType ? ' - ' : '';
79
79
  if (serviceType || orderType || channelType) {
80
- return `
81
- ${serviceType || ''}
82
- ${comma}
83
- ${orderType || ''}
84
- ${dash}
85
- ${channelType || ''}
80
+ return `
81
+ ${serviceType || ''}
82
+ ${comma}
83
+ ${orderType || ''}
84
+ ${dash}
85
+ ${channelType || ''}
86
86
  `;
87
87
  }
88
88
  return 'Valid on all online & app orders';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/utils",
3
- "version": "0.4.33",
3
+ "version": "0.4.35",
4
4
  "description": "A library of utils for use with Open Tender applications that utilize our cloud-based Order API.",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",