typo fixing feedback

dev
Aji Kamaludin 3 years ago
parent a556c0454c
commit 70a2ac354e
No known key found for this signature in database
GPG Key ID: 670E1F26AD5A8099

@ -4,7 +4,8 @@ import {
Container,
Flex,
Box,
useBreakpointValue
useBreakpointValue,
Link
} from "@chakra-ui/react";
import Sidebar from "../components/Layout/Sidebar"
@ -47,7 +48,11 @@ export default function DashboardLayout(props) {
return (
<Flex flexShrink>
<Sidebar isOpen={isSidebarOpen} variant={variants?.navigation} onClose={toggleSidebar}/>
<Sidebar
isOpen={isSidebarOpen}
variant={variants?.navigation}
onClose={toggleSidebar}
/>
<Box ml={!variants?.navigationButton && 200} flex="1">
<Header
showSidebarButton={variants?.navigationButton}
@ -55,30 +60,43 @@ export default function DashboardLayout(props) {
onLogout={handleLogout}
user={user}
/>
<Container maxW={{base: "80rem", xl: "110rem"}} py="10" bg="gray.100" minH={{ base: "38rem", sm: "40rem", xl: "53.5rem"}}>
<Container
maxW={{ base: '80rem', xl: '110rem' }}
py="10"
bg="gray.100"
minH={{ base: '38rem', sm: '40rem', xl: '53.5rem' }}
>
{/* Content */}
<Suspense fallback={<Loading/>}>
<Suspense fallback={<Loading />}>
<Switch>
{routes.map((route, index) => {
return route.component ? (
<Route
<Route
name={route.name}
path={route.path}
exact={route.exact}
render={props => <route.component {...props} />}
render={(props) => <route.component {...props} />}
key={index}
/>
) : null
) : null;
})}
<Redirect from="/" exact={true} to="/dashboard" />
<Route path="*" component={NotFound}/>
<Route path="*" component={NotFound} />
</Switch>
</Suspense>
</Container>
<Box bg="red" minH="1" maxW={{base: "90rem", xl: "110rem"}} p="4" color="white">
&copy; {(new Date()).getFullYear()} kasirAja dev
<Box
bg="red"
minH="1"
maxW={{ base: '90rem', xl: '110rem' }}
p="4"
color="white"
>
<Link href="https://github.com/ajikamaludin/" target="_blank">
&copy; {new Date().getFullYear()} kasirAja dev
</Link>
</Box>
</Box>
</Flex>
)
);
}

@ -109,7 +109,7 @@ export default function Dashboard(props) {
</Card>
<Card flex="4" mt="2">
<Stat>
<StatLabel>labar kotor</StatLabel>
<StatLabel>laba kotor</StatLabel>
<StatNumber>{formatIDR(grossProfit)}</StatNumber>
</Stat>
</Card>

@ -109,6 +109,14 @@ export default function Create() {
const handleCreatePurchase = () => {
if(items.length <= 0) {
toast({
title: 'error',
description: 'item produk kosong',
status: 'warning',
isClosable: true,
duration: 6000,
position: 'top-right',
});
return
}
setSummit(true)

@ -123,9 +123,25 @@ export default function Create() {
const handlePay = () => {
if(customer.name === "") {
return
toast({
title: 'error',
description: 'pelanggan kosong',
status: 'warning',
isClosable: true,
duration: 6000,
position: 'top-right',
});
return
}
if(items.length <= 0) {
toast({
title: 'error',
description: 'item produk kosong',
status: 'warning',
isClosable: true,
duration: 6000,
position: 'top-right',
});
return
}
if(payAmount === "" || +payAmount <= 0) {
@ -166,6 +182,14 @@ export default function Create() {
})
}, user.accessToken)
.then((res) => {
toast({
title: 'success',
description: res.message,
status: 'success',
isClosable: true,
duration: 2000,
position: 'top-right',
});
toggleChange()
})
.catch(err => {

Loading…
Cancel
Save