Skip to content

Commit ee46ad0

Browse files
committed
🚧 wip
1 parent 98bc237 commit ee46ad0

File tree

6 files changed

+23
-13
lines changed

6 files changed

+23
-13
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
NG_APP_NAME="Cosna Cpanel"
22
NG_APP_DEBUG=true
3-
NG_APP_VERSION=1.0.0
3+
NG_APP_VERSION="v1.0.0"
44
NG_APP_API_URL=https://api.cosna-afrique.com
55
NG_APP_API_VERSION=v2
66
NG_APP_SENTRY_DSN=

src/app/modules/authentication/authentication.module.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { NgModule } from '@angular/core';
2+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
23
import { RouterModule } from '@angular/router';
34

45
import { SharedModule } from '@shared/shared.module';
@@ -15,6 +16,8 @@ import { ResetPasswordComponent } from './pages/reset-password/reset-password.co
1516
ResetPasswordComponent
1617
],
1718
imports: [
19+
FormsModule,
20+
ReactiveFormsModule,
1821
SharedModule,
1922
RouterModule.forChild(authRoutes),
2023
],

src/app/modules/authentication/pages/login/login.component.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ <h2 class="mt-6 text-3xl font-semibold text-slate-900">Connectez-vous</h2>
66
</p>
77
</div>
88

9-
<form action="#" method="POST" class="mt-10 space-y-6">
9+
<form (submit)="submit()" class="mt-10 space-y-6">
1010
<!-- Email Address -->
1111
<div>
1212
<cosna-input-overlaping-label
1313
label="Adresse E-mail"
1414
name="email"
15-
value=""
1615
></cosna-input-overlaping-label>
1716
</div>
1817

@@ -21,14 +20,13 @@ <h2 class="mt-6 text-3xl font-semibold text-slate-900">Connectez-vous</h2>
2120
<cosna-input-overlaping-label
2221
label="Mot de passe"
2322
name="password"
24-
value=""
2523
[type]="'password'"
2624
></cosna-input-overlaping-label>
2725
</div>
2826

2927
<div class="flex items-center justify-between">
3028
<label for="remember-me" class="flex items-center cursor-pointer">
31-
<input id="remember-me" name="remember-me" type="checkbox" class="w-4 h-4 text-primary-600 rounded border-slate-300 focus:ring-primary-500">
29+
<input id="remember-me" name="remember-me" type="checkbox" class="w-4 h-4 rounded text-primary-600 border-slate-300 focus:ring-primary-500">
3230
<span class="block ml-2 text-sm text-slate-900"> Se souvenir de moi </span>
3331
</label>
3432

@@ -38,9 +36,9 @@ <h2 class="mt-6 text-3xl font-semibold text-slate-900">Connectez-vous</h2>
3836
</div>
3937

4038
<div>
41-
<cosna-button-primary type="submit" class="relative group w-full justify-center">
42-
<span class="absolute left-0 inset-y-0 flex items-center pl-3">
43-
<svg class="h-5 w-5 text-primary-500 group-hover:text-primary-400" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
39+
<cosna-button-primary type="submit" class="relative justify-center w-full group">
40+
<span class="absolute inset-y-0 left-0 flex items-center pl-3">
41+
<svg class="w-5 h-5 text-primary-500 group-hover:text-primary-400" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
4442
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 1C7.51472 1 5.5 3.01472 5.5 5.5V9H5C3.89543 9 3 9.89543 3 11V17C3 18.1046 3.89543 19 5 19H15C16.1046 19 17 18.1046 17 17V11C17 9.89543 16.1046 9 15 9H14.5V5.5C14.5 3.01472 12.4853 1 10 1ZM13 9V5.5C13 3.84315 11.6569 2.5 10 2.5C8.34315 2.5 7 3.84315 7 5.5V9H13Z" />
4543
</svg>
4644
</span>

src/app/modules/authentication/pages/login/login.component.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,21 @@ import { Component, OnInit } from '@angular/core';
44
templateUrl: './login.component.html',
55
})
66
export class LoginComponent implements OnInit {
7-
7+
public email!: string;
8+
public password!: string;
9+
public error!: string;
810
date: number = (new Date()).getFullYear();
911

10-
constructor() { }
12+
constructor() {}
13+
14+
getValue(value: string) {
15+
console.log(value);
16+
}
17+
18+
ngOnInit(): void {}
1119

12-
ngOnInit(): void {
20+
public submit() {
21+
console.log(this.email, this.password);
1322
}
1423

1524
}

src/app/shared/components/inputs/overlaping-label/overlaping-label.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[type]="type"
1111
[id]="name"
1212
[(ngModel)]="value"
13-
placeholder="{{ placeholder }}"
13+
placeholder="{{ placeholder }}"
1414
[ngClass]="inputClass"
1515
class="block w-full p-0 border-0 outline-none placeholder-slate-500 focus:ring-0 sm:text-sm"
1616
/>

src/app/shared/components/inputs/overlaping-label/overlaping-label.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, Input, OnInit } from '@angular/core';
1+
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
22

33
@Component({
44
selector: 'cosna-input-overlaping-label',

0 commit comments

Comments
 (0)