@solidstarters/solid-core-ui 1.1.28 → 1.1.30

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.
Files changed (62) hide show
  1. package/dist/components/auth/AuthLayout.d.ts.map +1 -1
  2. package/dist/components/auth/AuthLayout.js +2 -1
  3. package/dist/components/auth/AuthLayout.js.map +1 -1
  4. package/dist/components/auth/SolidLogin.js +2 -2
  5. package/dist/components/auth/SolidLogin.js.map +1 -1
  6. package/dist/components/auth/SolidRegister.d.ts.map +1 -1
  7. package/dist/components/auth/SolidRegister.js +2 -2
  8. package/dist/components/auth/SolidRegister.js.map +1 -1
  9. package/dist/components/core/common/FilterComponent.d.ts.map +1 -1
  10. package/dist/components/core/common/FilterComponent.js +1 -1
  11. package/dist/components/core/common/FilterComponent.js.map +1 -1
  12. package/dist/components/core/common/SolidConfigureLayoutElement.d.ts.map +1 -1
  13. package/dist/components/core/common/SolidConfigureLayoutElement.js +1 -2
  14. package/dist/components/core/common/SolidConfigureLayoutElement.js.map +1 -1
  15. package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
  16. package/dist/components/core/form/SolidFormView.js +11 -4
  17. package/dist/components/core/form/SolidFormView.js.map +1 -1
  18. package/dist/components/core/list/SolidListView.d.ts.map +1 -1
  19. package/dist/components/core/list/SolidListView.js +43 -40
  20. package/dist/components/core/list/SolidListView.js.map +1 -1
  21. package/dist/components/core/model/CreateModel.d.ts.map +1 -1
  22. package/dist/components/core/model/CreateModel.js +1 -1
  23. package/dist/components/core/model/CreateModel.js.map +1 -1
  24. package/dist/components/core/model/FieldMetaData.js +2 -2
  25. package/dist/components/core/model/FieldMetaData.js.map +1 -1
  26. package/dist/components/core/model/FieldMetaDataForm.d.ts.map +1 -1
  27. package/dist/components/core/model/FieldMetaDataForm.js +9 -9
  28. package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
  29. package/dist/components/core/model/FieldSelector.js +1 -1
  30. package/dist/components/core/model/FieldSelector.js.map +1 -1
  31. package/dist/components/core/model/ModelMetaData.d.ts.map +1 -1
  32. package/dist/components/core/model/ModelMetaData.js +30 -30
  33. package/dist/components/core/model/ModelMetaData.js.map +1 -1
  34. package/dist/components/core/module/CreateModule.d.ts.map +1 -1
  35. package/dist/components/core/module/CreateModule.js +23 -22
  36. package/dist/components/core/module/CreateModule.js.map +1 -1
  37. package/dist/components/core/users/CreateUser.d.ts.map +1 -1
  38. package/dist/components/core/users/CreateUser.js +13 -14
  39. package/dist/components/core/users/CreateUser.js.map +1 -1
  40. package/dist/components/layout/user-profile-menu.d.ts.map +1 -1
  41. package/dist/components/layout/user-profile-menu.js +1 -1
  42. package/dist/components/layout/user-profile-menu.js.map +1 -1
  43. package/dist/resources/globals.css +227 -11
  44. package/dist/resources/stylesheets/_main.scss +3 -1
  45. package/package.json +1 -1
  46. package/src/components/auth/AuthLayout.tsx +11 -2
  47. package/src/components/auth/SolidLogin.tsx +2 -2
  48. package/src/components/auth/SolidRegister.tsx +42 -36
  49. package/src/components/core/common/FilterComponent.tsx +3 -2
  50. package/src/components/core/common/SolidConfigureLayoutElement.tsx +1 -2
  51. package/src/components/core/form/SolidFormView.tsx +26 -7
  52. package/src/components/core/list/SolidListView.tsx +14 -0
  53. package/src/components/core/model/CreateModel.tsx +2 -0
  54. package/src/components/core/model/FieldMetaData.tsx +4 -4
  55. package/src/components/core/model/FieldMetaDataForm.tsx +19 -21
  56. package/src/components/core/model/FieldSelector.tsx +1 -1
  57. package/src/components/core/model/ModelMetaData.tsx +158 -158
  58. package/src/components/core/module/CreateModule.tsx +178 -173
  59. package/src/components/core/users/CreateUser.tsx +123 -120
  60. package/src/components/layout/user-profile-menu.tsx +6 -5
  61. package/src/resources/globals.css +227 -11
  62. package/src/resources/stylesheets/_main.scss +3 -1
@@ -1032,7 +1032,7 @@ const FieldMetaDataForm = ({ setIsDirty, modelMetaData, fieldMetaData, setFieldM
1032
1032
  useEffect(() => {
1033
1033
  const fetchFields = async () => {
1034
1034
  const queryData: any = {
1035
- limit: 10,
1035
+ limit: 100,
1036
1036
  offset: 0,
1037
1037
  filters: {
1038
1038
  singularName: {
@@ -1044,14 +1044,15 @@ const FieldMetaDataForm = ({ setIsDirty, modelMetaData, fieldMetaData, setFieldM
1044
1044
  const queryString = qs.stringify(queryData, {
1045
1045
  encodeValuesOnly: true,
1046
1046
  });
1047
-
1048
1047
  const result = await triggerGetModels(queryString).unwrap();
1049
1048
 
1050
1049
  if (result && result.records) {
1051
1050
  if (!result?.records[0]?.userKeyField) {
1052
1051
  setUserKeyFields(true);
1053
- const fieldsWithUnique = result?.records[0]?.fields?.filter((field: any) => field?.unique === true);
1054
- setUserKeyData(fieldsWithUnique)
1052
+ const validUserKeyFields = result?.records[0]?.fields?.filter(
1053
+ (field: any) => field?.unique === true && field?.type === 'shortText'
1054
+ );
1055
+ setUserKeyData(validUserKeyFields)
1055
1056
  } else {
1056
1057
  setUserKeyFields(false);
1057
1058
  setUserKeyData([]);
@@ -1151,10 +1152,9 @@ const FieldMetaDataForm = ({ setIsDirty, modelMetaData, fieldMetaData, setFieldM
1151
1152
  }
1152
1153
  {fieldMetaData ?
1153
1154
 
1154
- <div className="form-wrapper-title text-base">{capitalize(modelMetaData?.displayName)} &gt; {capitalize(fieldMetaData?.displayName)}</div>
1155
-
1155
+ <div className="form-wrapper-title text-base">Edit {capitalize(fieldMetaData?.displayName)}</div>
1156
1156
  :
1157
- <div className="form-wrapper-title text-base">Add New Field to {capitalize(modelMetaData?.displayName)}</div>
1157
+ <div className="form-wrapper-title text-base">Add New {selectedType?.label && !showTypeFilter && capitalize(selectedType.label)} Field to {capitalize(modelMetaData?.displayName)}</div>
1158
1158
  }
1159
1159
  </div>
1160
1160
  <div className="flex align-items-center gap-3 close-popup">
@@ -1171,15 +1171,13 @@ const FieldMetaDataForm = ({ setIsDirty, modelMetaData, fieldMetaData, setFieldM
1171
1171
  modelMetaData={modelMetaData}
1172
1172
  ></FieldSelector>
1173
1173
  :
1174
- <div className="field-popup-form" >
1174
+ <div className="p-4" style={{ maxHeight: '80vh', overflowY: 'auto', overflowX: 'hidden' }}>
1175
1175
  <div className="p-d-flex p-jc-center creat-field-for form-dem">
1176
1176
  <div className="p-fluid" style={{ position: 'relative' }}>
1177
- <div className="mb-3">
1177
+ {/* <div className="mb-3">
1178
1178
  <div className="form-wrapper-title">{fieldMetaData ? `Edit ${capitalize(selectedType.label)} Field` : `Add a new ${capitalize(selectedType.label)} Field`}</div>
1179
- </div>
1180
-
1181
-
1182
- <TabView>
1179
+ </div> */}
1180
+ <TabView panelContainerClassName="px-0">
1183
1181
  <TabPanel
1184
1182
  header="Basic Info"
1185
1183
  className={(formik.touched.hasOwnProperty("name") && formik.errors.hasOwnProperty("name")) || (formik.touched.hasOwnProperty("displayName") && formik.errors.hasOwnProperty("displayName")) || (formik.touched.hasOwnProperty("displayName") && formik.errors.hasOwnProperty("ormType")) ? "tab-error-heading" : ""}
@@ -2924,12 +2922,12 @@ const FieldMetaDataForm = ({ setIsDirty, modelMetaData, fieldMetaData, setFieldM
2924
2922
  )}
2925
2923
  </TabPanel>
2926
2924
  </TabView>
2927
- <div className="flex gap-3 justify-content-between">
2928
- <div className="flex align-items-center gap-3 mt-3">
2929
- <Button label="Cancel" size="small" severity="secondary" type="reset" onClick={() => setVisiblePopup(false)} outlined className="small-button" />
2925
+ <div className="flex gap-3">
2926
+ <div>
2927
+ <Button label="Finish" size="small" onClick={() => showError()} type="submit" />
2930
2928
  </div>
2931
- <div className="flex align-items-center gap-3 mt-3">
2932
- <Button label="Finish" size="small" onClick={() => showError()} type="submit" className="small-button" />
2929
+ <div>
2930
+ <Button label="Cancel" size="small" severity="secondary" type="reset" onClick={() => setVisiblePopup(false)} outlined />
2933
2931
  </div>
2934
2932
  </div>
2935
2933
  </div>
@@ -2952,13 +2950,13 @@ const FieldMetaDataForm = ({ setIsDirty, modelMetaData, fieldMetaData, setFieldM
2952
2950
  headerClassName="text-center"
2953
2951
  modal
2954
2952
  footer={() => (
2955
- <div className="flex justify-content-center">
2956
- <Button label="Yes" icon="pi pi-check" className='small-button' type="reset" severity="danger" autoFocus onClick={() => {
2953
+ <div className="flex gap-3">
2954
+ <Button label="Yes" icon="pi pi-check" size="small" type="reset" severity="danger" autoFocus onClick={() => {
2957
2955
  formik.resetForm()
2958
2956
  setIsBackPopupVisible(false);
2959
2957
  setShowTypeFilter(true);
2960
2958
  }} />
2961
- <Button label="No" icon="pi pi-times" className='small-button' onClick={() => setIsBackPopupVisible(false)} />
2959
+ <Button label="No" icon="pi pi-times" size="small" onClick={() => setIsBackPopupVisible(false)} />
2962
2960
  </div>
2963
2961
  )}
2964
2962
  onHide={() => setIsBackPopupVisible(false)}
@@ -37,7 +37,7 @@ const FieldSelector = ({ handleTypeSelect, modelMetaData }: any) => {
37
37
  };
38
38
 
39
39
  return (
40
- <div className='p-4'>
40
+ <div className='p-4' style={{ height: '80vh', overflowY: 'scroll' }}>
41
41
  <p className="form-wrapper-heading text-base m-0">Select Field Type</p>
42
42
  <div className='formgrid grid'>
43
43
  {solidFieldOptions.map((field, index) => (
@@ -11,6 +11,7 @@ import { Divider } from "primereact/divider";
11
11
  import { InputText } from "primereact/inputtext";
12
12
  import { InputTextarea } from "primereact/inputtextarea";
13
13
  import { Message } from "primereact/message";
14
+ import { Panel } from "primereact/panel";
14
15
  import { Toast } from "primereact/toast";
15
16
  import { classNames } from "primereact/utils";
16
17
  import qs from "qs";
@@ -270,10 +271,10 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
270
271
  {/* <div className="form-wrapper-subtitle">Name</div> */}
271
272
  <div className="">
272
273
  <div className="grid formgrid">
273
- <div className="field col-6">
274
- <p className="form-wrapper-heading text-base">Basic Info</p>
275
- <div className="grid formgrid">
276
- <div className="field col-12 flex flex-column gap-2">
274
+ <div className="field col-6 pr-3">
275
+ {/* <p className="form-wrapper-heading text-base">Basic Info</p> */}
276
+ <Panel header={"Basic Info"} className="solid-column-panel">
277
+ <div className="flex flex-column gap-2 mt-3">
277
278
  <label htmlFor="type" className="form-field-label">
278
279
  Module
279
280
  </label>
@@ -296,7 +297,7 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
296
297
  )}
297
298
  </div>
298
299
 
299
- <div className="field col-12 flex flex-column gap-1 mt-4">
300
+ <div className="flex flex-column gap-2 mt-4">
300
301
  <label htmlFor="dataSource" className="form-field-label">
301
302
  Data Source
302
303
  </label>
@@ -315,7 +316,7 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
315
316
  additionalAction={(e: any) => formik.setFieldValue("dataSourceType", e.target.value.type)}
316
317
  formErrors={formErrors}
317
318
  />
318
- {formik.values.dataSourceType && <p className="form-field-label">Your datasource will connect to a {formik.values.dataSourceType} database</p>}
319
+ {formik.values.dataSourceType && <p className="form-field-label text-sm">Your datasource will connect to a {formik.values.dataSourceType} database</p>}
319
320
  {(isFormFieldValid(formik, "dataSource") || (formErrors["dataSource"])) && (
320
321
  <Message severity="error" text={formik?.errors?.dataSource?.toString()} />
321
322
  )}
@@ -355,10 +356,10 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
355
356
  <Message severity="error" text={formik?.errors?.dataSourceType?.toString()} />
356
357
  )}
357
358
  </div>*/}
358
- </div>
359
- <Divider />
360
- <p className="form-wrapper-heading text-base">Configurations</p>
361
- <div className="grid formgrid">
359
+ </Panel>
360
+ {/* <Divider /> */}
361
+ {/* <p className="form-wrapper-heading text-base">Configurations</p> */}
362
+ <Panel header={"Configurations"} className="solid-column-panel mt-5">
362
363
  {/* {params.id === 'new' &&
363
364
 
364
365
  <div className="field col-6">
@@ -382,28 +383,27 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
382
383
  />
383
384
  )}
384
385
  </div>} */}
385
- <div className="field col-6">
386
- <div className="flex align-items-center gap-2">
387
- <Checkbox
388
- name="enableSoftDelete"
389
- onChange={(e) => {
390
- formik.setFieldValue("enableSoftDelete", e.checked);
391
- }}
392
- disabled={params.id !== 'new'}
393
- checked={formik.values.enableSoftDelete}
394
- ></Checkbox>
395
- <label htmlFor="enableSoftDelete" className="form-field-label">
396
- Enable Soft Delete
397
- </label>
398
- </div>
399
- {params.id !== 'new' && <p className="form-field-label">Soft-delete can only be set during initial creation to maintain data integrity</p>}
400
- {(isFormFieldValid(formik, "enableSoftDelete") || (formErrors["enableSoftDelete"])) && (
401
- <Message
402
- severity="error"
403
- text={formik?.errors?.enableSoftDelete?.toString()}
404
- />
405
- )}
386
+ <div className="flex align-items-center gap-2 mt-3">
387
+ <Checkbox
388
+ name="enableSoftDelete"
389
+ onChange={(e) => {
390
+ formik.setFieldValue("enableSoftDelete", e.checked);
391
+ }}
392
+ disabled={params.id !== 'new'}
393
+ checked={formik.values.enableSoftDelete}
394
+ ></Checkbox>
395
+ <label htmlFor="enableSoftDelete" className="form-field-label">
396
+ Enable Soft Delete
397
+ </label>
406
398
  </div>
399
+ {params.id !== 'new' && <p className="form-field-label mt-1 text-sm">Soft-delete can only be set during initial creation to maintain data integrity</p>}
400
+ {(isFormFieldValid(formik, "enableSoftDelete") || (formErrors["enableSoftDelete"])) && (
401
+ <Message
402
+ severity="error"
403
+ text={formik?.errors?.enableSoftDelete?.toString()}
404
+ className="mt-2"
405
+ />
406
+ )}
407
407
  {/* <div className="field col-6">
408
408
  <div className="flex align-items-center gap-2 mt-3">
409
409
  <Checkbox
@@ -503,139 +503,139 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
503
503
  }
504
504
  </div>*/}
505
505
 
506
- </div>
506
+ </Panel>
507
507
 
508
508
  </div>
509
- <div className="field col-6">
509
+ <div className="field col-6 pl-3">
510
510
 
511
- <p className="form-wrapper-heading text-base">Basic Settings</p>
512
- <div className="grid formgrid">
513
- <div className="field col-12 flex flex-column gap-2">
514
- <label htmlFor="displayName" className="form-field-label">
515
- Display Name
516
- </label>
517
- <InputText
518
- type="text"
519
- id="displayName"
520
- name="displayName"
521
- onChange={(e) => {
511
+ {/* <p className="form-wrapper-heading text-base">Basic Settings</p> */}
512
+ <Panel header={"Basic Settings"} className="solid-column-panel">
513
+ <div className="flex flex-column gap-2 mt-3">
514
+ <label htmlFor="displayName" className="form-field-label">
515
+ Display Name
516
+ </label>
517
+ <InputText
518
+ type="text"
519
+ id="displayName"
520
+ name="displayName"
521
+ onChange={(e) => {
522
522
 
523
- formik.handleChange(e);
524
- const { toCamelCase, toSnakeCase, toPluralCamelCase } = getSingularAndPlural(e.target.value);
525
- if (params.id === 'new') {
526
- formik.setFieldValue("singularName", toCamelCase);
527
- formik.setFieldValue("pluralName", toPluralCamelCase);
528
- }
529
- if (showTableName == true) {
523
+ formik.handleChange(e);
524
+ const { toCamelCase, toSnakeCase, toPluralCamelCase } = getSingularAndPlural(e.target.value);
530
525
  if (params.id === 'new') {
531
- formik.setFieldValue("tableName", toSnakeCase);
526
+ formik.setFieldValue("singularName", toCamelCase);
527
+ formik.setFieldValue("pluralName", toPluralCamelCase);
528
+ }
529
+ if (showTableName == true) {
530
+ if (params.id === 'new') {
531
+ formik.setFieldValue("tableName", toSnakeCase);
532
+ }
532
533
  }
533
- }
534
534
 
535
535
 
536
- }}
537
- value={formik.values.displayName}
538
- className={classNames("", {
539
- "p-invalid": isFormFieldValid(formik, "displayName") || formErrors["displayName"],
540
- })}
541
-
542
- />
536
+ }}
537
+ value={formik.values.displayName}
538
+ className={classNames("", {
539
+ "p-invalid": isFormFieldValid(formik, "displayName") || formErrors["displayName"],
540
+ })}
543
541
 
544
- {(isFormFieldValid(formik, "displayName") || (formErrors["displayName"])) && (
545
- <Message
546
- severity="error"
547
- text={formik?.errors?.displayName?.toString()}
548
542
  />
549
- )}
550
- </div>
551
- <div className="field col-12 flex flex-column gap-1 mt-4">
552
- <label htmlFor="singularName" className="form-field-label">
553
- Singular Name
554
- </label>
555
- <InputText
556
- disabled={true}
557
- type="text"
558
- id="singularName"
559
- name="singularName"
560
- onChange={formik.handleChange}
561
- value={formik.values.singularName}
562
- className={classNames("", {
563
- "p-invalid": isFormFieldValid(formik, "singularName") || formErrors["singularName"],
564
- })}
565
- />
566
- {(isFormFieldValid(formik, "singularName") || (formErrors["singularName"])) && (
567
- <Message
568
- severity="error"
569
- text={formik?.errors?.singularName?.toString()}
570
- />
571
- )}
572
- </div>
573
- <div className="field col-12 flex flex-column gap-1 mt-4">
574
- <label htmlFor="pluralName" className="form-field-label">
575
- Plural Name
576
- </label>
577
- <InputText
578
- disabled={true}
579
- type="text"
580
- id="pluralName"
581
- name="pluralName"
582
- onChange={formik.handleChange}
583
- value={formik.values.pluralName}
584
- className={classNames("", {
585
- "p-invalid": isFormFieldValid(formik, "pluralName") || formErrors["pluralName"],
586
- })}
587
- />
588
- {(isFormFieldValid(formik, "pluralName") || (formErrors["pluralName"])) && (
589
- <Message severity="error" text={formik?.errors?.pluralName?.toString()} />
590
- )}
591
- </div>
592
543
 
593
- <div className="field col-12 mt-4">
594
- <div className="flex align-items-center gap-2">
595
- <Checkbox onChange={e => {
596
- setShowTableName(e.checked);
597
- if (e.checked === true) {
598
- const { toCamelCase, toSnakeCase, toPluralCamelCase } = getSingularAndPlural(formik.values.displayName);
599
- if (params.id === 'new') {
600
- formik.setFieldValue("tableName", toSnakeCase);
601
- }
602
- }
603
-
604
- }} checked={showTableName} disabled={params.id !== 'new'}></Checkbox>
605
- <label htmlFor="ingredient1" className="form-field-label">
606
- Set table name
607
- </label>
544
+ {(isFormFieldValid(formik, "displayName") || (formErrors["displayName"])) && (
545
+ <Message
546
+ severity="error"
547
+ text={formik?.errors?.displayName?.toString()}
548
+ />
549
+ )}
608
550
  </div>
609
- </div>
610
- {showTableName &&
611
- <div className="field col-12 flex flex-column gap-1 mt-4">
612
- <label htmlFor="tableName" className="form-field-label">
613
- Table Name
551
+ <div className="flex flex-column gap-1 mt-4">
552
+ <label htmlFor="singularName" className="form-field-label">
553
+ Singular Name
614
554
  </label>
615
555
  <InputText
616
- disabled={params.id !== 'new'}
556
+ disabled={true}
617
557
  type="text"
618
- id="tableName"
619
- name="tableName"
558
+ id="singularName"
559
+ name="singularName"
620
560
  onChange={formik.handleChange}
621
- value={formik.values.tableName}
561
+ value={formik.values.singularName}
622
562
  className={classNames("", {
623
- "p-invalid": isFormFieldValid(formik, "tableName") || formErrors["tableName"],
563
+ "p-invalid": isFormFieldValid(formik, "singularName") || formErrors["singularName"],
624
564
  })}
625
565
  />
626
- {(isFormFieldValid(formik, "tableName") || (formErrors["tableName"])) && (
566
+ {(isFormFieldValid(formik, "singularName") || (formErrors["singularName"])) && (
627
567
  <Message
628
568
  severity="error"
629
- text={formik?.errors?.tableName?.toString()}
569
+ text={formik?.errors?.singularName?.toString()}
630
570
  />
631
571
  )}
632
572
  </div>
633
- }
634
- <div className="field col-12 flex flex-column gap-1 mt-4">
635
- <label htmlFor="description" className="form-field-label">
636
- Description
637
- </label>
638
- {/* <InputText
573
+ <div className="flex flex-column gap-1 mt-4">
574
+ <label htmlFor="pluralName" className="form-field-label">
575
+ Plural Name
576
+ </label>
577
+ <InputText
578
+ disabled={true}
579
+ type="text"
580
+ id="pluralName"
581
+ name="pluralName"
582
+ onChange={formik.handleChange}
583
+ value={formik.values.pluralName}
584
+ className={classNames("", {
585
+ "p-invalid": isFormFieldValid(formik, "pluralName") || formErrors["pluralName"],
586
+ })}
587
+ />
588
+ {(isFormFieldValid(formik, "pluralName") || (formErrors["pluralName"])) && (
589
+ <Message severity="error" text={formik?.errors?.pluralName?.toString()} />
590
+ )}
591
+ </div>
592
+
593
+ <div className="mt-4">
594
+ <div className="flex align-items-center gap-2">
595
+ <Checkbox onChange={e => {
596
+ setShowTableName(e.checked);
597
+ if (e.checked === true) {
598
+ const { toCamelCase, toSnakeCase, toPluralCamelCase } = getSingularAndPlural(formik.values.displayName);
599
+ if (params.id === 'new') {
600
+ formik.setFieldValue("tableName", toSnakeCase);
601
+ }
602
+ }
603
+
604
+ }} checked={showTableName} disabled={params.id !== 'new'}></Checkbox>
605
+ <label htmlFor="ingredient1" className="form-field-label">
606
+ Set table name
607
+ </label>
608
+ </div>
609
+ </div>
610
+ {showTableName &&
611
+ <div className="flex flex-column gap-1 mt-4">
612
+ <label htmlFor="tableName" className="form-field-label">
613
+ Table Name
614
+ </label>
615
+ <InputText
616
+ disabled={params.id !== 'new'}
617
+ type="text"
618
+ id="tableName"
619
+ name="tableName"
620
+ onChange={formik.handleChange}
621
+ value={formik.values.tableName}
622
+ className={classNames("", {
623
+ "p-invalid": isFormFieldValid(formik, "tableName") || formErrors["tableName"],
624
+ })}
625
+ />
626
+ {(isFormFieldValid(formik, "tableName") || (formErrors["tableName"])) && (
627
+ <Message
628
+ severity="error"
629
+ text={formik?.errors?.tableName?.toString()}
630
+ />
631
+ )}
632
+ </div>
633
+ }
634
+ <div className="flex flex-column gap-1 mt-4">
635
+ <label htmlFor="description" className="form-field-label">
636
+ Description
637
+ </label>
638
+ {/* <InputText
639
639
  type="text"
640
640
  id="description"
641
641
  name="description"
@@ -645,25 +645,25 @@ const ModelMetaData = React.forwardRef(({ modelMetaData, setModelMetaData, allMo
645
645
  "p-invalid": isFormFieldValid(formik, "description"),
646
646
  })}
647
647
  /> */}
648
- <InputTextarea
649
- id="description"
650
- name="description"
651
- onChange={formik.handleChange}
652
- value={formik.values.description}
653
- className={classNames("", {
654
- "p-invalid": isFormFieldValid(formik, "description") || formErrors["description"],
655
- })}
656
- rows={5}
657
- cols={30}
658
- />
659
- {(isFormFieldValid(formik, "description") || (formErrors["description"])) && (
660
- <Message
661
- severity="error"
662
- text={formik?.errors?.description?.toString()}
648
+ <InputTextarea
649
+ id="description"
650
+ name="description"
651
+ onChange={formik.handleChange}
652
+ value={formik.values.description}
653
+ className={classNames("", {
654
+ "p-invalid": isFormFieldValid(formik, "description") || formErrors["description"],
655
+ })}
656
+ rows={5}
657
+ cols={30}
663
658
  />
664
- )}
665
- </div>
666
- </div>
659
+ {(isFormFieldValid(formik, "description") || (formErrors["description"])) && (
660
+ <Message
661
+ severity="error"
662
+ text={formik?.errors?.description?.toString()}
663
+ />
664
+ )}
665
+ </div>
666
+ </Panel>
667
667
  </div>
668
668
 
669
669
  {/* <div className="md:col-6 sm:col-12">