Changeset 9d40151 for pages


Ignore:
Timestamp:
02/25/26 20:46:23 (5 months ago)
Author:
Mihail <mihail2.naumov@…>
Branches:
main
Children:
ad3c219
Parents:
4f2900a
Message:

Fixed total build price error and other small errors.

Location:
pages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pages/dashboard/admin/+Page.tsx

    r4f2900a r9d40151  
    352352                            }}>
    353353                                {data.pendingBuilds.map((build: any) => (
    354                                     <Box key={build.id}>
     354                                    <Box key={build.id} sx={{
     355                                        display: 'flex',
     356                                        flexDirection: 'column',
     357                                        borderRadius: 2,
     358                                        overflow: 'hidden',
     359                                        bgcolor: 'background.paper'
     360                                    }}>
    355361                                        <BuildCard
    356362                                            build={build}
    357363                                            onClick={() => setSelectedBuildId(build.id)}
    358364                                        />
    359                                         <Box sx={{mt: 1, display: 'flex', gap: 1, justifyContent: 'center'}}>
    360                                             <Button
    361                                                 variant="contained"
    362                                                 color="warning"
    363                                                 size="small"
    364                                                 startIcon={<BuildIcon/>}
    365                                                 onClick={(e) => {
    366                                                     e.stopPropagation();
    367                                                     openBuildApproval(build.id, build.name);
    368                                                 }}
    369                                             >
    370                                                 Review
    371                                             </Button>
    372                                         </Box>
     365                                        <Button
     366                                            variant="contained"
     367                                            color="warning"
     368                                            size="small"
     369                                            fullWidth
     370                                            startIcon={<BuildIcon/>}
     371                                            onClick={(e) => {
     372                                                e.stopPropagation();
     373                                                openBuildApproval(build.id, build.name);
     374                                            }}
     375                                            sx={{borderRadius: 0}}
     376                                        >
     377                                            Review
     378                                        </Button>
    373379                                    </Box>
    374380                                ))}
     381
    375382                            </Box>
    376383                        )}
  • pages/forge/+Page.tsx

    r4f2900a r9d40151  
    22import {
    33    Container, Paper, Typography, Box, Table, TableBody, TableCell, TableContainer, TableHead, TableRow,
    4     Button, IconButton, Avatar, TextField, Grid, Chip, CircularProgress,
     4    Button, IconButton, Avatar, TextField, Chip, CircularProgress,
    55    Menu, MenuItem, ListItemIcon, Dialog, DialogTitle, DialogContent, DialogActions
    66} from '@mui/material';
     
    7474        if (buildId && buildName.trim()) {
    7575            const timeoutId = setTimeout(() => {
    76                 saveBuildState({buildId, name: buildName.trim(), description});
     76                saveBuildState({buildId, name: buildName.trim(), description}).catch(() => {
     77                });
    7778            }, 1000);
    7879
     
    326327        const slot = slots.find(s => s.id === slotId);
    327328        if (slot?.component) {
    328             handleRemovePart(slotId);
     329            handleRemovePart(slotId).catch(() => {
     330            });
    329331        }
    330332        setSlots(prev => prev.filter(s => s.id !== slotId));
     
    388390                severity: 'error'
    389391            });
     392            return;
    390393        } finally {
    391394            setIsSubmitting(false);
     
    402405            <Paper sx={{p: 4, mb: 0, bgcolor: '#ff8201', border: '1px solid #1e1e1e', color: 'white'}}>
    403406                <Typography variant="h4" align="center" fontWeight="bold">Forge Your Machine</Typography>
    404                 <Grid container spacing={2} justifyContent="center" sx={{mt: 2}}>
    405                     <Grid item xs={12} md={6}>
    406                         <TextField
    407                             fullWidth
    408                             label="Build Name *"
    409                             value={buildName}
    410                             onChange={e => setBuildName(e.target.value)}
    411                             sx={{bgcolor: '#1e1e1e', borderRadius: 1, color: 'white'}}
    412                         />
    413                     </Grid>
    414                 </Grid>
     407                <Box sx={{display: 'flex', justifyContent: 'center', mt: 2}}>
     408                    <TextField
     409                        label="Build Name *"
     410                        value={buildName}
     411                        onChange={e => setBuildName(e.target.value)}
     412                        sx={{bgcolor: '#1e1e1e', textAlign: 'center', borderRadius: 1, color: 'white', width: '200px'}}
     413                    />
     414                </Box>
     415
    415416            </Paper>
    416417
     
    580581                            sx: {
    581582                                position: 'absolute',
    582                                 top: '30%',
     583                                top: '46%',
    583584                                // left: '50%',
    584585                                // transform: 'translate(50%, +50%)',
Note: See TracChangeset for help on using the changeset viewer.