Skip to content

Commit

Permalink
Task #224976: add logo on login page , header Component,favicon of pr…
Browse files Browse the repository at this point in the history
…oject,add reason for absent attendance , update code conditions on create leaners model
  • Loading branch information
upendraTekdi committed Aug 19, 2024
1 parent e4ab889 commit 23a97de
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 12 deletions.
Binary file added public/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
"src": "/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "/logo.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
7 changes: 6 additions & 1 deletion src/components/AddLeanerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@ const AddLearnerModal: React.FC<AddLearnerModalProps> = ({
}
});

if (!isEditModal) {
if (
!isEditModal &&
fieldData?.state?.blockId &&
fieldData?.state?.stateId &&
fieldData?.state?.districtId
) {
apiBody.customFields.push({
fieldId: fieldData?.state?.blockId,
value: [fieldData?.state?.blockCode],
Expand Down
12 changes: 9 additions & 3 deletions src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import PersonOutlineOutlinedIcon from '@mui/icons-material/PersonOutlineOutlined
import accountIcon from './../assets/images/account.svg';
import dynamic from 'next/dynamic';
import { logEvent } from '@/utils/googleAnalytics';
import logoLight from '../../public/images/logo-light.png';
// import logoLight from '../../public/images/logo-light.png';
import logoLight from '../../public/images/logo.png';
import menuIcon from '../assets/images/menuIcon.svg';
import { useTheme } from '@mui/material/styles';
import { useTranslation } from 'next-i18next';
Expand Down Expand Up @@ -202,9 +203,14 @@ const Header: React.FC = () => {
<MenuItem
onClick={logoutOpen}
disableRipple
sx={{ 'letter-spacing': 'normal', color: theme.palette.warning['300'] }}
sx={{
'letter-spacing': 'normal',
color: theme.palette.warning['300'],
}}
>
<LogoutOutlinedIcon sx={{ color: theme.palette.warning['300'] }} />
<LogoutOutlinedIcon
sx={{ color: theme.palette.warning['300'] }}
/>
{t('COMMON.LOGOUT')}
</MenuItem>
</StyledMenu>
Expand Down
3 changes: 2 additions & 1 deletion src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ export default function Document() {
<Html lang="en">
<Head>
<link rel="manifest" href="/manifest.json" />
<link rel="shortcut icon" href="/images/favicon.ico" />
{/* <link rel="shortcut icon" href="/images/favicon.ico" /> */}
<link rel="shortcut icon" href="/images/logo.png" />
</Head>
<body>
<Main />
Expand Down
5 changes: 4 additions & 1 deletion src/pages/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,8 @@ const Dashboard: React.FC<DashboardProps> = () => {
contextId: classId,
scope: 'self',
attendanceLocation,
// reason: selectedAttendance === attendanceType.ABSENT ? reasonOfAbsent : '',
absentReason:
selectedAttendance === attendanceType.ABSENT ? reasonOfAbsent : '',
};

try {
Expand Down Expand Up @@ -1157,6 +1158,7 @@ const Dashboard: React.FC<DashboardProps> = () => {
color="success"
style={{
fill: theme.palette.success.main,
marginLeft: '4px',
}}
/>
) : (
Expand All @@ -1165,6 +1167,7 @@ const Dashboard: React.FC<DashboardProps> = () => {
// color="error"
style={{
fill: theme.palette.error.main,
marginLeft: '4px',
}}
/>
)}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
import Image from 'next/image';
import { useRouter } from 'next/router';
import config from '../../config.json';
import appLogo from '../../public/images/appLogo.png';
// import appLogo from '../../public/images/appLogo.png';
import appLogo from '../../public/images/logo.png';
import Loader from '../components/Loader';
import { login } from '../services/LoginService';
import { getUserId } from '../services/ProfileService';
Expand Down
4 changes: 2 additions & 2 deletions src/services/AttendanceService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const markAttendance = async ({
attendance,
scope,
attendanceLocation,
reason,
absentReason,
}: MarkAttendanceParams): Promise<any> => {
const apiUrl: string = `${process.env.NEXT_PUBLIC_BASE_URL}/attendance`;
const { latitude, longitude } = attendanceLocation;
Expand All @@ -48,7 +48,7 @@ export const markAttendance = async ({
scope,
latitude,
longitude,
reason,
absentReason,
});
return response?.data;
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/Interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export interface MarkAttendanceParams {
contextId: string;
attendance: string;
scope: string;
reason?: string;
absentReason?: string;
attendanceLocation: any;
}

Expand Down
4 changes: 2 additions & 2 deletions src/utils/app.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ export enum CenterType {
}

export enum RoleId {
STUDENT = '493c04e2-a9db-47f2-b304-503da358d5f4',
TEACHER = '3bde0028-6900-4900-9d05-eeb608843718',
STUDENT = '3eb5d425-f0f1-4d99-a27d-85ec63101bcc',
TEACHER = 'f9646ef7-4c3b-4fa0-90ba-e24019ae686f',
TEAM_LEADER = '9dd9328f-1bc7-444f-96e3-c5e1daa3514a',
ADMIN = 'ee482faf-8a41-45fe-9656-5533dd6a787c',
}
Expand Down

0 comments on commit 23a97de

Please sign in to comment.