Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
Lamarts mobile app angular
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arko Dey Bhowmick
Lamarts mobile app angular
Commits
325a1ffa
Commit
325a1ffa
authored
Jun 18, 2025
by
achinta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: atuh issue
parent
f7b8595a
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
40 additions
and
30 deletions
+40
-30
src/app/app.component.ts
src/app/app.component.ts
+0
-3
src/app/auth/before-login/before-login.component.ts
src/app/auth/before-login/before-login.component.ts
+0
-1
src/app/auth/guard/verify-role.guard.ts
src/app/auth/guard/verify-role.guard.ts
+3
-3
src/app/auth/login/login.component.html
src/app/auth/login/login.component.html
+2
-2
src/app/auth/login/login.component.ts
src/app/auth/login/login.component.ts
+16
-7
src/app/auth/service/send-otp.service.ts
src/app/auth/service/send-otp.service.ts
+5
-6
src/app/component-library/custom-table/custom-table.component.ts
.../component-library/custom-table/custom-table.component.ts
+2
-2
src/app/component-library/white-card/white-card.component.scss
...pp/component-library/white-card/white-card.component.scss
+1
-1
src/app/portal/assignment/manage/manage.component.ts
src/app/portal/assignment/manage/manage.component.ts
+1
-1
src/app/portal/assignment/service/prepare-assignment-table-data.service.ts
...signment/service/prepare-assignment-table-data.service.ts
+4
-1
src/app/portal/routine/service/prepare-routine-table-data.service.ts
...tal/routine/service/prepare-routine-table-data.service.ts
+5
-2
src/styles.scss
src/styles.scss
+1
-1
No files found.
src/app/app.component.ts
View file @
325a1ffa
...
@@ -32,7 +32,6 @@ export class AppComponent implements OnInit {
...
@@ -32,7 +32,6 @@ export class AppComponent implements OnInit {
this
.
router
.
events
.
pipe
(
this
.
router
.
events
.
pipe
(
filter
(
event
=>
event
instanceof
NavigationEnd
)
filter
(
event
=>
event
instanceof
NavigationEnd
)
).
subscribe
((
event
:
any
)
=>
{
).
subscribe
((
event
:
any
)
=>
{
// console.log('Route changed:', event.url);
this
.
onRouteChange
(
event
.
url
);
this
.
onRouteChange
(
event
.
url
);
});
});
// Capacitor.addListener()
// Capacitor.addListener()
...
@@ -48,8 +47,6 @@ export class AppComponent implements OnInit {
...
@@ -48,8 +47,6 @@ export class AppComponent implements OnInit {
public
onRouteChange
(
url
:
string
):
void
{
public
onRouteChange
(
url
:
string
):
void
{
// Custom function to execute on route change
// Custom function to execute on route change
// console.log('Triggered function on route change!', url);
this
.
_themeService
.
updateSidebarState
(
false
);
this
.
_themeService
.
updateSidebarState
(
false
);
}
}
}
}
src/app/auth/before-login/before-login.component.ts
View file @
325a1ffa
...
@@ -20,7 +20,6 @@ export class BeforeLoginComponent {
...
@@ -20,7 +20,6 @@ export class BeforeLoginComponent {
public
loginUrl
=
`/
${
RequestMapperService
.
LOGIN_URL
}
`
;
public
loginUrl
=
`/
${
RequestMapperService
.
LOGIN_URL
}
`
;
public
selectedSchool
(
school
:
string
):
void
{
public
selectedSchool
(
school
:
string
):
void
{
// console.log(school);
localStorage
.
setItem
(
'
logged_school
'
,
school
);
localStorage
.
setItem
(
'
logged_school
'
,
school
);
}
}
}
}
src/app/auth/guard/verify-role.guard.ts
View file @
325a1ffa
...
@@ -13,10 +13,10 @@ export const verifyRoleGuard: CanActivateFn = (
...
@@ -13,10 +13,10 @@ export const verifyRoleGuard: CanActivateFn = (
const
requiredRoles
:
string
[]
=
route
.
data
[
'
roles
'
]
as
string
[];
const
requiredRoles
:
string
[]
=
route
.
data
[
'
roles
'
]
as
string
[];
const
userRole
:
string
=
localStorage
.
getItem
(
'
role
'
)
||
''
;
const
userRole
:
string
=
localStorage
.
getItem
(
'
role
'
)
||
''
;
console
.
log
(
'
requiredRoles=>
'
,
requiredRoles
);
//
console.log('requiredRoles=>',requiredRoles);
console
.
log
(
'
userRole=>
'
,
userRole
);
//
console.log('userRole=>',userRole);
// return true;
// return true;
// FFBF00
if
(
userRole
&&
isRoleValid
(
requiredRoles
,
userRole
)
)
return
true
;
if
(
userRole
&&
isRoleValid
(
requiredRoles
,
userRole
)
)
return
true
;
else
{
else
{
...
...
src/app/auth/login/login.component.html
View file @
325a1ffa
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<form
class=
"login_form"
[formGroup]=
"loginForm"
>
<form
class=
"login_form"
[formGroup]=
"loginForm"
>
<h5>
Welcome
</h5>
<h5>
Welcome
</h5>
<mat-radio-group
aria-label=
"Select an option"
formControlName=
"role"
>
<mat-radio-group
aria-label=
"Select an option"
formControlName=
"role"
>
<mat-radio-button
value=
"student"
>
Student
</mat-radio-button>
<mat-radio-button
value=
"student"
>
Student
</mat-radio-button>
<mat-radio-button
value=
"EDITOR"
>
Teacher
</mat-radio-button>
<mat-radio-button
value=
"EDITOR"
>
Teacher
</mat-radio-button>
</mat-radio-group>
</mat-radio-group>
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<span
class=
"material-symbols-outlined"
matPrefix
>
<span
class=
"material-symbols-outlined"
matPrefix
>
person
person
</span>
</span>
<input
class=
"inputStyle"
matInput
placeholder=
"{{ 'Enter your number' }}"
#input
<input
type=
"number"
class=
"inputStyle"
matInput
placeholder=
"{{ 'Enter your number' }}"
#input
formControlName=
"phoneNo"
[readonly]=
"otpSend"
[disabled]=
"otpSend"
/>
formControlName=
"phoneNo"
[readonly]=
"otpSend"
[disabled]=
"otpSend"
/>
</mat-form-field>
</mat-form-field>
...
...
src/app/auth/login/login.component.ts
View file @
325a1ffa
import
{
CommonModule
,
NgOptimizedImage
,
isPlatformBrowser
}
from
'
@angular/common
'
;
import
{
CommonModule
,
NgOptimizedImage
}
from
'
@angular/common
'
;
import
{
Component
,
Inject
,
OnInit
,
PLATFORM_ID
}
from
'
@angular/core
'
;
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
Router
,
Router
Module
}
from
'
@angular/router
'
;
import
{
RouterModule
}
from
'
@angular/router
'
;
import
{
RoundedButtonFullWidthComponent
}
from
'
../../component-library/rounded-button-full-width/rounded-button-full-width.component
'
;
import
{
RoundedButtonFullWidthComponent
}
from
'
../../component-library/rounded-button-full-width/rounded-button-full-width.component
'
;
import
{
AuthTransmissionService
}
from
'
../../raintree/transmission/auth-transmission.service
'
;
import
{
AuthTransmissionService
}
from
'
../../raintree/transmission/auth-transmission.service
'
;
import
{
TransmissionMapperService
}
from
'
../../mappers/transmission-mapper.service
'
;
import
{
TransmissionMapperService
}
from
'
../../mappers/transmission-mapper.service
'
;
import
{
RaintreeResponse
}
from
'
../../raintree/interface/raintree-response
'
;
import
{
RaintreeResponse
}
from
'
../../raintree/interface/raintree-response
'
;
import
{
Auth
}
from
'
../interface/auth
'
;
import
{
AuthService
}
from
'
../service/auth.service
'
;
import
{
AuthService
}
from
'
../service/auth.service
'
;
import
{
MatFormFieldModule
}
from
'
@angular/material/form-field
'
;
import
{
MatFormFieldModule
}
from
'
@angular/material/form-field
'
;
import
{
MatInputModule
}
from
'
@angular/material/input
'
;
import
{
MatInputModule
}
from
'
@angular/material/input
'
;
import
{
AbstractControl
,
FormControl
,
FormGroup
,
ReactiveFormsModule
,
Validators
}
from
'
@angular/forms
'
;
import
{
FormControl
,
FormGroup
,
ReactiveFormsModule
,
Validators
}
from
'
@angular/forms
'
;
import
{
TransmissionMessageHandlerService
}
from
'
../../raintree/transmission-message-handler/transmission-message-handler
'
;
import
{
TransmissionMessageHandlerService
}
from
'
../../raintree/transmission-message-handler/transmission-message-handler
'
;
import
{
UserProfile
}
from
'
../interface/user-profile
'
;
import
{
UserProfile
}
from
'
../interface/user-profile
'
;
import
{
ToasterService
}
from
'
../../component-library/toaster/toaster.service
'
;
import
{
ToasterService
}
from
'
../../component-library/toaster/toaster.service
'
;
...
@@ -53,11 +52,11 @@ export class LoginComponent implements OnInit {
...
@@ -53,11 +52,11 @@ export class LoginComponent implements OnInit {
public
hidePassword
:
boolean
=
true
;
public
hidePassword
:
boolean
=
true
;
public
loginForm
=
new
FormGroup
({
public
loginForm
=
new
FormGroup
({
phoneNo
:
new
FormControl
(
'
6290861931
'
,
[
phoneNo
:
new
FormControl
(
''
,
[
Validators
.
required
,
Validators
.
required
,
Validators
.
pattern
(
/^
\d{10}
$/
)
Validators
.
pattern
(
/^
\d{10}
$/
)
]),
]),
otp
:
new
FormControl
(
'
1234
'
,
[
otp
:
new
FormControl
(
''
,
[
Validators
.
required
,
Validators
.
required
,
Validators
.
pattern
(
/^
\d{4}
$/
)
Validators
.
pattern
(
/^
\d{4}
$/
)
]),
]),
...
@@ -83,6 +82,14 @@ export class LoginComponent implements OnInit {
...
@@ -83,6 +82,14 @@ export class LoginComponent implements OnInit {
this
.
_getUserDetails
();
this
.
_getUserDetails
();
}
}
// public onChangeRole(event: MatRadioChange): void {
// if (event.value === 'EDITOR') {
// this.loginForm.get('phoneNo')?.setValue('6290861931');
// } else {
// this.loginForm.get('phoneNo')?.setValue('9830503868');
// }
// }
private
_autoLogin
(
userInfo
:
any
){
private
_autoLogin
(
userInfo
:
any
){
let
loginFormPayload
=
{
let
loginFormPayload
=
{
...
@@ -191,6 +198,8 @@ export class LoginComponent implements OnInit {
...
@@ -191,6 +198,8 @@ export class LoginComponent implements OnInit {
}
}
public sendOtp(): void {
public sendOtp(): void {
if(this.loginForm.get('phoneNo')?.invalid) return;
this.otpSend = this._optService.sendOtp(Number(this.loginForm.value.phoneNo));
this.otpSend = this._optService.sendOtp(Number(this.loginForm.value.phoneNo));
// console.log(otp);
// console.log(otp);
// this.otpSend = !this.otpSend;
// this.otpSend = !this.otpSend;
...
...
src/app/auth/service/send-otp.service.ts
View file @
325a1ffa
...
@@ -19,15 +19,14 @@ export class SendOtpService {
...
@@ -19,15 +19,14 @@ export class SendOtpService {
public
sendOtp
(
phone
:
number
):
boolean
{
public
sendOtp
(
phone
:
number
):
boolean
{
this
.
_otp
=
Math
.
floor
(
1000
+
Math
.
random
()
*
9000
);
this
.
_otp
=
Math
.
floor
(
1000
+
Math
.
random
()
*
9000
);
let
otpUrl
=
RequestMapperService
.
OTP_URL
;
let
otpUrl
=
RequestMapperService
.
OTP_URL
;
this
.
_otp
=
1234
;
this
.
_otp
=
5678
;
const
makeOtpUrl
=
otpUrl
const
makeOtpUrl
=
otpUrl
.
replace
(
"
[NUMBER]
"
,
String
(
phone
))
.
replace
(
"
[NUMBER]
"
,
String
(
phone
))
.
replace
(
"
[OTP]
"
,
String
(
this
.
_otp
))
.
replace
(
"
[OTP]
"
,
String
(
this
.
_otp
))
console
.
log
(
makeOtpUrl
);
// this._prepareToSendOtp(makeOtpUrl);
// this._prepareToSendOtp(makeOtpUrl);
// https://103.229.250.200/smpp/sendsms?username=lmccao&password=sms@2023&to=6290861931&from=LMCCAO&text=7556%20is%20the%20OTP%20to%20create%20new%20password.%20For%20any%20assistance,%20please%20call%20033-4040-6607.%0A%0ABursar-cum-Assistant%20Secretary,%0ALa%20Martiniere%20Schools
this
.
_toaster
.
success
(
'
Otp send successfully
'
,
'
Ok
'
)
this
.
_toaster
.
success
(
'
Otp send successfully
'
,
'
Ok
'
)
return
true
;
return
true
;
...
@@ -45,11 +44,11 @@ export class SendOtpService {
...
@@ -45,11 +44,11 @@ export class SendOtpService {
()
=>
{
},
()
=>
{
},
(
response
)
=>
{
(
response
)
=>
{
console
.
log
(
response
);
//
console.log(response);
},
},
(
error
)
=>
{
(
error
)
=>
{
console
.
log
(
error
);
//
console.log(error);
},
},
()
=>
{
}
()
=>
{
}
...
...
src/app/component-library/custom-table/custom-table.component.ts
View file @
325a1ffa
...
@@ -62,8 +62,8 @@ export class CustomTableComponent<T> {
...
@@ -62,8 +62,8 @@ export class CustomTableComponent<T> {
}
}
public
onPageChanged
<
T
>
(
event
:
T
):
void
{
public
onPageChanged
<
T
>
(
event
:
T
):
void
{
console
.
log
(
"
event
"
);
//
console.log("event");
console
.
log
(
event
);
//
console.log(event);
}
}
...
...
src/app/component-library/white-card/white-card.component.scss
View file @
325a1ffa
...
@@ -45,7 +45,7 @@ a {
...
@@ -45,7 +45,7 @@ a {
color
:
white
;
color
:
white
;
}
}
.card_icon_direction_boys
{
.card_icon_direction_boys
{
background
:
yellow
;
background
:
#FFBF00
;
color
:
black
;
color
:
black
;
}
}
}
}
\ No newline at end of file
src/app/portal/assignment/manage/manage.component.ts
View file @
325a1ffa
...
@@ -72,7 +72,7 @@ export class ManageComponent {
...
@@ -72,7 +72,7 @@ export class ManageComponent {
}
}
public
onChangeSection
(
event
:
MatSelectChange
){
public
onChangeSection
(
event
:
MatSelectChange
){
console
.
log
(
event
.
value
);
//
console.log(event.value);
this
.
_getSubject
(
event
.
value
);
this
.
_getSubject
(
event
.
value
);
}
}
...
...
src/app/portal/assignment/service/prepare-assignment-table-data.service.ts
View file @
325a1ffa
...
@@ -3,6 +3,7 @@ import { Assignment } from '../interface/assignment';
...
@@ -3,6 +3,7 @@ import { Assignment } from '../interface/assignment';
import
{
AssignmentTable
}
from
'
../interface/assignment-table
'
;
import
{
AssignmentTable
}
from
'
../interface/assignment-table
'
;
import
{
CustomTableColumn
}
from
'
../../../component-library/interface/custom-table-column
'
;
import
{
CustomTableColumn
}
from
'
../../../component-library/interface/custom-table-column
'
;
import
{
DatePipe
}
from
'
@angular/common
'
;
import
{
DatePipe
}
from
'
@angular/common
'
;
import
{
RoleMapperService
}
from
'
../../../mappers/role-mapper.service
'
;
@
Injectable
({
@
Injectable
({
providedIn
:
'
root
'
providedIn
:
'
root
'
...
@@ -30,9 +31,11 @@ export class PrepareAssignmentTableDataService {
...
@@ -30,9 +31,11 @@ export class PrepareAssignmentTableDataService {
}
}
public
prepareMatTableColumn
():
CustomTableColumn
[]
{
public
prepareMatTableColumn
():
CustomTableColumn
[]
{
let
role
=
localStorage
.
getItem
(
'
role
'
);
let
includeSectionDetails
=
(
role
===
RoleMapperService
.
TEACHER_ROLE
);
let
columnArray
=
[
let
columnArray
=
[
// { key: 'section_details', label: 'Section' }
,
...(
includeSectionDetails
?
[{
key
:
'
section_details
'
,
label
:
'
Section
'
}]
:
[])
,
{
key
:
'
subject
'
,
label
:
'
Subject
'
},
{
key
:
'
subject
'
,
label
:
'
Subject
'
},
{
key
:
'
last_date
'
,
label
:
'
Last Date
'
},
{
key
:
'
last_date
'
,
label
:
'
Last Date
'
},
{
key
:
'
action
'
,
label
:
'
Action
'
},
{
key
:
'
action
'
,
label
:
'
Action
'
},
...
...
src/app/portal/routine/service/prepare-routine-table-data.service.ts
View file @
325a1ffa
...
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
...
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import
{
Routine
}
from
'
../interface/routine
'
;
import
{
Routine
}
from
'
../interface/routine
'
;
import
{
CustomTableColumn
}
from
'
../../../component-library/interface/custom-table-column
'
;
import
{
CustomTableColumn
}
from
'
../../../component-library/interface/custom-table-column
'
;
import
{
RoutineTable
}
from
'
../interface/routine-table
'
;
import
{
RoutineTable
}
from
'
../interface/routine-table
'
;
import
{
RoleMapperService
}
from
'
../../../mappers/role-mapper.service
'
;
@
Injectable
({
@
Injectable
({
providedIn
:
'
root
'
providedIn
:
'
root
'
...
@@ -32,10 +33,12 @@ export class PrepareRoutineTableDataService {
...
@@ -32,10 +33,12 @@ export class PrepareRoutineTableDataService {
}
}
public
prepareMatTableColumn
():
CustomTableColumn
[]
{
public
prepareMatTableColumn
():
CustomTableColumn
[]
{
let
role
=
localStorage
.
getItem
(
'
role
'
);
let
includeSectionDetails
=
(
role
===
RoleMapperService
.
TEACHER_ROLE
);
let
columnArray
=
[
let
columnArray
=
[
// { key: 'class_details', label: 'Class' },
// { key: 'class_details', label: 'Class' },
// { key: 'section_details', label: 'Section' }
,
...(
includeSectionDetails
?
[{
key
:
'
section_details
'
,
label
:
'
Section
'
}]
:
[])
,
{
key
:
'
details
'
,
label
:
'
Details
'
},
{
key
:
'
details
'
,
label
:
'
Details
'
},
{
key
:
'
action
'
,
label
:
'
Action
'
},
{
key
:
'
action
'
,
label
:
'
Action
'
},
];
];
...
...
src/styles.scss
View file @
325a1ffa
...
@@ -66,7 +66,7 @@ body {
...
@@ -66,7 +66,7 @@ body {
.top_yellow_line
{
.top_yellow_line
{
width
:
100%
;
width
:
100%
;
height
:
40px
;
height
:
40px
;
background-color
:
#
ffc107
;
background-color
:
#
FFBF00
;
}
}
.mat-mdc-form-field
{
.mat-mdc-form-field
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment