-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RI-188: [job-board] défini le design du board et des cards (#189)
- Loading branch information
1 parent
5152c74
commit 3b20cdc
Showing
20 changed files
with
203 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
<p>board works!</p> | ||
<div class="row mx-auto"> | ||
<div | ||
*ngFor="let column of columns; let last = last;" | ||
[ngClass]="{'me-5': !last}" | ||
class="col-12 col-md-5 col-lg shadow-sm me-5 mb-4 pt-4 px-3 bg-white vh-100" | ||
> | ||
<h3 class="mb-4"> | ||
{{column.status.label}} | ||
<span class="badge rounded-pill bg-danger ms-4 px-3">{{column.applies.length}}</span> | ||
</h3> | ||
|
||
<app-apply-card *ngFor="let apply of column.applies" [apply]="apply"></app-apply-card> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@import "src/assets/variables"; | ||
|
||
h3 { | ||
color: $light-gray; | ||
text-transform: uppercase; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,38 @@ | ||
import {Component} from '@angular/core'; | ||
import {Component, OnInit} from '@angular/core'; | ||
import {ApplyStatusCode, ApplyStatusEnum} from './enums/apply-status-enum'; | ||
import {JobApply} from './models/job-apply'; | ||
|
||
export class BoardColumn { | ||
status: ApplyStatusEnum; | ||
applies: JobApply[] = []; | ||
} | ||
|
||
|
||
@Component({ | ||
selector: 'app-board', | ||
templateUrl: './board.component.html', | ||
styleUrls: ['./board.component.scss'] | ||
}) | ||
export class BoardComponent { | ||
export class BoardComponent implements OnInit { | ||
|
||
|
||
columns: BoardColumn[] = ApplyStatusEnum.all() | ||
.map(status => { | ||
return {status, applies: []}; | ||
}); | ||
|
||
ngOnInit(): void { | ||
this.columns | ||
.find(column => column.status.code === ApplyStatusCode.PENDING) | ||
.applies | ||
.push({ | ||
jobTitle: 'Responsable de la maintenance et de la sécurité', | ||
contractType: 'CDI', | ||
companyImageUrl: 'https://www.netanswer.fr/wp-content/uploads/2017/01/logoNAli400.png', | ||
companyName: 'Net Answer', | ||
location: 'France, Paris(75)', | ||
jobId: '12', | ||
status: ApplyStatusEnum.PENDING | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
frontend-implicaction/src/app/board/components/apply-card/apply-card.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<div class="card p-3 mb-2 shadow-sm"> | ||
<div class="d-flex justify-content-between"> | ||
<div class="d-flex flex-row align-items-center"> | ||
<img | ||
#companyImg | ||
(error)="companyImg.src = COMPANY_IMAGE_DEFAULT_URI" | ||
[src]="apply.companyImageUrl || COMPANY_IMAGE_DEFAULT_URI" | ||
alt="{{apply.companyName}}" | ||
class="icon" | ||
> | ||
<div class="ms-2 c-details"> | ||
<h6 class="mb-0 theme-primary">{{apply.companyName}}</h6> | ||
<span>{{apply.location}}</span> | ||
</div> | ||
</div> | ||
<app-contract-type [type]="apply.contractType"></app-contract-type> | ||
</div> | ||
<div class="mt-3"> | ||
<h3 class="heading"> | ||
<a | ||
class="text-decoration-none theme-primary" | ||
routerLink="/{{univers.JOBS.url}}/{{apply.jobId}}" | ||
> | ||
{{apply.jobTitle}} | ||
</a> | ||
</h3> | ||
</div> | ||
<div class="card-footer d-grid gap-2 p-0 mt-2"> | ||
<button class="btn btn-primary" type="button">Postuler</button> | ||
</div> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
frontend-implicaction/src/app/board/components/apply-card/apply-card.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.c-details span { | ||
font-weight: 300; | ||
font-size: 13px | ||
} | ||
|
||
.icon { | ||
width: 50px; | ||
height: 50px; | ||
} |
25 changes: 25 additions & 0 deletions
25
frontend-implicaction/src/app/board/components/apply-card/apply-card.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import {ComponentFixture, TestBed} from '@angular/core/testing'; | ||
|
||
import {ApplyCardComponent} from './apply-card.component'; | ||
|
||
describe('ApplyCardComponent', () => { | ||
let component: ApplyCardComponent; | ||
let fixture: ComponentFixture<ApplyCardComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ApplyCardComponent] | ||
}) | ||
.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ApplyCardComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
20 changes: 20 additions & 0 deletions
20
frontend-implicaction/src/app/board/components/apply-card/apply-card.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import {Component, Input} from '@angular/core'; | ||
import {JobApply} from '../../models/job-apply'; | ||
import {Constants} from '../../../config/constants'; | ||
import {Univers} from '../../../shared/enums/univers'; | ||
|
||
@Component({ | ||
selector: 'app-apply-card', | ||
templateUrl: './apply-card.component.html', | ||
styleUrls: ['./apply-card.component.scss'] | ||
}) | ||
export class ApplyCardComponent { | ||
|
||
readonly COMPANY_IMAGE_DEFAULT_URI = Constants.COMPANY_IMAGE_DEFAULT_URI; | ||
|
||
@Input() | ||
apply: JobApply; | ||
|
||
univers = Univers; | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
frontend-implicaction/src/app/board/enums/apply-status-enum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import {EnumCodeLabelAbstract} from '../../shared/enums/enum-code-label-abstract.enum'; | ||
|
||
export enum ApplyStatusCode { | ||
PENDING, SENT, CHASED, INTERVIEW | ||
} | ||
|
||
export class ApplyStatusEnum extends EnumCodeLabelAbstract<ApplyStatusCode> { | ||
static readonly PENDING = new EnumCodeLabelAbstract(ApplyStatusCode.PENDING, 'Je vais postuler'); | ||
static readonly SENT = new EnumCodeLabelAbstract(ApplyStatusCode.SENT, `J'ai postulé`); | ||
static readonly CHASED = new EnumCodeLabelAbstract(ApplyStatusCode.CHASED, `J'ai relancé`); | ||
static readonly INTERVIEW = new EnumCodeLabelAbstract(ApplyStatusCode.INTERVIEW, `J'ai un entretien`); | ||
|
||
constructor( | ||
readonly code: ApplyStatusCode, | ||
readonly label: string | ||
) { | ||
super(code, label); | ||
} | ||
|
||
static all(): ApplyStatusEnum[] { | ||
return this.values(); | ||
} | ||
|
||
static from(code: ApplyStatusCode): ApplyStatusEnum { | ||
return this.fromCode(code); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {ApplyStatusEnum} from '../enums/apply-status-enum'; | ||
|
||
export interface JobApply { | ||
id?: string; | ||
jobId: string; | ||
jobTitle: string; | ||
location: string; | ||
companyName: string; | ||
companyImageUrl: string; | ||
status: ApplyStatusEnum; | ||
contractType: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
frontend-implicaction/src/app/job/models/contract-type-enum.ts
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
frontend-implicaction/src/app/job/models/job-criteria-filter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import {ContractTypeCode} from './contract-type-enum'; | ||
import {ContractEnumCode} from '../../shared/enums/contract.enum'; | ||
|
||
export interface JobCriteriaFilter { | ||
search?: string; | ||
contractType?: ContractTypeCode; | ||
contractType?: ContractEnumCode; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters