@visns-studio/visns-components 2.1.2 → 2.1.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.
@@ -1,33 +1,33 @@
1
- import React, { useState } from "react";
2
- import Reveal from "react-reveal/Reveal";
3
- import { toast } from "react-toastify";
4
- import parse from "html-react-parser";
5
- import { Person } from "akar-icons";
1
+ import React, { useState } from 'react';
2
+ import Reveal from 'react-reveal/Reveal';
3
+ import { toast } from 'react-toastify';
4
+ import parse from 'html-react-parser';
5
+ import { Person } from 'akar-icons';
6
6
 
7
- import CustomFetch from "../Fetch";
7
+ import CustomFetch from '../Fetch';
8
8
 
9
- const Reset = () => {
10
- const [email, setEmail] = useState("");
11
- const [emailClass, setEmailClass] = useState("");
9
+ const Reset = ({ logo }) => {
10
+ const [email, setEmail] = useState('');
11
+ const [emailClass, setEmailClass] = useState('');
12
12
 
13
13
  const handleSubmit = (e) => {
14
14
  e.preventDefault();
15
15
 
16
- if (email === "") {
17
- const error = "Please type in your email address.";
18
- setEmailClass("inputError");
16
+ if (email === '') {
17
+ const error = 'Please type in your email address.';
18
+ setEmailClass('inputError');
19
19
  toast.error(<div>{parse(error)}</div>);
20
20
  return;
21
21
  }
22
22
 
23
23
  CustomFetch(
24
- "/password/forgot",
25
- "POST",
24
+ '/password/forgot',
25
+ 'POST',
26
26
  { email: email },
27
27
  function (result) {
28
- if (result.error === "") {
28
+ if (result.error === '') {
29
29
  setEmail(
30
- "You have successfully requested to reset your password, an email will be sent shortly. Please follow the instruction on the email."
30
+ 'You have successfully requested to reset your password, an email will be sent shortly. Please follow the instruction on the email.'
31
31
  );
32
32
  } else {
33
33
  toast.error(result.error);
@@ -44,6 +44,11 @@ const Reset = () => {
44
44
  <form onSubmit={handleSubmit}>
45
45
  <Reveal effect="fadeInUp">
46
46
  <div className="login">
47
+ <img
48
+ src={logo}
49
+ alt="CRM"
50
+ className="loginlogo"
51
+ />
47
52
  <div className="formItem fwItem">
48
53
  <h1>Forgot your password?</h1>
49
54
  </div>
@@ -55,7 +60,7 @@ const Reset = () => {
55
60
  value={email}
56
61
  onChange={(e) => {
57
62
  setEmail(e.target.value);
58
- setEmailClass("");
63
+ setEmailClass('');
59
64
  }}
60
65
  tabIndex="1"
61
66
  className={emailClass}
@@ -7,7 +7,7 @@ import Reveal from 'react-reveal/Reveal';
7
7
 
8
8
  import CustomFetch from '../Fetch';
9
9
 
10
- const Verify = () => {
10
+ const Verify = ({ logo }) => {
11
11
  const navigate = useNavigate();
12
12
  const { code } = useParams();
13
13
 
@@ -100,6 +100,11 @@ const Verify = () => {
100
100
  <form onSubmit={handleSubmit}>
101
101
  <Reveal effect="fadeInUp">
102
102
  <div className="login">
103
+ <img
104
+ src={logo}
105
+ alt="CRM"
106
+ className="loginlogo"
107
+ />
103
108
  <div className="formItem fwItem">
104
109
  <h1>Reset your password</h1>
105
110
  </div>
@@ -79,31 +79,16 @@ function GenericIndex({ setting, userProfile }) {
79
79
  config.settings && (
80
80
  <>
81
81
  <div className="grid">
82
- <div className="grid__row">
83
- {subnav && subnav.length > 0 ? (
84
- <div className="grid__subrow">
85
- <div className="grid__subnav">
86
- <TableFilter
87
- filters={subnav}
88
- setFilters={setSubnav}
89
- setSettings={setConfig}
90
- />
91
- </div>
92
- <div className="grid__subcontent">
93
- <Table
94
- {...config}
95
- gridHeight={windowHeight * 0.65}
96
- setConfig={setConfig}
97
- setTotal={setTotal}
98
- style={
99
- userProfile?.settings
100
- ?.style || {}
101
- }
102
- />
103
- </div>
82
+ {subnav && subnav.length > 0 ? (
83
+ <div className="grid__subrow">
84
+ <div className="grid__subnav">
85
+ <TableFilter
86
+ filters={subnav}
87
+ setFilters={setSubnav}
88
+ setSettings={setConfig}
89
+ />
104
90
  </div>
105
- ) : (
106
- <div className="grid__full">
91
+ <div className="grid__subcontent">
107
92
  <Table
108
93
  {...config}
109
94
  gridHeight={windowHeight * 0.65}
@@ -115,8 +100,20 @@ function GenericIndex({ setting, userProfile }) {
115
100
  }
116
101
  />
117
102
  </div>
118
- )}
119
- </div>
103
+ </div>
104
+ ) : (
105
+ <div className="grid__full">
106
+ <Table
107
+ {...config}
108
+ gridHeight={windowHeight * 0.65}
109
+ setConfig={setConfig}
110
+ setTotal={setTotal}
111
+ style={
112
+ userProfile?.settings?.style || {}
113
+ }
114
+ />
115
+ </div>
116
+ )}
120
117
  </div>
121
118
  <Outlet />
122
119
  </>
package/package.json CHANGED
@@ -40,7 +40,7 @@
40
40
  "react-dom": "^17.0.1"
41
41
  },
42
42
  "name": "@visns-studio/visns-components",
43
- "version": "2.1.2",
43
+ "version": "2.1.4",
44
44
  "description": "Various packages to assist in the development of our Custom Applications.",
45
45
  "main": "index.js",
46
46
  "scripts": {