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
70042f91
Commit
70042f91
authored
Apr 28, 2025
by
achinta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: change password and before login page
parent
bd2ffcb0
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
110 additions
and
18 deletions
+110
-18
src/app/app.routes.ts
src/app/app.routes.ts
+8
-0
src/app/auth/before-login/before-login.component.html
src/app/auth/before-login/before-login.component.html
+17
-0
src/app/auth/before-login/before-login.component.scss
src/app/auth/before-login/before-login.component.scss
+7
-0
src/app/auth/before-login/before-login.component.spec.ts
src/app/auth/before-login/before-login.component.spec.ts
+23
-0
src/app/auth/before-login/before-login.component.ts
src/app/auth/before-login/before-login.component.ts
+22
-0
src/app/auth/guard/auth.guard.ts
src/app/auth/guard/auth.guard.ts
+1
-1
src/app/component-library/white-card/white-card.component.scss
...pp/component-library/white-card/white-card.component.scss
+9
-5
src/app/mappers/request-mapper.service.ts
src/app/mappers/request-mapper.service.ts
+1
-0
src/app/mappers/transmission-mapper.service.ts
src/app/mappers/transmission-mapper.service.ts
+8
-2
src/app/portal/profile/change-password/change-password.component.ts
...rtal/profile/change-password/change-password.component.ts
+11
-7
src/app/raintree/transmission/auth-transmission.service.ts
src/app/raintree/transmission/auth-transmission.service.ts
+1
-1
src/app/raintree/transmission/jwt.service.ts
src/app/raintree/transmission/jwt.service.ts
+2
-2
No files found.
src/app/app.routes.ts
View file @
70042f91
...
...
@@ -36,6 +36,14 @@ export const routes: Routes = [
).
then
((
m
)
=>
m
.
AccessDeniedComponent
),
data
:
{
roles
:
[]
},
},
{
path
:
RequestMapperService
.
BEFORE_LOGIN_URL
,
loadComponent
:
()
=>
import
(
'
./auth/before-login/before-login.component
'
).
then
((
m
)
=>
m
.
BeforeLoginComponent
),
data
:
{
roles
:
[]
},
},
{
path
:
RequestMapperService
.
BASE_RELATIVE_URL
,
redirectTo
:
RequestMapperService
.
PORTAL_URL
,
...
...
src/app/auth/before-login/before-login.component.html
0 → 100644
View file @
70042f91
<div
class=
"container"
>
<div
class=
"girls_login_container"
>
<app-white-card
[cardTextHeading]=
"'Boys'"
[cardTextIcon]=
"'boy'"
[cardLink]=
"loginUrl"
/>
</div>
<div
class=
"boys_login_container"
>
<app-white-card
[cardTextHeading]=
"'Girls'"
[cardTextIcon]=
"'girl'"
[cardLink]=
"loginUrl"
/>
</div>
</div>
\ No newline at end of file
src/app/auth/before-login/before-login.component.scss
0 → 100644
View file @
70042f91
.container
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
height
:
100%
;
gap
:
30px
;
}
\ No newline at end of file
src/app/auth/before-login/before-login.component.spec.ts
0 → 100644
View file @
70042f91
import
{
ComponentFixture
,
TestBed
}
from
'
@angular/core/testing
'
;
import
{
BeforeLoginComponent
}
from
'
./before-login.component
'
;
describe
(
'
BeforeLoginComponent
'
,
()
=>
{
let
component
:
BeforeLoginComponent
;
let
fixture
:
ComponentFixture
<
BeforeLoginComponent
>
;
beforeEach
(
async
()
=>
{
await
TestBed
.
configureTestingModule
({
imports
:
[
BeforeLoginComponent
]
})
.
compileComponents
();
fixture
=
TestBed
.
createComponent
(
BeforeLoginComponent
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'
should create
'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
src/app/auth/before-login/before-login.component.ts
0 → 100644
View file @
70042f91
import
{
CommonModule
}
from
'
@angular/common
'
;
import
{
Component
}
from
'
@angular/core
'
;
import
{
MatCardModule
}
from
'
@angular/material/card
'
;
import
{
WhiteCardComponent
}
from
"
../../component-library/white-card/white-card.component
"
;
import
{
RequestMapperService
}
from
'
../../mappers/request-mapper.service
'
;
@
Component
({
selector
:
'
app-before-login
'
,
imports
:
[
CommonModule
,
MatCardModule
,
WhiteCardComponent
],
templateUrl
:
'
./before-login.component.html
'
,
styleUrl
:
'
./before-login.component.scss
'
})
export
class
BeforeLoginComponent
{
public
loginUrl
=
`/
${
RequestMapperService
.
LOGIN_URL
}
`
;
}
src/app/auth/guard/auth.guard.ts
View file @
70042f91
...
...
@@ -13,7 +13,7 @@ export const authGuard: CanActivateFn = (
else
{
router
.
navigate
([
RequestMapperService
.
LOGIN_URL
]);
router
.
navigate
([
RequestMapperService
.
BEFORE_
LOGIN_URL
]);
return
false
;
}
};
src/app/component-library/white-card/white-card.component.scss
View file @
70042f91
a
{
text-decoration
:
none
;
}
.white_card
:hover
{
background-color
:
#d2d2d2
;
}
.white_card
{
background-color
:
var
(
--
secondary-bg-color
);
padding
:
28px
0px
15
px
;
padding
:
30
px
;
box-shadow
:
var
(
--
box-shadow-small
);
border-radius
:
var
(
--
border-radius-mid
);
text-align
:
center
;
p
{
margin
:
0
;
}
.card_icon
{
font-size
:
40px
;
color
:
var
(
--
primary-color
);
...
...
@@ -17,7 +21,7 @@ a {
.card_heading
{
font-family
:
var
(
--
font-mid
);
color
:
var
(
--
primary-color
);
margin-top
:
10px
;
margin-bottom
:
18px
;
//
margin-top: 10px;
//
margin-bottom: 18px;
}
}
src/app/mappers/request-mapper.service.ts
View file @
70042f91
...
...
@@ -17,6 +17,7 @@ export class RequestMapperService {
public
static
readonly
LOGIN_URL
:
string
=
'
login
'
;
public
static
readonly
PORTAL_URL
:
string
=
'
portal
'
;
public
static
readonly
DASHBOARD_URL
:
string
=
'
dashboard
'
;
public
static
readonly
BEFORE_LOGIN_URL
:
string
=
'
login-for
'
;
// assignment navigation
public
static
readonly
ASSIGNMENT_URL
:
string
=
'
assignment
'
;
...
...
src/app/mappers/transmission-mapper.service.ts
View file @
70042f91
...
...
@@ -9,7 +9,10 @@ export class TransmissionMapperService {
public
static
readonly
DEV_TRANSMISSION_URL
:
string
=
'
https://magicoweb.com
'
;
'
https://portal.lamartiniere.co
'
;
// public static readonly PROFILE_CHANGE_BASE_URL: string =
// 'http://13.126.107.189:5011';
public
static
readonly
LOGIN_TRANSMISSION_URL
:
string
=
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/webomagic-user/v1/user/login
'
;
...
...
@@ -17,8 +20,11 @@ export class TransmissionMapperService {
public
static
readonly
USER_PROFILE_TRANSMISSION_URL
:
string
=
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/user/get-profile
'
;
// public static readonly CHANGE_PASSWORD_TRANSMISSION_URL: string =
// TransmissionMapperService.PROFILE_CHANGE_BASE_URL + '/webomagic-user/v1/user/change-password?';
public
static
readonly
CHANGE_PASSWORD_TRANSMISSION_URL
:
string
=
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/webomagic-user/v1/user/change-password
'
;
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/webomagic-user/v1/user/change-password
?
'
;
public
static
readonly
GET_TRANSMISSION_URL
:
string
=
TransmissionMapperService
.
DEV_TRANSMISSION_URL
+
'
/webomagic/getWebDataSourceByWebsiteDataSourceForFilter?
'
;
...
...
src/app/portal/profile/change-password/change-password.component.ts
View file @
70042f91
...
...
@@ -9,6 +9,7 @@ import { ToasterService } from '../../../component-library/toaster/toaster.servi
import
{
AuthTransmissionService
}
from
'
../../../raintree/transmission/auth-transmission.service
'
;
import
{
TransmissionMapperService
}
from
'
../../../mappers/transmission-mapper.service
'
;
import
{
RaintreeResponse
}
from
'
../../../raintree/interface/raintree-response
'
;
import
{
UrlConfigService
}
from
'
../../service/url-config.service
'
;
@
Component
({
selector
:
'
app-change-password
'
,
...
...
@@ -27,6 +28,7 @@ export class ChangePasswordComponent {
public
toaster
=
inject
(
ToasterService
);
private
_auth
=
inject
(
AuthTransmissionService
);
private
_urlConfig
=
inject
(
UrlConfigService
);
public
updatePasswordForm
=
new
FormGroup
({
currentPassword
:
new
FormControl
(
""
,
[
Validators
.
required
]),
...
...
@@ -43,22 +45,24 @@ export class ChangePasswordComponent {
console
.
log
(
this
.
updatePasswordForm
.
value
);
// call API for change password
this
.
_auth
.
changePassword
(
TransmissionMapperService
.
CHANGE_PASSWORD_TRANSMISSION_URL
,
TransmissionMapperService
.
CHANGE_PASSWORD_TRANSMISSION_URL
+
this
.
_urlConfig
.
generateDatasourceConfigUrl
({
old_password
:
`
${
this
.
updatePasswordForm
.
value
.
currentPassword
}
`
,
new_password
:
`
${
this
.
updatePasswordForm
.
value
.
newPassword
}
`
,
}),
{
"
old_password
"
:
`
${
this
.
updatePasswordForm
.
value
.
currentPassword
}
`
,
"
new_password
"
:
`
${
this
.
updatePasswordForm
.
value
.
newPassword
}
`
},
{},
()
=>
{
},
()
=>
{
},
(
response
:
RaintreeResponse
)
=>
{
console
.
log
(
response
);
console
.
log
(
response
.
message
);
this
.
toaster
.
error
(
response
.
message
)
},
(
error
)
=>
{
console
.
log
(
error
);
// this.toaster.error(error)
},
()
=>
{
}
);
...
...
src/app/raintree/transmission/auth-transmission.service.ts
View file @
70042f91
...
...
@@ -66,7 +66,7 @@ export class AuthTransmissionService extends TransmissionService {
onFailure
:
(
error
:
string
)
=>
void
,
onComplete
:
()
=>
void
):
void
{
this
.
executeP
ost
Payload
(
this
.
executeP
atch
Payload
(
url
,
payload
,
onPreExecute
,
...
...
src/app/raintree/transmission/jwt.service.ts
View file @
70042f91
...
...
@@ -19,7 +19,7 @@ export class JWTService {
let
authorizationToken
=
localStorage
.
getItem
(
'
Bearer
'
)
||
''
;
return
new
HttpHeaders
({
"
user-id
"
:
userId
,
"
api
k
ey
"
:
authorizationToken
,
"
api
K
ey
"
:
authorizationToken
,
'
Content-Type
'
:
'
application/json
'
,
// 'Project-Id': 278,
});
...
...
@@ -31,7 +31,7 @@ export class JWTService {
return
new
HttpHeaders
({
"
user-id
"
:
userId
,
"
api
k
ey
"
:
authorizationToken
,
"
api
K
ey
"
:
authorizationToken
,
});
}
}
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