@liiift-studio/sales-portal 3.1.2 → 3.1.3
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.
- package/api/getSales.js +1 -1
- package/components/Insights.js +1 -1
- package/components/LoginForm.js +18 -3
- package/package.json +1 -1
package/api/getSales.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { authenticateDesigner, processSalesData } from './utils/salesDataProcessor';
|
|
3
3
|
import { sendError, requirePost } from './utils/apiResponse';
|
|
4
4
|
|
|
5
|
-
export const config = { maxDuration:
|
|
5
|
+
export const config = { maxDuration: 800 };
|
|
6
6
|
|
|
7
7
|
export default async function handler(req, res) {
|
|
8
8
|
if (!requirePost(req, res)) return;
|
package/components/Insights.js
CHANGED
|
@@ -259,7 +259,7 @@ export default function Insights({
|
|
|
259
259
|
|
|
260
260
|
{/* Metric cards */}
|
|
261
261
|
{metricCards.map((card, index) => (
|
|
262
|
-
<Box key={`metric-${index}`} sx={{
|
|
262
|
+
<Box key={`metric-${index}`} sx={{ flex: { xs: '1 1 100%', sm: '1 1 calc(50% - 8px)', md: '1 1 calc(33.33% - 11px)' } }}>
|
|
263
263
|
<Tooltip
|
|
264
264
|
title={card.tooltip}
|
|
265
265
|
placement="top"
|
package/components/LoginForm.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// Login form component for sales portal authentication
|
|
2
2
|
import React, { useEffect, useState } from 'react';
|
|
3
|
-
import { Typography, Input, Button, Box } from '@mui/material';
|
|
3
|
+
import { Typography, Input, Button, Box, IconButton, InputAdornment } from '@mui/material';
|
|
4
|
+
import VisibilityIcon from '@mui/icons-material/Visibility';
|
|
5
|
+
import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
|
|
4
6
|
import packageJson from '../package.json';
|
|
5
7
|
|
|
6
8
|
const { version } = packageJson;
|
|
@@ -27,6 +29,7 @@ export default function LoginForm({
|
|
|
27
29
|
const [password, setPassword] = useState('');
|
|
28
30
|
const [message, setMessage] = useState('');
|
|
29
31
|
const [loading, setLoading] = useState(false);
|
|
32
|
+
const [showPassword, setShowPassword] = useState(false);
|
|
30
33
|
|
|
31
34
|
const {
|
|
32
35
|
title = 'Sales Portal',
|
|
@@ -128,7 +131,7 @@ export default function LoginForm({
|
|
|
128
131
|
{title}
|
|
129
132
|
</Typography>
|
|
130
133
|
|
|
131
|
-
<Box sx={{ px: { xs:
|
|
134
|
+
<Box sx={{ px: { xs: 0, sm: 6 } }}>
|
|
132
135
|
<Input
|
|
133
136
|
placeholder="Email"
|
|
134
137
|
onChange={(e) => setUser(e.target.value)}
|
|
@@ -160,9 +163,21 @@ export default function LoginForm({
|
|
|
160
163
|
placeholder="Password"
|
|
161
164
|
onChange={(e) => setPassword(e.target.value)}
|
|
162
165
|
value={password}
|
|
163
|
-
type=
|
|
166
|
+
type={showPassword ? 'text' : 'password'}
|
|
164
167
|
autoComplete="current-password"
|
|
165
168
|
onKeyPress={handleKeyPress}
|
|
169
|
+
endAdornment={
|
|
170
|
+
<InputAdornment position="end">
|
|
171
|
+
<IconButton
|
|
172
|
+
onClick={() => setShowPassword(!showPassword)}
|
|
173
|
+
edge="end"
|
|
174
|
+
sx={{ color: 'var(--grey800, #666)', mr: 0.5 }}
|
|
175
|
+
aria-label={showPassword ? 'Hide password' : 'Show password'}
|
|
176
|
+
>
|
|
177
|
+
{showPassword ? <VisibilityOffIcon /> : <VisibilityIcon />}
|
|
178
|
+
</IconButton>
|
|
179
|
+
</InputAdornment>
|
|
180
|
+
}
|
|
166
181
|
sx={{
|
|
167
182
|
m: 0,
|
|
168
183
|
border: 'none',
|