@open-tender/utils 0.4.33 → 0.4.34

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.
@@ -43,12 +43,10 @@ const useSignUpForm = (loading, error, signUp, callback, checkConfig, hidePasswo
43
43
  toRemove.push('company');
44
44
  if (hidePassword)
45
45
  toRemove.push('password');
46
- if (optionalFields && !optionalFields.includes('birth_date'))
46
+ if (optionalFields && !optionalFields.includes('birth_date') && !hasPunchh)
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,13 @@ 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
+ { label: 'Birth Date (mm/dd/yyyy)', name: 'birth_date', type: 'tel', required: hasPunchh },
93
85
  {
94
86
  label: 'Gender',
95
87
  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
  {
@@ -40,12 +40,10 @@ export const useSignUpForm = (loading, error, signUp, callback, checkConfig, hid
40
40
  toRemove.push('company');
41
41
  if (hidePassword)
42
42
  toRemove.push('password');
43
- if (optionalFields && !optionalFields.includes('birth_date'))
43
+ if (optionalFields && !optionalFields.includes('birth_date') && !hasPunchh)
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,13 @@ 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
+ { label: 'Birth Date (mm/dd/yyyy)', name: 'birth_date', type: 'tel', required: hasPunchh },
90
82
  {
91
83
  label: 'Gender',
92
84
  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
  {
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.34",
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",