Skip to content

Commit

Permalink
Merge pull request #473 from mahajanmahesh935/oblf
Browse files Browse the repository at this point in the history
TASK #00000 : Add program field in list view for student and teacher
  • Loading branch information
itsvick authored Jan 20, 2025
2 parents 092f220 + f6e4754 commit b5c0fdd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 4 additions & 2 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@
"TO_TIME": "To Time",
"CLUSTER_NAME_REQUIRED": "Cluster Name Required",
"SCHOOL_CODE_NOT_UNIQUE": "School Code Not Unique",
"GRADE":"Grade"
"GRADE":"Grade",
"SUPERVISOR":"Supervisor"
},
"FORM_ERROR_MESSAGES": {
"INVALID_INPUT": "Invalid Input.",
Expand Down Expand Up @@ -464,6 +465,7 @@
"ARCHIVED_MEMBERS": "Archived Members",
"ACTIVE_MEMBERS": "Active Members",
"ACTIVE_LEARNERS": "Active Students",
"ARCHIVED_LEARNERS": " Archived Students"
"ARCHIVED_LEARNERS": " Archived Students",
"PROGRAM":"Program"
}
}
4 changes: 4 additions & 0 deletions src/components/UserTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,9 @@ const UserTable: React.FC<UserTableProps> = ({
const stateField = user?.customFields?.find(
(field: any) => field?.label === "STATES"
);

const programField = user?.customFields.find((field: any) => field.label === "PROGRAM");
const program = programField?.value || "-";

return {
userId: user.userId,
Expand Down Expand Up @@ -752,6 +755,7 @@ const UserTable: React.FC<UserTableProps> = ({
stateCode: stateField?.code,
districtCode: districtField?.code,
blockCode: blockField?.code,
program :program
// centers: null,
// Programs: null,
};
Expand Down
2 changes: 2 additions & 0 deletions src/data/tableColumns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const getUserTableColumns = (t: any, isMobile: boolean) => {
// { key: "district", titleKey: "TABLE_TITLE.DISTRICT_BLOCK", width: 160 },
// { key: "blocks", titleKey: "TABLE_TITLE.BLOCK", width: 130},
{ key: "centers", titleKey: "TABLE_TITLE.CENTER", width: 180 },
{ key: "program", titleKey: "TABLE_TITLE.PROGRAM", width: 180 },
// { key: "updatedBy", titleKey: "TABLE_TITLE.UPDATED_BY", width: 160 },
{ key: "createdBy", titleKey: "TABLE_TITLE.CREATED_BY", width: 130, sortDirection: SortDirection.Ascend },
// { key: "createdAt", titleKey: "TABLE_TITLE.CREATED_DATE", width: 160, sortDirection: SortDirection.Ascend },
Expand All @@ -51,6 +52,7 @@ export const getTeacherColumns = (t: any, isMobile: boolean) => {
// { key: "district", titleKey: "TABLE_TITLE.DISTRICT_BLOCK", width: 160 },
// { key: "blocks", titleKey: "TABLE_TITLE.BLOCK", width: 130},
{ key: "centers", titleKey: "TABLE_TITLE.CENTER", width: 180 },
{ key: "program", titleKey: "TABLE_TITLE.PROGRAM", width: 180 },
// { key: "updatedBy", titleKey: "TABLE_TITLE.UPDATED_BY", width: 160 },
// { key: "createdBy", titleKey: "TABLE_TITLE.CREATED_BY", width: 130, sortDirection: SortDirection.Ascend },
// { key: "createdAt", titleKey: "TABLE_TITLE.CREATED_DATE", width: 160, sortDirection: SortDirection.Ascend },
Expand Down

0 comments on commit b5c0fdd

Please sign in to comment.