Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
75598b5
login almsot done
Maher-bouchrara Mar 30, 2025
a1b6a2b
users-list added
Maher-bouchrara Mar 30, 2025
8a9b28d
Merge pull request #1 from Maher-bouchrara/feature/login_page
Maher-bouchrara Mar 30, 2025
e80ebe0
formateur
imenmiladi Mar 30, 2025
b1d6fa1
msg
Maher-bouchrara Mar 30, 2025
daa479b
Merge pull request #2 from Maher-bouchrara/feature/login_page
Maher-bouchrara Mar 30, 2025
68378d0
formation page created
imenmiladi Apr 1, 2025
6c9446e
second push formation
imenmiladi Apr 1, 2025
d6b79fe
Merge pull request #4 from Maher-bouchrara/features/formation
Maher-bouchrara Apr 1, 2025
81e3af4
auth done
Maher-bouchrara Apr 2, 2025
f1739e2
Merge pull request #5 from Maher-bouchrara/feature/login_page **auth
Maher-bouchrara Apr 2, 2025
6964b2f
sweetalert for login
imenmiladi Apr 4, 2025
bc27fa6
FIX USER/PARTICIPANT FIELDS
imenmiladi Apr 4, 2025
1f973f9
allusersdone
Maher-bouchrara Apr 13, 2025
0a72172
Merge pull request #6 from Maher-bouchrara/feature/getAllUsers
Maher-bouchrara Apr 13, 2025
660659b
Getallformateurs fonctionnel
MaherAy Apr 26, 2025
b2764c3
Merge pull request #7 from Maher-bouchrara/maherAy
Maher-bouchrara Apr 26, 2025
1cb4415
users_crud_done
Maher-bouchrara Apr 26, 2025
ae72f87
Merge branch 'master' of https://github.com/Maher-bouchrara/PapiBDPro…
Maher-bouchrara Apr 26, 2025
df00e8c
Merge pull request #8 from Maher-bouchrara/usersCRUD
Maher-bouchrara Apr 26, 2025
822547c
crudParticipant
imenmiladi Apr 26, 2025
91dec83
Merge branch 'master' of https://github.com/Maher-bouchrara/PapiBDPro…
imenmiladi Apr 26, 2025
c31e049
pagination_search_bar
Maher-bouchrara Apr 26, 2025
2d9fed6
Merge pull request #9 from Maher-bouchrara/usersCRUD
Maher-bouchrara Apr 26, 2025
a204696
dashbord
Maher-bouchrara Apr 26, 2025
620a79a
Merge branch 'master' of https://github.com/Maher-bouchrara/PapiBDPro…
Maher-bouchrara Apr 26, 2025
70e8bf3
Merge pull request #10 from Maher-bouchrara/dashbord
Maher-bouchrara Apr 26, 2025
b35c8f0
ModifSupprimParticipant
imenmiladi Apr 26, 2025
e6fec4b
Merge branch 'master' of https://github.com/Maher-bouchrara/PapiBDPro…
imenmiladi Apr 26, 2025
bd88d05
Merge pull request #11 from Maher-bouchrara/participantCRUD
Maher-bouchrara Apr 26, 2025
f7c1506
Crud Formateur
MaherAy Apr 26, 2025
ef955aa
Crud Formateur
MaherAy Apr 26, 2025
a545eed
Merge pull request #12 from Maher-bouchrara/FormateurCrud
MaherAyachi Apr 26, 2025
d5a074a
dashbord
imenmiladi Apr 27, 2025
77f6af7
CRUD employeur + sweetAlert/suppression
imenmiladi Apr 27, 2025
c038f4b
get_all & delete done
Maher-bouchrara Apr 27, 2025
cb54f0a
get_all & delete done
Maher-bouchrara Apr 27, 2025
d2e75b5
Merge pull request #13 from Maher-bouchrara/employeur
imenmiladi Apr 27, 2025
aeaea3d
Merge branch 'master' of https://github.com/Maher-bouchrara/PapiBDPro…
Maher-bouchrara Apr 27, 2025
1468846
Merge pull request #14 from Maher-bouchrara/formationsCRUD
Maher-bouchrara Apr 27, 2025
0e0c0a3
add & update(without adding participants) done
Maher-bouchrara Apr 27, 2025
1fe9f29
formations CRUD Done
Maher-bouchrara Apr 27, 2025
197e9f6
Merge branch 'master' of https://github.com/Maher-bouchrara/PapiBDPro…
Maher-bouchrara Apr 27, 2025
8a7f775
Merge pull request #15 from Maher-bouchrara/formationsCRUD
Maher-bouchrara Apr 27, 2025
f06bef4
email/certif formation
imenmiladi Apr 27, 2025
eea00db
Merge pull request #16 from Maher-bouchrara/formationCertifEtEmail
Maher-bouchrara Apr 28, 2025
c20be61
dashboard done
MaherAy Apr 28, 2025
4cebffa
Merge branch 'master' of github.com:Maher-bouchrara/PapiBDProject int…
MaherAy Apr 28, 2025
bf0b2a3
Merge pull request #17 from Maher-bouchrara/FormateurCrud
imenmiladi Apr 28, 2025
6b6cda5
pagination fixed
Maher-bouchrara Apr 28, 2025
92ad164
h
Maher-bouchrara Apr 28, 2025
22dc0a9
Merge branch 'master' of https://github.com/Maher-bouchrara/PapiBDPro…
Maher-bouchrara Apr 28, 2025
ef81491
certif&email doneé
Maher-bouchrara Apr 28, 2025
17fa2d5
ffffff
Maher-bouchrara Apr 29, 2025
cd80aa7
Merge pull request #18 from Maher-bouchrara/paginationFixes
Maher-bouchrara Apr 29, 2025
dec7284
fix formateur pagination and searchBar
imenmiladi Apr 29, 2025
7714df5
Merge pull request #19 from Maher-bouchrara/formationCertifEtEmail
imenmiladi Apr 29, 2025
0976d5e
fix employeur pagination and searchBar
imenmiladi Apr 29, 2025
2e17519
Merge branch 'master' of https://github.com/Maher-bouchrara/PapiBDPro…
imenmiladi Apr 29, 2025
92c7aef
Merge pull request #20 from Maher-bouchrara/employeurPagination
imenmiladi Apr 29, 2025
f8b5e55
participant done
Maher-bouchrara Apr 29, 2025
7ac6383
Merge branch 'master' of https://github.com/Maher-bouchrara/PapiBDPro…
Maher-bouchrara Apr 29, 2025
556748d
sweetalert added
Maher-bouchrara Apr 29, 2025
7802365
Merge pull request #21 from Maher-bouchrara/paginationFixes
Maher-bouchrara Apr 29, 2025
4cbc1d4
final commit 0.0.1
Maher-bouchrara Apr 29, 2025
6e50b61
Merge branch 'master' of https://github.com/Maher-bouchrara/PapiBDPro…
Maher-bouchrara Apr 29, 2025
eb1dbb1
Merge pull request #22 from Maher-bouchrara/paginationFixes
Maher-bouchrara Apr 29, 2025
61b8651
fix budget DT
imenmiladi Apr 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"scripts": [
"node_modules/jquery/dist/jquery.js",
"node_modules/bootstrap/dist/js/bootstrap.js",
"node_modules/bootstrap-notify/bootstrap-notify.js",
"node_modules/chartist/dist/chartist.js"
"node_modules/bootstrap-notify/bootstrap-notify.js"
]
},
"configurations": {
Expand Down
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,36 +29,38 @@
"@types/googlemaps": "3.43.3",
"animate.css": "4.1.1",
"arrive": "2.4.1",
"bootstrap": "3.3.7",
"bootstrap": "^3.3.7",
"bootstrap-notify": "3.1.3",
"chartist": "0.11.4",
"googleapis": "66.0.0",
"jquery": "3.5.1",
"jwt-decode": "^4.0.0",
"perfect-scrollbar": "1.5.0",
"rxjs": "~7.5.0",
"sweetalert2": "^11.17.2",
"tslib": "^2.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.3",
"@angular/cli": "~14.2.3",
"@angular/compiler-cli": "^14.2.0",
"@types/chartist": "0.11.0",
"@types/jasmine": "~5.1.4",
"@types/jasminewd2": "~2.0.13",
"@types/jquery": "3.5.30",
"@types/node": "20.14.11",
"codelyzer": "6.0.2",
"cross-env": "^7.0.3",
"jasmine-core": "~4.3.0",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"typescript": "~4.7.2",
"@types/jasminewd2": "~2.0.13",
"@types/chartist": "0.11.0",
"@types/jquery": "3.5.30",
"@types/node": "20.14.11",
"codelyzer": "6.0.2",
"jasmine-spec-reporter": "~7.0.0",
"protractor": "7.0.0",
"ts-node": "~10.7.0",
"cross-env": "^7.0.3"
"typescript": "~4.7.2"
}
}
28 changes: 25 additions & 3 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { RouterModule } from '@angular/router';
import { ReactiveFormsModule } from '@angular/forms';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { AuthInterceptor } from './interceptors/auth.interceptor';


import { AppRoutingModule } from './app.routing';
import { NavbarModule } from './shared/navbar/navbar.module';
Expand All @@ -12,6 +16,14 @@ import { SidebarModule } from './sidebar/sidebar.module';
import { AppComponent } from './app.component';

import { AdminLayoutComponent } from './layouts/admin-layout/admin-layout.component';
import { LoginComponent } from './login/login.component';
import { UsersListComponent } from './users-list/users-list.component';
import { FormateurListComponent } from './formateur-list/formateur-list.component';
import { FormationListeComponent } from './formation-liste/formation-liste.component';
import { ParticipantListComponent } from './participant-list/participant-list.component';
import { SearchPaginationComponent } from './search-pagination/search-pagination.component';
import { EmployeurListComponent } from './employeur-list/employeur-list.component';
import { NotAuthorizedComponent } from './not-authorized/not-authorized.component';

@NgModule({
imports: [
Expand All @@ -22,13 +34,23 @@ import { AdminLayoutComponent } from './layouts/admin-layout/admin-layout.compon
NavbarModule,
FooterModule,
SidebarModule,
ReactiveFormsModule,

AppRoutingModule
],
declarations: [
AppComponent,
AdminLayoutComponent
],
providers: [],
AdminLayoutComponent,
LoginComponent,
UsersListComponent,
FormateurListComponent,
FormationListeComponent,
ParticipantListComponent,
SearchPaginationComponent,
EmployeurListComponent,
NotAuthorizedComponent,
],
providers: [{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }],
bootstrap: [AppComponent]
})
export class AppModule { }
11 changes: 8 additions & 3 deletions src/app/app.routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,29 @@ import { CommonModule, } from '@angular/common';
import { BrowserModule } from '@angular/platform-browser';
import { Routes, RouterModule } from '@angular/router';

import { LoginComponent } from './login/login.component';
import { AdminLayoutComponent } from './layouts/admin-layout/admin-layout.component';

const routes: Routes =[
{
path: 'login',
component: LoginComponent,
},
{
path: '',
redirectTo: 'dashboard',
redirectTo: 'login',
pathMatch: 'full',
}, {
path: '',
component: AdminLayoutComponent,
children: [
children: [
{
path: '',
loadChildren: () => import('./layouts/admin-layout/admin-layout.module').then(x => x.AdminLayoutModule)
}]},
{
path: '**',
redirectTo: 'dashboard'
redirectTo: 'login'
}
];

Expand Down
16 changes: 16 additions & 0 deletions src/app/employeur-list.service.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';

import { EmployeurListService } from './employeur-list.service';

describe('EmployeurListService', () => {
let service: EmployeurListService;

beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(EmployeurListService);
});

it('should be created', () => {
expect(service).toBeTruthy();
});
});
9 changes: 9 additions & 0 deletions src/app/employeur-list.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';

@Injectable({
providedIn: 'root'
})
export class EmployeurListService {

constructor() { }
}
56 changes: 56 additions & 0 deletions src/app/employeur-list/employeur-list.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/* Amélioration de l'apparence des boutons */
.btn {
border-radius: 4px;
font-weight: 500;
padding: 0.375rem 0.75rem;
transition: all 0.2s ease-in-out;
margin-right: 8px;
}

.btn-sm {
font-size: 1.3rem;
padding: 0.25rem 0.5rem;
}

.btn-info {
box-shadow: 0 2px 4px rgba(23, 162, 184, 0.3);
}

.btn-danger {
box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.btn-primary {
box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

.btn:hover {
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn i {
margin-right: 5px;
}

/* Amélioration de l'espacement dans le tableau */
.table td, .table th {
padding: 12px 15px;
vertical-align: middle;
}

/* Amélioration pour le bouton Ajouter */
.header .btn-primary {
padding: 0.5rem 1rem;
display: flex;
align-items: center;
}

.header .btn-primary i {
margin-right: 8px;
}

.modal-body {
max-height: 400px; /* Taille maximale du contenu */
overflow-y: auto; /* Permet de faire défiler le contenu */
}
112 changes: 112 additions & 0 deletions src/app/employeur-list/employeur-list.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<div class="main-content">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="header">
<div class="d-flex justify-content-between align-items-center">
<div>
<h4 class="title">Liste des employeurs</h4>
<p class="category">Gérer les employeurs</p>
</div>
<button class="btn btn-primary" (click)="openAddModal()">
<i class="fa fa-plus"></i> Ajouter un employeur
</button>
</div>
</div>
<div class="content">
<app-search-pagination
[totalItems]="filteredEmployeurs.length"
[pageSize]="pageSize"
[currentPage]="currentPage"
(searchChange)="onSearchChange($event)"
(pageChange)="onPageChange($event)">
</app-search-pagination>
</div>

<div class="content table-responsive table-full-width">
<table class="table table-hover table-striped">
<thead>
<tr>
<th *ngFor="let cell of tableData1.headerRow">{{ cell }}</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let employeur of paginatedEmployeurs(); let i = index">
<td>{{ employeur.id }}</td>
<td>{{ employeur.nomEmployeur }}</td>
<td>
<div class="d-flex justify-content-start gap-2">
<button type="button" class="btn btn-sm btn-info mr-2" (click)="openEditModal(i + (this.currentPage-1)*this.pageSize)">
<i class="fa fa-edit mr-1"></i> Modifier
</button>
<button type="button" class="btn btn-sm btn-danger" (click)="deleteEmployeur(i + (this.currentPage-1)*this.pageSize)">
<i class="fa fa-trash mr-1"></i> Supprimer
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>

<!-- Modal pour ajouter/modifier un employeur -->
<div class="modal" [class.show]="showEmployeurModal" [style.display]="showEmployeurModal ? 'block' : 'none'" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{{ isEditMode ? 'Modifier' : 'Ajouter' }} un employeur</h5>
<button type="button" class="close" (click)="closeEmployeurModal()" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<form [formGroup]="employeurForm">
<div class="form-group">
<label for="employeurNom">Nom</label>
<input type="text" class="form-control" id="employeurNom" formControlName="nomEmployeur">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="closeEmployeurModal()">Annuler</button>
<button type="button" class="btn btn-primary" [disabled]="employeurForm.invalid" (click)="saveEmployeur()">
{{ isEditMode ? 'Modifier' : 'Ajouter' }}
</button>
</div>
</div>
</div>
</div>
<div class="modal-backdrop fade show" *ngIf="showEmployeurModal"></div>

<!-- Modal de confirmation pour la suppression -->
<div class="modal" [class.show]="showDeleteModal" [style.display]="showDeleteModal ? 'block' : 'none'" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Confirmation de suppression</h5>
<button type="button" class="close" (click)="closeDeleteModal()" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Êtes-vous sûr de vouloir supprimer cet employeur?</p>
<p *ngIf="selectedEmployeur">
<strong>Nom:</strong> {{ selectedEmployeur[1] }}<br>
<strong>ID:</strong> {{ selectedEmployeur[0] }}
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="closeDeleteModal()">Annuler</button>
<button type="button" class="btn btn-danger" (click)="confirmDelete()">Supprimer</button>
</div>
</div>
</div>
</div>
<div class="modal-backdrop fade show" *ngIf="showDeleteModal"></div>
23 changes: 23 additions & 0 deletions src/app/employeur-list/employeur-list.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { EmployeurListComponent } from './employeur-list.component';

describe('EmployeurListComponent', () => {
let component: EmployeurListComponent;
let fixture: ComponentFixture<EmployeurListComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ EmployeurListComponent ]
})
.compileComponents();

fixture = TestBed.createComponent(EmployeurListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Loading