Skip to content

Commit

Permalink
feat: tasks 492 and 488
Browse files Browse the repository at this point in the history
  • Loading branch information
codaisa committed Feb 4, 2024
1 parent 90a062d commit 799f39d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -829,4 +829,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: e6765d09fa16178cb1c9d5132c176055a3f545bc

COCOAPODS: 1.14.3
COCOAPODS: 1.12.1
2 changes: 2 additions & 0 deletions src/i18n/langs/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ const enTranslation = {
nin_description: 'National Identification Number',
},
details: {
subject: 'Principal Subject',
school: 'School',
editTeacher: 'Edit teacher',
description: '{{subject}} teacher at {{school}}',
},
Expand Down
2 changes: 2 additions & 0 deletions src/i18n/langs/np.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ const npTranslation = {
nin_description: 'शिक्षकको कोड',
},
details: {
subject: 'मुख्य विषय',
school: 'बिद्यालय',
editTeacher: 'शिक्षक सम्पादन गर्नुहोस्',
description: '{{subject}} मा {{school}} शिक्षक',
},
Expand Down
24 changes: 21 additions & 3 deletions src/screens/Teacher/TeacherDetails/TeacherHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,27 @@ const TeacherHeader: React.FC<Props> = ({
{name}
</Text>

<Text fontSize={'TMD'} fontWeight={400} color={'gray.800'}>
{t('teacher.details.description', {subject, school})}
</Text>
<HStack justifyContent={'space-between'} space={2}>
<VStack>
<Text fontSize={'TXS'} fontWeight={400} color={'gray.600'}>
{t('teacher.details.subject')}
Principal Subject
</Text>
<Text fontSize={'TSM'} fontWeight={400} color={'gray.800'}>
{subject}
</Text>
</VStack>

<VStack alignItems={'flex-start'}>
<Text fontSize={'TXS'} fontWeight={400} color={'gray.600'}>
{t('teacher.details.school')}
School
</Text>
<Text fontSize={'TSM'} fontWeight={400} color={'gray.800'}>
{school}
</Text>
</VStack>
</HStack>
</VStack>
);
};
Expand Down
7 changes: 4 additions & 3 deletions src/services/session.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ export const SessionService = {
const result = (await db.executeSql(
`
SELECT s.*
FROM session as s
WHERE s.teacher_id = ?
LIMIT ?
FROM session as s
WHERE s.teacher_id = ?
ORDER BY created_at DESC
LIMIT ?
OFFSET ?
`,
[teacher_id, pageSize, (pageNumber - 1) * pageSize],
Expand Down

0 comments on commit 799f39d

Please sign in to comment.