Skip to content

Commit

Permalink
Merge pull request #576 from paritshivani/main
Browse files Browse the repository at this point in the history
dev deployment issue
  • Loading branch information
paritshivani authored Sep 5, 2024
2 parents c3ecea0 + 495e421 commit 8fb7172
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 45 deletions.
36 changes: 18 additions & 18 deletions packages/nulp_elite/src/pages/voting/pollsDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const pollsDetailes = () => {

<div>
{polls.length === 0 ? (
<p>{t(NO_POLL_AVAILABLE)}</p>
<p>{t("NO_POLL_AVAILABLE")}</p>
) : (
<Container
maxWidth="xl"
Expand All @@ -164,17 +164,17 @@ const pollsDetailes = () => {
{type === "live" ? (
<Box display="flex">
<DashboardOutlinedIcon style={{ paddingRight: "10px" }} />{" "}
{t(LIVE_POLLS)}
{t("LIVE_POLLS")}
</Box>
) : type === "closed" ? (
<Box display="flex">
<WorkspacePremiumIcon style={{ paddingRight: "10px" }} />{" "}
{t(CLOSED_POLLS)}
{t("CLOSED_POLLS")}
</Box>
) : (
<Box display="flex">
<DashboardOutlinedIcon style={{ paddingRight: "10px" }} />{" "}
{t(DRAFT_POLLS)}
{t("DRAFT_POLLS")}
</Box>
)}
</Box>
Expand All @@ -184,7 +184,7 @@ const pollsDetailes = () => {
className="custom-btn-primary ml-20"
onClick={handleBackNavigate}
>
{t(BACK)}
{t("BACK")}
</Button>
</Box>
</Box>
Expand Down Expand Up @@ -358,7 +358,7 @@ const pollsDetailes = () => {
className="custom-btn-primary ml-20 lg-mt-20"
onClick={(event) => handleEdit(event, items)}
>
{t(EDIT)}{" "}
{t("EDIT")}{" "}
<ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>
<Button
Expand All @@ -369,7 +369,7 @@ const pollsDetailes = () => {
handleDialogOpen(items.poll_id, event);
}}
>
{t(DELETE)}{" "}
{t("DELETE")}{" "}
<ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>
</Box>
Expand All @@ -382,15 +382,15 @@ const pollsDetailes = () => {
handleOpenModal(items.poll_id, event)
}
>
{t(VIEW_STATUS)}{" "}
{t("VIEW_STATUS")}{" "}
<ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>
<Button
onClick={(event) => handleEdit(event, items)}
type="button"
className="custom-btn-primary ml-20 lg-mt-20 mb-10"
>
{t(EDIT)}{" "}
{t("EDIT")}{" "}
<ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>

Expand All @@ -402,7 +402,7 @@ const pollsDetailes = () => {
handleDialogOpen(items.poll_id, event);
}}
>
{t(DELETE)} <ArrowForwardIosOutlinedIcon className="fs-12" />
{t("DELETE")} <ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>
</Box>
) : type === "closed" ? (
Expand All @@ -414,7 +414,7 @@ const pollsDetailes = () => {
handleOpenModal(items.poll_id, event)
}
>
{t(VIEW_RESULT)}{" "}
{t("VIEW_RESULT")}{" "}
<ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>

Expand Down Expand Up @@ -540,7 +540,7 @@ const pollsDetailes = () => {
}}
{...sizing} />
) : (
<Box>{t(NO_DATA_FOUND)}</Box>
<Box>{t("NO_DATA_FOUND")}</Box>
)}
</Box>
</Grid>
Expand All @@ -559,16 +559,16 @@ const pollsDetailes = () => {
</Box>
<Box>
<Box className="mt-9 h5-title">
{t(CREATED_ON)}
{t("CREATED_ON")}
<TodayOutlinedIcon className="fs-14 pr-5" />
{formatDate(signlePOll.created_at)}
</Box>
<Box className="mt-9 h5-title">
{t(ENDED_ON)}
{t("ENDED_ON")}
<TodayOutlinedIcon className="fs-14 pr-5" />{" "}
{formatDate(signlePOll.end_date)}
</Box>
<Box className="mt-9 h5-title">{t(TOTAL_VOTES)}: {totalVotes}</Box>
<Box className="mt-9 h5-title">{t("TOTAL_VOTES")}: {totalVotes}</Box>
</Box>
</Grid>
</Grid>
Expand All @@ -582,20 +582,20 @@ const pollsDetailes = () => {
>
<DialogContent>
<Box className="h5-title">
{t(CONFIRM_POLL_DELETE)}
{t("CONFIRM_POLL_DELETE")}
</Box>

</DialogContent>
<DialogActions>
<Button onClick={handleDialogClose} className="custom-btn-default">
{t(NO)}
{t("NO")}
</Button>
<Button
onClick={(event) => handleDeletePollConfirmed(event)}
className="custom-btn-primary"

>
{t(YES)}
{t("YES")}
</Button>
</DialogActions>
</Dialog>
Expand Down
54 changes: 27 additions & 27 deletions packages/nulp_elite/src/pages/voting/votingDashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ const votingDashboard = () => {
<Grid item xs={12} md={3} className="lg-pl-0">
<FormControl fullWidth>
<InputLabel htmlFor="outlined-adornment-search">
{t(SEARCH_FOR_POLL)}
{t("SEARCH_FOR_POLL")}
</InputLabel>
<OutlinedInput
id="outlined-adornment-search"
Expand All @@ -348,15 +348,15 @@ const votingDashboard = () => {
</IconButton>
</InputAdornment>
}
label= {t(SEARCH_FOR_POLL)}
label= {t("SEARCH_FOR_POLL")}
/>
</FormControl>
</Grid>
<Grid item xs={12} md={3}>
{/* <Box className="ml-20">Select Date Range</Box> */}
<LocalizationProvider dateAdapter={AdapterDayjs}>
<DatePicker
label={t(SELECT_DATE_FROM)}
label={t("SELECT_DATE_FROM")}
value={selectedStartDate}
onChange={(newValue) => setSelectedStartDate(newValue)}
/>
Expand All @@ -365,7 +365,7 @@ const votingDashboard = () => {
<Grid item xs={12} md={3}>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<DatePicker
label={t(SELECT_DATE_TO)}
label={t("SELECT_DATE_TO")}
value={selectedEndDate}
onChange={(newValue) => setSelectedEndDate(newValue)}
/>
Expand All @@ -379,7 +379,7 @@ const votingDashboard = () => {
onClick={handleClearAll}
fullWidth
>
{t(CLEAR_ALL)}
{t("CLEAR_ALL")}
</Button>
</Grid>
</Grid>
Expand All @@ -394,7 +394,7 @@ const votingDashboard = () => {
>
<Box display="flex" alignItems="center" className="h3-title">
<DashboardOutlinedIcon style={{ paddingRight: "10px" }} />
{t(LIVE_POLLS)}
{t("LIVE_POLLS")}
</Box>
{!showAllLive && visibleLivePolls.length >= 3 && (
<Box>
Expand All @@ -403,7 +403,7 @@ const votingDashboard = () => {
className="custom-btn-primary ml-20"
onClick={() => handleViewAll(livePolls, "live")}
>
{t(VIEW_ALL)}
{t("VIEW_ALL")}
</Button>
</Box>
)}
Expand Down Expand Up @@ -571,15 +571,15 @@ const votingDashboard = () => {
handleOpenModal(items.poll_id, event)
}
>
{t(VIEW_STATUS)}{" "}
{t("VIEW_STATUS")}{" "}
<ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>
<Button
onClick={(event) => handleEdit(event, items)}
type="button"
className="custom-btn-primary ml-20 lg-mt-20 mb-10"
>
{t(EDIT)} <ArrowForwardIosOutlinedIcon className="fs-12" />
{t("EDIT")} <ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>
{admin ||
(contentCreator && (
Expand All @@ -591,7 +591,7 @@ const votingDashboard = () => {
handleDialogOpen(items.poll_id, event);
}}
>
{t(DELETE)}{" "}
{t("DELETE")}{" "}
<ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>
))}
Expand Down Expand Up @@ -658,7 +658,7 @@ const votingDashboard = () => {
className="h2-title mt-30"
>
<Alert severity="info" style={{ margin: "10px 0" }}>
{t(NO_POLL_AVAILABLE_NOW)}
{t("NO_POLL_AVAILABLE_NOW")}
</Alert>
</Grid>
)}
Expand All @@ -672,7 +672,7 @@ const votingDashboard = () => {
>
<Box display="flex" alignItems="center" className="h3-title">
<DashboardOutlinedIcon style={{ paddingRight: "10px" }} />
{t(DRAFT_POLLS)}
{t("DRAFT_POLLS")}
</Box>
{!showAllDraft && visibleDraftPolls.length >= 3 && (
<Box>
Expand All @@ -681,7 +681,7 @@ const votingDashboard = () => {
className="custom-btn-primary ml-20"
onClick={() => handleViewAll(draftPolls, "Draft")}
>
{t(VIEW_ALL)}
{t("VIEW_ALL")}
</Button>
</Box>
)}
Expand Down Expand Up @@ -848,7 +848,7 @@ const votingDashboard = () => {
type="button"
className="custom-btn-primary ml-20 lg-mt-20 mb-10"
>
{t(EDIT)} <ArrowForwardIosOutlinedIcon className="fs-12" />
{t("EDIT")} <ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>
<Button
type="button"
Expand All @@ -858,7 +858,7 @@ const votingDashboard = () => {
handleDialogOpen(items.poll_id, event);
}}
>
{t(DELETE)}{" "}
{t("DELETE")}{" "}
<ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>
</Box>
Expand Down Expand Up @@ -924,7 +924,7 @@ const votingDashboard = () => {
className="h2-title mt-30"
>
<Alert severity="info" style={{ margin: "10px 0" }}>
{t(NO_POLL_AVAILABLE_NOW)}
{t("NO_POLL_AVAILABLE_NOW")}
</Alert>
</Grid>
)}
Expand All @@ -947,7 +947,7 @@ const votingDashboard = () => {
className="custom-btn-primary ml-20"
onClick={() => handleViewAll(closedPolls, "closed")}
>
{t(VIEW_ALL)}
{t("VIEW_ALL")}
</Button>
</Box>
)}
Expand Down Expand Up @@ -1117,7 +1117,7 @@ const votingDashboard = () => {
handleDialogOpen(items.poll_id, event);
}}
>
{t(DELETE)}{" "}
{t("DELETE")}{" "}
<ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>
<Button
Expand All @@ -1127,7 +1127,7 @@ const votingDashboard = () => {
handleOpenModal(items.poll_id, event)
}
>
{t(VIEW_RESULT)}{" "}
{t("VIEW_RESULT")}{" "}
<ArrowForwardIosOutlinedIcon className="fs-12" />
</Button>
</Box>
Expand Down Expand Up @@ -1193,7 +1193,7 @@ const votingDashboard = () => {
className="h2-title mt-30"
>
<Alert severity="info" style={{ margin: "10px 0" }}>
{t(NO_POLL_AVAILABLE_NOW)}
{t("NO_POLL_AVAILABLE_NOW")}
</Alert>
</Grid>
)}
Expand Down Expand Up @@ -1263,7 +1263,7 @@ const votingDashboard = () => {
{...sizing}
/>
) : (
<Box>{t(NO_DATA_FOUND)}</Box>
<Box>{t("NO_DATA_FOUND")}</Box>
)}
</Box>
</Grid>
Expand All @@ -1283,7 +1283,7 @@ const votingDashboard = () => {
<Box>
<Box>
<Box className="mt-9 h5-title">
{t(CREATED_ON)}:
{t("CREATED_ON")}:
<TodayOutlinedIcon
className="fs-14 pr-5"
style={{ verticalAlign: "middle" }}
Expand All @@ -1293,7 +1293,7 @@ const votingDashboard = () => {
)}
</Box>
<Box className="mt-9 h5-title">
{t(ENDED_ON)}:
{t("ENDED_ON")}:
<TodayOutlinedIcon
className="fs-14 pr-5"
style={{ verticalAlign: "middle" }}
Expand All @@ -1303,7 +1303,7 @@ const votingDashboard = () => {
)}
</Box>
<Box className="mt-9 h5-title">
{t(TOTAL_VOTES)}: {totalVotes}
{t("TOTAL_VOTES")}: {totalVotes}
</Box>
</Box>
</Box>
Expand All @@ -1314,21 +1314,21 @@ const votingDashboard = () => {
<Dialog open={dialogOpen} onClose={handleDialogClose}>
<DialogContent>
<Box className="h5-title">
{t(CONFIRM_POLL_DELETE)}
{t("CONFIRM_POLL_DELETE")}
</Box>
</DialogContent>
<DialogActions>
<Button
onClick={handleDialogClose}
className="custom-btn-default"
>
{t(NO)}
{t("NO")}
</Button>
<Button
onClick={(event) => handleDeletePollConfirmed(event)}
className="custom-btn-primary"
>
{t(YES)}
{t("YES")}

</Button>
</DialogActions>
Expand Down

0 comments on commit 8fb7172

Please sign in to comment.