Merge branch 'feature/debug_manifest' into 'develop'
Feature/debug manifest See merge request witel3/loan-facilities-expert!63
This commit is contained in:
@@ -2,6 +2,18 @@ NEXT_PUBLIC_API_NAME = "Loan Facilities Dashboard"
|
|||||||
NEXT_PUBLIC_DEFAULT_LANGUAGE = "fa"
|
NEXT_PUBLIC_DEFAULT_LANGUAGE = "fa"
|
||||||
NEXT_PUBLIC_DEFAULT_DIRECTION = "rtl"
|
NEXT_PUBLIC_DEFAULT_DIRECTION = "rtl"
|
||||||
|
|
||||||
|
|
||||||
|
NEXT_PUBLIC_PRIMARY_MAIN = "#084070"
|
||||||
|
NEXT_PUBLIC_PRIMARY_CONTRAST_TEXT = "#fff"
|
||||||
|
NEXT_PUBLIC_PRIMARY_LIGHT = "#2c6291"
|
||||||
|
NEXT_PUBLIC_PRIMARY_DARK = "#11293e"
|
||||||
|
|
||||||
|
|
||||||
|
NEXT_PUBLIC_SECONDARY_MAIN = "#FF4E00"
|
||||||
|
NEXT_PUBLIC_SECONDARY_CONTRAST_TEXT = "#fff"
|
||||||
|
NEXT_PUBLIC_SECONDARY_LIGHT = "#ed743e"
|
||||||
|
NEXT_PUBLIC_SECONDARY_DARK = "#ad3a07"
|
||||||
|
|
||||||
NEXT_PUBLIC_API_URL = "http://Your IP:3000"
|
NEXT_PUBLIC_API_URL = "http://Your IP:3000"
|
||||||
|
|
||||||
NEXT_PUBLIC_BASE_URL = "deploy api"
|
NEXT_PUBLIC_BASE_URL = "deploy api"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const nextConfig = {
|
|||||||
defaultLocale: 'fa',
|
defaultLocale: 'fa',
|
||||||
locales: ['fa'],
|
locales: ['fa'],
|
||||||
localeDetection: false,
|
localeDetection: false,
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = nextConfig
|
module.exports = nextConfig
|
||||||
|
|||||||
BIN
public/icons/favicon.png
Normal file
BIN
public/icons/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
57
public/manifest.json
Normal file
57
public/manifest.json
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"short_name": "Loan Facilities Dashboard",
|
||||||
|
"name": "Loan Facilities Expert Dashboard",
|
||||||
|
"description": "Loan Facilities",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"version_name": "1.0.0 beta",
|
||||||
|
"start_url": "/dashboard",
|
||||||
|
"orientation": "portrait",
|
||||||
|
"display": "standalone",
|
||||||
|
"theme_color": "#084070",
|
||||||
|
"background_color": "#084070",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "/icons/maskable_icon.png",
|
||||||
|
"sizes": "any",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/maskable_icon_x48.png",
|
||||||
|
"sizes": "48x48",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/maskable_icon_x72.png",
|
||||||
|
"sizes": "72x72",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/maskable_icon_x96.png",
|
||||||
|
"sizes": "96x96",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/maskable_icon_x128.png",
|
||||||
|
"sizes": "128x128",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/maskable_icon_x192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/maskable_icon_x384.png",
|
||||||
|
"sizes": "384x384",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "/icons/maskable_icon_x512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"categories": [
|
||||||
|
"government"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -96,7 +96,7 @@ const DashboardChangePasswordComponent = () => {
|
|||||||
<Box
|
<Box
|
||||||
sx={{position: "relative", width: "100%", height: 200}}
|
sx={{position: "relative", width: "100%", height: 200}}
|
||||||
>
|
>
|
||||||
<Image fill src="/images/change-password.svg" alt=""/>
|
<Image fill src="/images/change-password.svg" alt="" priority/>
|
||||||
</Box>
|
</Box>
|
||||||
<Typography margin={2} variant="h4" textAlign="center">
|
<Typography margin={2} variant="h4" textAlign="center">
|
||||||
{t("ChangePassword.typography_change_password")}
|
{t("ChangePassword.typography_change_password")}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ const LoginComponent = () => {
|
|||||||
<Box
|
<Box
|
||||||
sx={{position: "relative", width: "100%", height: 200}}
|
sx={{position: "relative", width: "100%", height: 200}}
|
||||||
>
|
>
|
||||||
<Image fill src="/images/login.svg" alt={t("app_name")}/>
|
<Image fill src="/images/login.svg" alt={t("app_name")} priority/>
|
||||||
</Box>
|
</Box>
|
||||||
<Typography margin={2} variant="h4" textAlign="center">
|
<Typography margin={2} variant="h4" textAlign="center">
|
||||||
{t("login_expert")}
|
{t("login_expert")}
|
||||||
|
|||||||
@@ -3,16 +3,16 @@ import {faIR} from "@mui/x-date-pickers/locales";
|
|||||||
const theme = {
|
const theme = {
|
||||||
palette: {
|
palette: {
|
||||||
primary: {
|
primary: {
|
||||||
main: "#084070",
|
main: process.env.NEXT_PUBLIC_PRIMARY_MAIN,
|
||||||
contrastText: "#fff",
|
contrastText: process.env.NEXT_PUBLIC_PRIMARY_CONTRAST_TEXT,
|
||||||
light: "#2c6291",
|
light: process.env.NEXT_PUBLIC_PRIMARY_LIGHT,
|
||||||
dark: "#11293e",
|
dark: process.env.NEXT_PUBLIC_PRIMARY_DARK,
|
||||||
},
|
},
|
||||||
secondary: {
|
secondary: {
|
||||||
main: "#FF4E00",
|
main: process.env.NEXT_PUBLIC_SECONDARY_MAIN,
|
||||||
contrastText: "#fff",
|
contrastText: process.env.NEXT_PUBLIC_SECENDARY_CONTRAST_TEXT,
|
||||||
light: "#ed743e",
|
light: process.env.NEXT_PUBLIC_SECENDARY_LIGHT,
|
||||||
dark: "#ad3a07",
|
dark: process.env.NEXT_PUBLIC_SECENDARY_DARK,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
faIR,
|
faIR,
|
||||||
|
|||||||
@@ -83,13 +83,13 @@ function AppLayout({children, isBot}) {
|
|||||||
rel="icon"
|
rel="icon"
|
||||||
type="image/svg"
|
type="image/svg"
|
||||||
sizes="32x32"
|
sizes="32x32"
|
||||||
href="/images/logo.png"
|
href="/icons/favicon.png"
|
||||||
/>
|
/>
|
||||||
<link
|
<link
|
||||||
rel="icon"
|
rel="icon"
|
||||||
type="image/svg"
|
type="image/svg"
|
||||||
sizes="16x16"
|
sizes="16x16"
|
||||||
href="/images/logo.png"
|
href="/icons/favicon.png"
|
||||||
/>
|
/>
|
||||||
</Head>
|
</Head>
|
||||||
<NextNProgress
|
<NextNProgress
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import {Divider, Stack, Toolbar, Typography} from "@mui/material";
|
import {Divider, Stack, Toolbar, Typography} from "@mui/material";
|
||||||
import {useTranslations} from "next-intl";
|
import {useTranslations} from "next-intl";
|
||||||
import SidebarList from "./SidebarList";
|
import SidebarList from "./SidebarList";
|
||||||
|
import useUser from "@/lib/app/hooks/useUser";
|
||||||
|
|
||||||
const SidebarDrawer = ({handleDrawerToggle}) => {
|
const SidebarDrawer = ({handleDrawerToggle}) => {
|
||||||
|
const {user} = useUser()
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -12,10 +14,7 @@ const SidebarDrawer = ({handleDrawerToggle}) => {
|
|||||||
{t("app_short_name")}
|
{t("app_short_name")}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="caption">
|
<Typography variant="caption">
|
||||||
{
|
{user.name} | {user.position}
|
||||||
t("expert") /* make if on thease t("user_welfare_services")
|
|
||||||
t("user_navy") */
|
|
||||||
}
|
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {NextLinkComposed} from "@/core/components/LinkRouting";
|
import {NextLinkComposed} from "@/core/components/LinkRouting";
|
||||||
import ExpandLess from "@mui/icons-material/ExpandLess";
|
import ExpandLess from "@mui/icons-material/ExpandLess";
|
||||||
import ExpandMore from "@mui/icons-material/ExpandMore";
|
import ExpandMore from "@mui/icons-material/ExpandMore";
|
||||||
import {Badge, ListItem, ListItemButton, ListItemIcon, ListItemText, Typography,} from "@mui/material";
|
import {Badge, IconButton, ListItem, ListItemButton, ListItemIcon, ListItemText, Typography,} from "@mui/material";
|
||||||
import {useTranslations} from "next-intl";
|
import {useTranslations} from "next-intl";
|
||||||
import {Fragment} from "react";
|
import {Fragment} from "react";
|
||||||
import SidebarListSubItem from "./SidebarListSubItem";
|
import SidebarListSubItem from "./SidebarListSubItem";
|
||||||
@@ -11,7 +11,19 @@ const SidebarListItem = ({item, dispatch, handleDrawerToggle}) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment key={item.key}>
|
<Fragment key={item.key}>
|
||||||
<ListItem disablePadding sx={{display: "block"}}>
|
<ListItem disablePadding secondaryAction={
|
||||||
|
<IconButton>
|
||||||
|
<Badge
|
||||||
|
badgeContent="56"
|
||||||
|
color="error"
|
||||||
|
variant="standard"
|
||||||
|
anchorOrigin={{
|
||||||
|
vertical: "top",
|
||||||
|
horizontal: "right",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</IconButton>
|
||||||
|
}>
|
||||||
<ListItemButton
|
<ListItemButton
|
||||||
selected={item.selected}
|
selected={item.selected}
|
||||||
{...(item.type == "page" && {
|
{...(item.type == "page" && {
|
||||||
@@ -29,6 +41,7 @@ const SidebarListItem = ({item, dispatch, handleDrawerToggle}) => {
|
|||||||
sx={{
|
sx={{
|
||||||
minHeight: 48,
|
minHeight: 48,
|
||||||
}}
|
}}
|
||||||
|
|
||||||
>
|
>
|
||||||
<ListItemIcon
|
<ListItemIcon
|
||||||
sx={{
|
sx={{
|
||||||
@@ -51,17 +64,9 @@ const SidebarListItem = ({item, dispatch, handleDrawerToggle}) => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
{item.type == "menu" &&
|
{item.type == "menu" &&
|
||||||
(item.showSubItem ? <ExpandLess/> : <ExpandMore/>)}
|
(item.showSubItem ? <ExpandLess/> : <ExpandMore/>)}
|
||||||
<Badge
|
|
||||||
badgeContent="21"
|
|
||||||
color="error"
|
|
||||||
variant="standard"
|
|
||||||
anchorOrigin={{
|
|
||||||
vertical: "top",
|
|
||||||
horizontal: "right",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
{item.subItem && (
|
{item.subItem && (
|
||||||
|
|||||||
@@ -9,13 +9,14 @@ import {NextIntlProvider} from "next-intl";
|
|||||||
import TitlePage from "@/core/components/TitlePage";
|
import TitlePage from "@/core/components/TitlePage";
|
||||||
|
|
||||||
const App = ({Component, pageProps}) => {
|
const App = ({Component, pageProps}) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<UserProvider>
|
<UserProvider>
|
||||||
<LanguageProvider>
|
<LanguageProvider>
|
||||||
<NextIntlProvider messages={pageProps.messages || {}}>
|
<NextIntlProvider messages={pageProps.messages || {}}>
|
||||||
<MuiLayout isBot={pageProps.isBot}>
|
<MuiLayout isBot={pageProps.isBot}>
|
||||||
{pageProps.message ? <TitlePage text={pageProps.title}/> : ''}
|
{pageProps.messages ? <TitlePage text={pageProps.title}/> : ''}
|
||||||
<LoadingProvider>
|
<LoadingProvider>
|
||||||
<AppLayout isBot={pageProps.isBot}>
|
<AppLayout isBot={pageProps.isBot}>
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export default function MyDocument(props) {
|
|||||||
<Head>
|
<Head>
|
||||||
<meta name="theme-color" content={theme.palette.primary.main}/>
|
<meta name="theme-color" content={theme.palette.primary.main}/>
|
||||||
<meta name="emotion-insertion-point" content=""/>
|
<meta name="emotion-insertion-point" content=""/>
|
||||||
<link rel="shortcut icon" href="/icons/favicon.ico"/>
|
<link rel="shortcut icon" href="/icons/favicon.png"/>
|
||||||
<link rel="manifest" href="/manifest.json"/>
|
<link rel="manifest" href="/manifest.json"/>
|
||||||
{emotionStyleTags}
|
{emotionStyleTags}
|
||||||
</Head>
|
</Head>
|
||||||
|
|||||||
Reference in New Issue
Block a user