@visns-studio/visns-components 3.5.11 → 3.6.0

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.
@@ -14,6 +14,7 @@ import 'react-toggle/style.css';
14
14
  import 'react-datepicker/dist/react-datepicker.css';
15
15
  import 'react-confirm-alert/src/react-confirm-alert.css';
16
16
 
17
+ import Breadcrumb from '../Breadcrumb';
17
18
  import CustomFetch from '../Fetch';
18
19
  import SortableList from '../../../components/cms/sorting/List';
19
20
 
@@ -21,7 +22,7 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
21
22
  const editorRef = useRef(null);
22
23
  const routeParams = useParams();
23
24
 
24
- const { fetchUrl, fields } = setting;
25
+ const { fetchUrl, fields, parentUrl, formTitle } = setting;
25
26
 
26
27
  const { dataId } = useParams();
27
28
  const [data, setData] = useState({});
@@ -31,7 +32,7 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
31
32
  description: '',
32
33
  type: '',
33
34
  options: [],
34
- size: 'half',
35
+ size: 'quarter',
35
36
  required: 'no',
36
37
  });
37
38
  const [dataOption, setDataOption] = useState({
@@ -511,7 +512,7 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
511
512
 
512
513
  if (_error === '') {
513
514
  const res = await CustomFetch(
514
- `/ajax/forms/${dataId}`,
515
+ `${fetchUrl}/${dataId}`,
515
516
  'PUT',
516
517
  {
517
518
  ...data,
@@ -553,7 +554,7 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
553
554
  const saveOnSort = async () => {
554
555
  try {
555
556
  const res = await CustomFetch(
556
- `/ajax/forms/sort/${dataId}`,
557
+ `${fetchUrl}/sort/${dataId}`,
557
558
  'POST',
558
559
  {
559
560
  detail: data.detail,
@@ -584,9 +585,14 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
584
585
  <div className="grid__row">
585
586
  <div className="grid__full crmtitle">
586
587
  <h1>
587
- <Link to="/forms">Form</Link>{' '}
588
- <CircleChevronRight strokeWidth={2} size={18} />{' '}
589
- {data.label}
588
+ <Breadcrumb
589
+ data={data}
590
+ page={{
591
+ previousUrl: parentUrl,
592
+ title: 'Forms',
593
+ titleKey: 'label',
594
+ }}
595
+ />
590
596
  </h1>
591
597
  </div>
592
598
  </div>
@@ -611,7 +617,7 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
611
617
  <div className="grid__subcontent">
612
618
  <div className="formSplit">
613
619
  <div className="gridtxt__header">
614
- <span>Form Preview</span>
620
+ <span>{formTitle ? formTitle : null}</span>
615
621
  </div>
616
622
  {data.detail && data.detail.length > 0 ? (
617
623
  <div className="modal__content">
package/package.json CHANGED
@@ -50,7 +50,7 @@
50
50
  "react-dom": "^17.0.1"
51
51
  },
52
52
  "name": "@visns-studio/visns-components",
53
- "version": "3.5.11",
53
+ "version": "3.6.0",
54
54
  "description": "Various packages to assist in the development of our Custom Applications.",
55
55
  "main": "index.js",
56
56
  "scripts": {