Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…late feat: initial commit on register proposal
- Loading branch information
Showing
6 changed files
with
162 additions
and
6 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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<nb-card class="main"> | ||
<nb-card-header class="d-flex"> | ||
<h3> | ||
Register Proposal | ||
</h3> | ||
</nb-card-header> | ||
|
||
<nb-card-body> | ||
<form [formGroup]="form"> | ||
<div class="row"> | ||
<div class="col-sm-4"> | ||
<div class="form-group"> | ||
<label class="label">Author</label> | ||
<ga-employee-selector | ||
#employeeSelector | ||
[skipGlobalChange]="true" | ||
id="authorInput" | ||
class="employees" | ||
> | ||
</ga-employee-selector> | ||
</div> | ||
</div> | ||
|
||
<div class="col-sm-4"> | ||
<div class="form-group"> | ||
<label class="label">Job Post URL</label> | ||
<input | ||
nbInput | ||
fullWidth | ||
type="text" | ||
placeholder="Job Post URL" | ||
formControlName="jobPostUrl" | ||
autocomplete="on" | ||
/> | ||
</div> | ||
</div> | ||
|
||
<div class="col-sm-4"> | ||
<div class="form-group"> | ||
<label class="label">Pick a Date</label> | ||
<input | ||
formControlName="valueDate" | ||
nbInput | ||
fullWidth | ||
placeholder="Pick a Date" | ||
[nbDatepicker]="formpicker" | ||
/> | ||
<nb-datepicker #formpicker></nb-datepicker> | ||
</div> | ||
</div> | ||
|
||
<div class="col-sm-6"> | ||
<div class="form-group"> | ||
<label class="label">Job Post Content</label> | ||
<textarea | ||
nbInput | ||
fullWidth | ||
rows="12" | ||
type="text" | ||
placeholder="Job Post Content" | ||
formControlName="jobPostContent" | ||
autocomplete="on" | ||
></textarea> | ||
<button class="upload-btn" nbButton status="primary"> | ||
Upload | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<div class="col-sm-6"> | ||
<div class="form-group"> | ||
<label class="label">Proposal Content</label> | ||
<textarea | ||
nbInput | ||
rows="12" | ||
fullWidth | ||
type="text" | ||
placeholder="Proposal Content" | ||
formControlName="proposalContent" | ||
autocomplete="on" | ||
></textarea> | ||
<button class="upload-btn" nbButton status="primary"> | ||
Upload | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</nb-card-body> | ||
<nb-card-footer class="text-right"> | ||
<button class="register-btn" status="success" nbButton> | ||
Register Proposal | ||
</button> | ||
</nb-card-footer> | ||
</nb-card> |
11 changes: 11 additions & 0 deletions
11
apps/gauzy/src/app/pages/proposals/register/proposal-register.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,11 @@ | ||
.form-group { | ||
margin: 20px; | ||
} | ||
|
||
.register-btn { | ||
margin: 20px; | ||
} | ||
|
||
.upload-btn { | ||
margin-top: 20px; | ||
} |
33 changes: 29 additions & 4 deletions
33
apps/gauzy/src/app/pages/proposals/register/proposal-register.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 |
---|---|---|
@@ -1,11 +1,36 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Component, OnInit, ViewChild } from '@angular/core'; | ||
import { FormGroup, FormBuilder, Validators } from '@angular/forms'; | ||
import { EmployeeSelectorComponent } from '../../../@theme/components/header/selectors/employee/employee.component'; | ||
import { Store } from '../../../@core/services/store.service'; | ||
import { Proposal } from '@gauzy/models'; | ||
|
||
@Component({ | ||
selector: 'ga-proposal-register', | ||
templateUrl: './proposal-register.component.html' | ||
templateUrl: './proposal-register.component.html', | ||
styleUrls: ['././proposal-register.component.scss'] | ||
}) | ||
export class ProposalRegisterComponent implements OnInit { | ||
constructor() {} | ||
constructor(private fb: FormBuilder, private store: Store) {} | ||
|
||
ngOnInit() {} | ||
@ViewChild('employeeSelector', { static: false }) | ||
employeeSelector: EmployeeSelectorComponent; | ||
|
||
proposal?: Proposal; | ||
form: FormGroup; | ||
|
||
ngOnInit() { | ||
this._initializeForm(); | ||
} | ||
|
||
private _initializeForm() { | ||
this.form = this.fb.group({ | ||
employee: '', | ||
jobPostUrl: ['', Validators.required], | ||
valueDate: [new Date(), Validators.required], | ||
jobPostContent: '', | ||
proposalContent: '' | ||
}); | ||
} | ||
|
||
private registerProposal() {} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Employee, EmployeeFindInput } from './employee.model'; | ||
import { BaseEntityModel as IBaseEntityModel } from './base-entity.model'; | ||
|
||
export interface Proposal extends IBaseEntityModel { | ||
employee?: Employee; | ||
employeeId?: string; | ||
jobPostUrl?: string; | ||
valueDate: Date; | ||
jobPostContent?: string; | ||
proposalContent?: string; | ||
} | ||
|
||
export interface ProposalCreateInput { | ||
employee?: Employee; | ||
employeeId?: string; | ||
jobPostUrl?: string; | ||
valueDate: Date; | ||
jobPostContent?: string; | ||
proposalContent?: string; | ||
} |