@visns-studio/visns-components 2.6.10 → 2.6.12

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.
@@ -1958,6 +1958,7 @@ const DataGrid = forwardRef(
1958
1958
  fetchTable={handleReload}
1959
1959
  formSettings={formData}
1960
1960
  formType={formType}
1961
+ mapbox={mapbox}
1961
1962
  style={style}
1962
1963
  updateForm={setFormData}
1963
1964
  />
@@ -20,9 +20,11 @@ import 'react-quill/dist/quill.snow.css';
20
20
  import 'react-datepicker/dist/react-datepicker.css';
21
21
 
22
22
  function Field({
23
+ autocompleteCallback,
23
24
  childDropdownCallback,
24
25
  inputValue,
25
26
  inputClass,
27
+ mapbox,
26
28
  onChange,
27
29
  onChangeColour,
28
30
  onChangeDate,
@@ -30,7 +32,6 @@ function Field({
30
32
  onChangeRicheditor,
31
33
  onChangeToggle,
32
34
  onChangeNumberFormat,
33
- autocompleteCallback,
34
35
  setFormData,
35
36
  settings,
36
37
  style,
@@ -497,6 +498,7 @@ function Field({
497
498
  country="AU"
498
499
  field={settings.id}
499
500
  inputValue={inputValue}
501
+ mapbox={mapbox}
500
502
  onSelect={autocompleteCallback}
501
503
  setFormData={setFormData}
502
504
  style={style}
@@ -1,4 +1,5 @@
1
1
  import React, { useState, useEffect } from 'react';
2
+ import { useNavigate } from 'react-router-dom';
2
3
  import { motion } from 'framer-motion';
3
4
  import { toast } from 'react-toastify';
4
5
  import moment from 'moment';
@@ -16,11 +17,12 @@ function Form({
16
17
  formType,
17
18
  formSettings,
18
19
  fetchTable,
20
+ mapbox,
19
21
  style,
20
22
  type,
21
23
  updateForm,
22
- userProfile,
23
24
  }) {
25
+ const navigate = useNavigate();
24
26
  const [inputClass, setInputClass] = useState({});
25
27
  const [formData, setFormData] = useState({});
26
28
  const [fetchTrigger, setFetchTrigger] = useState(false);
@@ -520,6 +522,15 @@ function Form({
520
522
  toast.success(
521
523
  'Entry successfully saved into the system.'
522
524
  );
525
+
526
+ if (
527
+ formSettings.hasOwnProperty('redirect') &&
528
+ formSettings.redirect &&
529
+ result.data &&
530
+ result.data.id
531
+ ) {
532
+ navigate(formSettings.redirect + result.data.id);
533
+ }
523
534
  } else {
524
535
  toast.error(
525
536
  <div>
@@ -855,6 +866,7 @@ function Form({
855
866
  ajaxSetting={item.ajaxSetting}
856
867
  form={item.form}
857
868
  columns={item.columns}
869
+ mapbox={mapbox}
858
870
  settings={item.settings}
859
871
  style={
860
872
  userProfile?.settings?.style ||
@@ -896,9 +908,10 @@ function Form({
896
908
  childDropdownCallback={
897
909
  childDropdownCallback
898
910
  }
899
- uploadProgress={uploadProgress}
911
+ mapbox={mapbox}
900
912
  setFormData={setFormData}
901
913
  style={style}
914
+ uploadProgress={uploadProgress}
902
915
  />
903
916
  );
904
917
  }
@@ -985,6 +998,7 @@ function Form({
985
998
  childDropdownCallback
986
999
  }
987
1000
  uploadProgress={uploadProgress}
1001
+ mapbox={mapbox}
988
1002
  setFormData={setFormData}
989
1003
  style={style}
990
1004
  />
@@ -1,11 +1,10 @@
1
1
  import React, { useState } from 'react';
2
- import { Link, useNavigate, useLocation } from 'react-router-dom';
2
+ import { Link, useLocation } from 'react-router-dom';
3
3
  import Reveal from 'react-reveal/Reveal';
4
4
  import { toast } from 'react-toastify';
5
5
  import { Person, LockOff } from 'akar-icons';
6
6
 
7
7
  import CustomFetch from '../Fetch';
8
- import { render } from 'react-dom';
9
8
 
10
9
  const Login = ({ logo, providers, setSystemAuth, setUserProfile }) => {
11
10
  const location = useLocation();
package/package.json CHANGED
@@ -44,7 +44,7 @@
44
44
  "react-dom": "^17.0.1"
45
45
  },
46
46
  "name": "@visns-studio/visns-components",
47
- "version": "2.6.10",
47
+ "version": "2.6.12",
48
48
  "description": "Various packages to assist in the development of our Custom Applications.",
49
49
  "main": "index.js",
50
50
  "scripts": {