Skip to content

Commit

Permalink
Merge pull request #75 from rahulg1254/admin-master
Browse files Browse the repository at this point in the history
Task #223691 feat: Changes as per discussion in demo
itsvick authored Jul 31, 2024
2 parents bc20faa + 1f3ed7a commit a4c26ea
Showing 2 changed files with 6 additions and 10 deletions.
5 changes: 3 additions & 2 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
@@ -39,8 +39,9 @@
"ADD_STATE_CODE": "Code",
"NAME_REQUIRED": "Name is Required",
"CODE_REQUIRED": "Code is Required",
"CODE_NOTIFICATION": "Code should contain exactly 2 uppercase letters",
"USER_DELETE_SUCCSSFULLY": "User deleted Successfully"
"CODE_NOTIFICATION": "Code Should Be Fill With Captial Letters",
"USER_DELETE_SUCCSSFULLY": "User deleted Successfully",
"STATE_NAME": "State Name"
},
"LOGIN_PAGE": {
"USERNAME": "Username",
11 changes: 3 additions & 8 deletions src/components/AddStateModal.tsx
Original file line number Diff line number Diff line change
@@ -44,7 +44,6 @@ const AddStateModal: React.FC<AddStateModalProps> = ({
const { t } = useTranslation();

useEffect(() => {
// Update form fields if initialValues change
setName(initialValues.name || "");
setValue(initialValues.value || "");
setNameError(null);
@@ -87,7 +86,7 @@ const AddStateModal: React.FC<AddStateModalProps> = ({
<TextField
autoFocus
margin="dense"
label={t("COMMON.NAME")}
label={t("COMMON.STATE_NAME")}
type="text"
fullWidth
variant="outlined"
@@ -115,14 +114,10 @@ const AddStateModal: React.FC<AddStateModalProps> = ({
</Box>
</DialogContent>
<DialogActions>
<Button onClick={onClose} color="primary" sx={{ bgcolor: "#E5E5E5" }}>
<Button onClick={onClose} color="primary">
{t("COMMON.CANCEL")}
</Button>
<Button
onClick={handleSubmit}
color="primary"
sx={{ bgcolor: "#E5E5E5" }}
>
<Button onClick={handleSubmit} color="secondary">
{t("COMMON.SUBMIT")}
</Button>
</DialogActions>

0 comments on commit a4c26ea

Please sign in to comment.