@visns-studio/visns-components 5.0.3 → 5.0.4
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/package.json +1 -1
- package/src/components/crm/Form.jsx +15 -12
- package/src/components/crm/auth/styles/Profile.module.scss +51 -9
- package/src/components/crm/generic/styles/GenericDetail.module.scss +51 -7
- package/src/components/crm/generic/styles/GenericDynamic.module.scss +27 -20
- package/src/components/styles/global.css +25 -0
package/package.json
CHANGED
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
76
76
|
},
|
|
77
77
|
"name": "@visns-studio/visns-components",
|
|
78
|
-
"version": "5.0.
|
|
78
|
+
"version": "5.0.4",
|
|
79
79
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
80
80
|
"main": "src/index.js",
|
|
81
81
|
"files": [
|
|
@@ -584,44 +584,44 @@ function Form({
|
|
|
584
584
|
|
|
585
585
|
if (['create', 'update'].includes(formType)) {
|
|
586
586
|
fields.forEach((item) => {
|
|
587
|
+
// Skip createOnly fields if formType is 'update'
|
|
587
588
|
if (formType === 'update' && item.createOnly) {
|
|
588
589
|
return;
|
|
589
590
|
}
|
|
590
591
|
|
|
592
|
+
// Check if the item is required
|
|
591
593
|
if (item.required) {
|
|
592
|
-
if
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
) {
|
|
594
|
+
// Check if formData[item.id] is null, undefined, or an empty string
|
|
595
|
+
if (!formData[item.id]) {
|
|
596
|
+
// Check for required_check dependency
|
|
596
597
|
if (
|
|
597
|
-
item.hasOwnProperty('required_check') &&
|
|
598
598
|
item.required_check &&
|
|
599
599
|
!formData[item.required_check]
|
|
600
600
|
) {
|
|
601
601
|
validation += `${item.label} is a required field.<br/>`;
|
|
602
602
|
_inputClass[item.id] = styles.inputError;
|
|
603
603
|
} else {
|
|
604
|
-
console.info('b', formData, item.id);
|
|
605
604
|
validation += `${item.label} is a required field.<br/>`;
|
|
606
605
|
_inputClass[item.id] = styles.inputError;
|
|
607
606
|
}
|
|
608
607
|
} else {
|
|
609
|
-
_inputClass[item.id] = '';
|
|
608
|
+
_inputClass[item.id] = ''; // Clear error class if valid
|
|
610
609
|
}
|
|
611
610
|
} else if (
|
|
612
|
-
item.hasOwnProperty('required_rely') &&
|
|
613
611
|
item.required_rely &&
|
|
614
612
|
formData[item.required_rely] &&
|
|
615
|
-
|
|
616
|
-
formData[item.id] === '')
|
|
613
|
+
!formData[item.id]
|
|
617
614
|
) {
|
|
615
|
+
// Check if the dependent required field is empty when it should be filled
|
|
618
616
|
validation += `${item.label} is a required field.<br/>`;
|
|
619
617
|
_inputClass[item.id] = styles.inputError;
|
|
620
618
|
} else {
|
|
621
|
-
_inputClass[item.id] = '';
|
|
619
|
+
_inputClass[item.id] = ''; // Clear error class if not required
|
|
622
620
|
}
|
|
623
621
|
});
|
|
624
622
|
|
|
623
|
+
console.info(_inputClass);
|
|
624
|
+
|
|
625
625
|
setInputClass(_inputClass);
|
|
626
626
|
}
|
|
627
627
|
|
|
@@ -1371,7 +1371,10 @@ function Form({
|
|
|
1371
1371
|
<div className={styles.modal}>
|
|
1372
1372
|
<div className={styles.modal__header}>
|
|
1373
1373
|
<h1>{formSettings[formType]?.title}</h1>
|
|
1374
|
-
<button
|
|
1374
|
+
<button
|
|
1375
|
+
className={styles.modal__close}
|
|
1376
|
+
onClick={closeModal}
|
|
1377
|
+
>
|
|
1375
1378
|
<CircleX strokeWidth={2} size={24} />
|
|
1376
1379
|
</button>
|
|
1377
1380
|
</div>
|
|
@@ -111,30 +111,72 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
.grid__subcontent {
|
|
114
|
-
flex: 0 1
|
|
115
|
-
background:
|
|
114
|
+
flex: 0 1 80%;
|
|
115
|
+
background: var(--tertiary-color);
|
|
116
116
|
border-radius: var(--br);
|
|
117
|
-
border: 1px solid var(--
|
|
117
|
+
border: 1px solid rgba(var(--primary-rgb), 0.05);
|
|
118
118
|
box-sizing: border-box;
|
|
119
|
-
padding:
|
|
120
|
-
margin:
|
|
119
|
+
padding: 2px;
|
|
120
|
+
margin: 8px 0;
|
|
121
121
|
height: auto;
|
|
122
122
|
position: relative;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
.grid__subcontent h2 {
|
|
126
|
+
color: var(--primary-color);
|
|
127
|
+
font-size: 1.35em;
|
|
128
|
+
padding: 0;
|
|
129
|
+
margin: 0 0 30px 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
125
132
|
.gridtxt__header {
|
|
126
133
|
width: 100%;
|
|
127
134
|
display: block;
|
|
128
|
-
background: var(--
|
|
135
|
+
background: rgba(var(--primary-rgb), 0.05);
|
|
129
136
|
box-sizing: border-box;
|
|
130
137
|
padding: 10px 20px;
|
|
131
|
-
border-
|
|
132
|
-
border-top-right-radius: var(--br);
|
|
138
|
+
border-radius: var(--br);
|
|
133
139
|
margin-bottom: 0;
|
|
134
140
|
font-weight: 700;
|
|
135
141
|
text-align: center;
|
|
136
142
|
color: var(--paragraph-color);
|
|
137
|
-
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.gridtxt__header span {
|
|
146
|
+
font-weight: 700;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.gridtxt > ul {
|
|
150
|
+
width: 100%;
|
|
151
|
+
display: flex;
|
|
152
|
+
justify-content: flex-start;
|
|
153
|
+
flex-direction: row;
|
|
154
|
+
flex-wrap: wrap;
|
|
155
|
+
list-style: none;
|
|
156
|
+
box-sizing: border-box;
|
|
157
|
+
padding: 0.85rem;
|
|
158
|
+
margin: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.gridtxt > ul li {
|
|
162
|
+
flex: 0 0 calc(50% - 10px);
|
|
163
|
+
padding: 0.85rem;
|
|
164
|
+
box-sizing: border-box;
|
|
165
|
+
border: 1px solid rgba(var(--primary-rgb), 0.095);
|
|
166
|
+
color: var(--paragraph-color);
|
|
167
|
+
background: rgba(var(--primary-rgb), 0.015);
|
|
168
|
+
margin: 5px;
|
|
169
|
+
border-radius: var(--br);
|
|
170
|
+
line-height: 1.45;
|
|
171
|
+
font-size: 1rem;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.gridtxt > ul .fw-grid-item {
|
|
175
|
+
flex: 0 0 calc(100% - 10px);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.gridtxt > ul .notecolor {
|
|
179
|
+
border: 1px solid var(--secondary-color);
|
|
138
180
|
}
|
|
139
181
|
|
|
140
182
|
.formcontainer {
|
|
@@ -136,15 +136,14 @@
|
|
|
136
136
|
|
|
137
137
|
.grid__subcontent {
|
|
138
138
|
flex: 0 1 80%;
|
|
139
|
-
background: var(--
|
|
139
|
+
background: var(--tertiary-color);
|
|
140
140
|
border-radius: var(--br);
|
|
141
|
-
border: 1px solid rgba(var(--
|
|
141
|
+
border: 1px solid rgba(var(--primary-rgb), 0.05);
|
|
142
142
|
box-sizing: border-box;
|
|
143
143
|
padding: 2px;
|
|
144
144
|
margin: 8px 0;
|
|
145
145
|
height: auto;
|
|
146
146
|
position: relative;
|
|
147
|
-
box-shadow: 0 4px 0 rgba(var(--primary-color-rgb), 0.05);
|
|
148
147
|
}
|
|
149
148
|
|
|
150
149
|
.grid__subcontent h2 {
|
|
@@ -157,10 +156,10 @@
|
|
|
157
156
|
.gridtxt__header {
|
|
158
157
|
width: 100%;
|
|
159
158
|
display: block;
|
|
160
|
-
background: rgba(var(--
|
|
159
|
+
background: rgba(var(--primary-rgb), 0.05);
|
|
161
160
|
box-sizing: border-box;
|
|
162
161
|
padding: 10px 20px;
|
|
163
|
-
border-radius:
|
|
162
|
+
border-radius: var(--br);
|
|
164
163
|
margin-bottom: 0;
|
|
165
164
|
font-weight: 700;
|
|
166
165
|
text-align: center;
|
|
@@ -187,12 +186,13 @@
|
|
|
187
186
|
flex: 0 0 calc(50% - 10px);
|
|
188
187
|
padding: 0.85rem;
|
|
189
188
|
box-sizing: border-box;
|
|
190
|
-
border: 1px solid rgba(var(--primary-
|
|
189
|
+
border: 1px solid rgba(var(--primary-rgb), 0.095);
|
|
191
190
|
color: var(--paragraph-color);
|
|
192
|
-
background: rgba(var(--
|
|
191
|
+
background: rgba(var(--primary-rgb), 0.015);
|
|
193
192
|
margin: 5px;
|
|
194
193
|
border-radius: var(--br);
|
|
195
194
|
line-height: 1.45;
|
|
195
|
+
font-size: 1rem;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
.gridtxt > ul .fw-grid-item {
|
|
@@ -561,4 +561,48 @@
|
|
|
561
561
|
color: var(--primary-color);
|
|
562
562
|
background: var(--highlight-color);
|
|
563
563
|
border: 1px solid rgba(var(--highlight-color-rgb), 1.05);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.crmtitle {
|
|
567
|
+
min-height: auto;
|
|
568
|
+
padding: 1rem;
|
|
569
|
+
margin: 0;
|
|
570
|
+
background: white;
|
|
571
|
+
border-radius: var(--br);
|
|
572
|
+
border: 1px solid rgba(var(--primary-rgb), 0.15);
|
|
573
|
+
position: relative;
|
|
574
|
+
display: flex;
|
|
575
|
+
align-items: center;
|
|
576
|
+
justify-content: space-between;
|
|
577
|
+
|
|
578
|
+
h1 {
|
|
579
|
+
font-weight: 700;
|
|
580
|
+
font-size: 1.25rem;
|
|
581
|
+
margin: 0;
|
|
582
|
+
padding: 0;
|
|
583
|
+
line-height: 1;
|
|
584
|
+
|
|
585
|
+
a {
|
|
586
|
+
text-decoration: none;
|
|
587
|
+
color: var(--secondary-color);
|
|
588
|
+
font-weight: 300;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
svg {
|
|
592
|
+
color: rgba(var(--primary-rgb), 0.5);
|
|
593
|
+
position: relative;
|
|
594
|
+
top: 2px;
|
|
595
|
+
margin: 0 0.5rem;
|
|
596
|
+
max-width: 15px;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.titleInfo {
|
|
601
|
+
width: max-content;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.titleInfo span {
|
|
605
|
+
font-size: 0.875em;
|
|
606
|
+
color: rgba(var(--paragraph-color-rgb), 0.65);
|
|
607
|
+
}
|
|
564
608
|
}
|
|
@@ -111,13 +111,13 @@
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
.grid__subcontent {
|
|
114
|
-
flex: 0 1
|
|
115
|
-
background:
|
|
114
|
+
flex: 0 1 80%;
|
|
115
|
+
background: var(--tertiary-color);
|
|
116
116
|
border-radius: var(--br);
|
|
117
|
-
border: 1px solid var(--
|
|
117
|
+
border: 1px solid rgba(var(--primary-rgb), 0.05);
|
|
118
118
|
box-sizing: border-box;
|
|
119
|
-
padding:
|
|
120
|
-
margin:
|
|
119
|
+
padding: 2px;
|
|
120
|
+
margin: 8px 0;
|
|
121
121
|
height: auto;
|
|
122
122
|
position: relative;
|
|
123
123
|
}
|
|
@@ -132,36 +132,43 @@
|
|
|
132
132
|
.gridtxt__header {
|
|
133
133
|
width: 100%;
|
|
134
134
|
display: block;
|
|
135
|
-
background: var(--
|
|
135
|
+
background: rgba(var(--primary-rgb), 0.05);
|
|
136
136
|
box-sizing: border-box;
|
|
137
137
|
padding: 10px 20px;
|
|
138
|
-
border-
|
|
139
|
-
border-top-right-radius: var(--br);
|
|
138
|
+
border-radius: var(--br);
|
|
140
139
|
margin-bottom: 0;
|
|
141
140
|
font-weight: 700;
|
|
142
141
|
text-align: center;
|
|
143
142
|
color: var(--paragraph-color);
|
|
144
|
-
position: relative;
|
|
145
143
|
}
|
|
146
144
|
|
|
147
145
|
.gridtxt__header span {
|
|
148
146
|
font-weight: 700;
|
|
149
147
|
}
|
|
150
148
|
|
|
151
|
-
.
|
|
152
|
-
|
|
153
|
-
padding: 0.25em;
|
|
149
|
+
.gridtxt > ul {
|
|
150
|
+
width: 100%;
|
|
154
151
|
display: flex;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
152
|
+
justify-content: flex-start;
|
|
153
|
+
flex-direction: row;
|
|
154
|
+
flex-wrap: wrap;
|
|
155
|
+
list-style: none;
|
|
156
|
+
box-sizing: border-box;
|
|
157
|
+
padding: 0.85rem;
|
|
158
|
+
margin: 0;
|
|
160
159
|
}
|
|
161
160
|
|
|
162
|
-
.
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
.gridtxt > ul li {
|
|
162
|
+
flex: 0 0 calc(50% - 10px);
|
|
163
|
+
padding: 0.85rem;
|
|
164
|
+
box-sizing: border-box;
|
|
165
|
+
border: 1px solid rgba(var(--primary-rgb), 0.095);
|
|
166
|
+
color: var(--paragraph-color);
|
|
167
|
+
background: rgba(var(--primary-rgb), 0.015);
|
|
168
|
+
margin: 5px;
|
|
169
|
+
border-radius: var(--br);
|
|
170
|
+
line-height: 1.45;
|
|
171
|
+
font-size: 1rem;
|
|
165
172
|
}
|
|
166
173
|
|
|
167
174
|
.formcontainer {
|
|
@@ -132,4 +132,29 @@ input[type]:not([type='search']):not([type='url']):not([type='hidden']):not(
|
|
|
132
132
|
padding: 0;
|
|
133
133
|
margin: 0;
|
|
134
134
|
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.vs-datagrid--row:hover {
|
|
138
|
+
.InovuaReactDataGrid__row-cell-wrap {
|
|
139
|
+
background: rgb(240, 240, 240) !important;
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.InovuaReactDataGrid {
|
|
145
|
+
letter-spacing: 0.015rem !important;
|
|
146
|
+
color: black !important;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.InovuaReactDataGrid__header {
|
|
150
|
+
color: var(--primary-color) !important;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.InovuaReactDataGrid__row-hover-target:hover {
|
|
154
|
+
color: black !important;
|
|
155
|
+
background: rgb(240, 240, 240) !important;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.InovuaReactDataGrid__row:hover {
|
|
159
|
+
cursor: pointer;
|
|
135
160
|
}
|