@visns-studio/visns-components 4.4.7 → 4.4.9

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.
@@ -61,9 +61,8 @@ function Navigation({
61
61
  const [isScrolled, setIsScrolled] = useState(false);
62
62
  const [navData, setNavData] = useState(navConfig);
63
63
 
64
- const appNavClasses = isScrolled
65
- ? styles['navscrolled']
66
- : styles['app-nav'];
64
+ // const appNavClasses = isScrolled ? styles['app-nav'] : styles['app-nav'];
65
+ const appNavClasses = styles['app-nav'];
67
66
 
68
67
  const handleLogout = () => {
69
68
  CustomFetch('/logout', 'GET', {}, () => {
@@ -164,7 +163,6 @@ function Navigation({
164
163
  let navItemClasses;
165
164
 
166
165
  if (n.class.includes('active')) {
167
- console.info(n);
168
166
  navItemClasses =
169
167
  themeType === 'alternate'
170
168
  ? `${styles['nav-item-alternate']} ${styles.active}`
@@ -1,6 +1,6 @@
1
1
  import '../../styles/global.css';
2
2
 
3
- import React, { useState } from 'react';
3
+ import React, { useEffect, useState } from 'react';
4
4
  import { Link, useLocation } from 'react-router-dom';
5
5
  import Reveal from 'react-reveal/Reveal';
6
6
  import { toast } from 'react-toastify';
@@ -10,7 +10,7 @@ import CustomFetch from '../Fetch';
10
10
 
11
11
  import styles from './styles/Login.module.css';
12
12
 
13
- const Login = ({ logo, providers, setSystemAuth, setUserProfile }) => {
13
+ const Login = ({ loginBg, logo, providers, setSystemAuth, setUserProfile }) => {
14
14
  const location = useLocation();
15
15
 
16
16
  const [auth, setAuth] = useState({
@@ -84,8 +84,6 @@ const Login = ({ logo, providers, setSystemAuth, setUserProfile }) => {
84
84
  if (e) {
85
85
  e.preventDefault();
86
86
 
87
- console.info(location.state);
88
-
89
87
  CustomFetch(
90
88
  '/login/authenticate',
91
89
  'POST',
@@ -137,10 +135,20 @@ const Login = ({ logo, providers, setSystemAuth, setUserProfile }) => {
137
135
  }
138
136
  };
139
137
 
138
+ useEffect(() => {
139
+ console.info(loginBg, 'test111');
140
+ }, [loginBg]);
141
+
140
142
  return (
141
143
  <div className={styles.lcontainer}>
142
144
  <div className={styles.lwrap}>
143
- <aside className={styles.aside}></aside>
145
+ <aside
146
+ className={styles.aside}
147
+ style={{
148
+ backgroundImage: `url(${loginBg})`,
149
+ backgroundSize: 'cover',
150
+ }}
151
+ ></aside>
144
152
  <div className={styles.logincontainer}>
145
153
  <form onSubmit={handleSubmit}>
146
154
  <Reveal effect="fadeInUp">
@@ -44,7 +44,13 @@ const Reset = ({ logo }) => {
44
44
  return (
45
45
  <div className={styles.lcontainer}>
46
46
  <div className={styles.lwrap}>
47
- <aside className={styles.aside}></aside>
47
+ <aside
48
+ className={styles.aside}
49
+ style={{
50
+ backgroundImage: `url(${loginBg})`,
51
+ backgroundSize: 'cover',
52
+ }}
53
+ ></aside>
48
54
  <div className={styles.logincontainer}>
49
55
  <form onSubmit={handleSubmit}>
50
56
  <Reveal effect="fadeInUp">
@@ -96,7 +96,13 @@ const Verify = ({ logo }) => {
96
96
  return (
97
97
  <div className={styles.lcontainer}>
98
98
  <div className={styles.lwrap}>
99
- <aside className={styles.aside}></aside>
99
+ <aside
100
+ className={styles.aside}
101
+ style={{
102
+ backgroundImage: `url(${loginBg})`,
103
+ backgroundSize: 'cover',
104
+ }}
105
+ ></aside>
100
106
  <div className={styles.logincontainer}>
101
107
  <form onSubmit={handleSubmit}>
102
108
  <Reveal effect="fadeInUp">
@@ -133,8 +133,6 @@
133
133
  }
134
134
 
135
135
  .aside {
136
- background: url('../images/loginbg.jpg') no-repeat;
137
- background-size: cover;
138
136
  opacity: 1;
139
137
  position: fixed;
140
138
  overflow: hidden;
@@ -133,8 +133,6 @@
133
133
  }
134
134
 
135
135
  .aside {
136
- background: url('../images/loginbg.jpg') no-repeat;
137
- background-size: cover;
138
136
  opacity: 1;
139
137
  position: fixed;
140
138
  overflow: hidden;
@@ -133,8 +133,6 @@
133
133
  }
134
134
 
135
135
  .aside {
136
- background: url('../images/loginbg.jpg') no-repeat;
137
- background-size: cover;
138
136
  opacity: 1;
139
137
  position: fixed;
140
138
  overflow: hidden;
@@ -34,6 +34,7 @@ const ProtectedRoute = ({ user, loading, redirectPath = '/login' }) => {
34
34
 
35
35
  const GenericAuth = ({
36
36
  layout = 'full',
37
+ loginBg,
37
38
  logo,
38
39
  headerLogo,
39
40
  providers,
@@ -62,8 +63,6 @@ const GenericAuth = ({
62
63
  if (['Unauthenticatdata.'].includes(error)) {
63
64
  const currentUrl = window.location.pathname;
64
65
 
65
- console.info('aaa');
66
-
67
66
  setIsAuthenticated(false);
68
67
  navigate('/login', { state: { previousUrl: currentUrl } });
69
68
  }
@@ -72,6 +71,7 @@ const GenericAuth = ({
72
71
 
73
72
  useEffect(() => {
74
73
  updateAuthStatus();
74
+ console.info(loginBg, 'test222');
75
75
  }, [isAuthenticated]);
76
76
 
77
77
  return (
@@ -81,6 +81,7 @@ const GenericAuth = ({
81
81
  path="login"
82
82
  element={
83
83
  <LoginComponent
84
+ loginBg={loginBg}
84
85
  logo={logo}
85
86
  providers={providers}
86
87
  setIsAuthenticated={setIsAuthenticated}
@@ -92,6 +93,7 @@ const GenericAuth = ({
92
93
  path="reset"
93
94
  element={
94
95
  <ResetComponent
96
+ loginBg={loginBg}
95
97
  logo={logo}
96
98
  setIsAuthenticated={setIsAuthenticated}
97
99
  />
@@ -101,6 +103,7 @@ const GenericAuth = ({
101
103
  path="verify/:code"
102
104
  element={
103
105
  <VerifyComponent
106
+ loginBg={loginBg}
104
107
  logo={logo}
105
108
  setIsAuthenticated={setIsAuthenticated}
106
109
  />
@@ -142,8 +145,9 @@ const GenericAuth = ({
142
145
  };
143
146
 
144
147
  const LoginComponent = React.memo(
145
- ({ logo, providers, setIsAuthenticated, setUserProfile }) => (
148
+ ({ loginBg, logo, providers, setIsAuthenticated, setUserProfile }) => (
146
149
  <Login
150
+ loginBg={loginBg}
147
151
  logo={logo}
148
152
  providers={providers}
149
153
  setSystemAuth={setIsAuthenticated}
@@ -152,12 +156,12 @@ const LoginComponent = React.memo(
152
156
  )
153
157
  );
154
158
 
155
- const ResetComponent = React.memo(({ logo, setIsAuthenticated }) => (
156
- <Reset logo={logo} setSystemAuth={setIsAuthenticated} />
159
+ const ResetComponent = React.memo(({ loginBg, logo, setIsAuthenticated }) => (
160
+ <Reset loginBg={loginBg} logo={logo} setSystemAuth={setIsAuthenticated} />
157
161
  ));
158
162
 
159
- const VerifyComponent = React.memo(({ logo, setIsAuthenticated }) => (
160
- <Verify logo={logo} setSystemAuth={setIsAuthenticated} />
163
+ const VerifyComponent = React.memo(({ loginBg, logo, setIsAuthenticated }) => (
164
+ <Verify loginBg={loginBg} logo={logo} setSystemAuth={setIsAuthenticated} />
161
165
  ));
162
166
 
163
167
  export default GenericAuth;
@@ -41,14 +41,12 @@ const renderValue = (field, data) => {
41
41
  if (field.dynamicfield && typeof field.dynamicfield === 'string') {
42
42
  const [table, key] = field.dynamicfield.split('::');
43
43
 
44
- console.info(data, table, key);
45
-
46
44
  if (table && key) {
47
45
  switch (table) {
48
46
  case 'opportunities':
49
47
  return data[table][key];
50
48
  case 'clients':
51
- return data['client'][key];
49
+ return data['client'] ? data['client'][key] : null;
52
50
  default:
53
51
  if (key === 'surname' && !data[key]) {
54
52
  return data['lastname'] || '';
@@ -124,8 +124,6 @@ function GenericFormBuilder({ setting, urlParam, userProfile }) {
124
124
  const handleAddRowOption = (e) => {
125
125
  e.preventDefault();
126
126
 
127
- console.info(dataField);
128
-
129
127
  // Initialize rows if it doesn't exist
130
128
  if (!dataField.rows) {
131
129
  setDataField((items) => ({
@@ -181,12 +181,10 @@ select::-ms-expand {
181
181
  }
182
182
 
183
183
  .aside {
184
- background: url(../images/loginbg.jpg) no-repeat var(--background-color);
185
- background-size: cover;
186
184
  opacity: 1;
187
185
  position: fixed;
188
186
  overflow: hidden;
189
- height: 100%;
187
+ height: 101%;
190
188
  width: var(--sidebar-width);
191
189
  }
192
190
 
@@ -12,7 +12,7 @@
12
12
  }
13
13
 
14
14
  .visibleMenu {
15
- max-height: 500px; /* Adjust this value based on the expected height of your child menu */
15
+ max-height: 2000px; /* Adjust this value based on the expected height of your child menu */
16
16
  opacity: 1;
17
17
  }
18
18
 
package/package.json CHANGED
@@ -58,7 +58,7 @@
58
58
  "react-dom": "^17.0.1"
59
59
  },
60
60
  "name": "@visns-studio/visns-components",
61
- "version": "4.4.7",
61
+ "version": "4.4.9",
62
62
  "description": "Various packages to assist in the development of our Custom Applications.",
63
63
  "main": "index.js",
64
64
  "scripts": {