Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #6433

Merged
merged 53 commits into from
Jun 28, 2023
Merged

Release #6433

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
215d12f
feat: disable notification
adkif Jun 27, 2023
350eb35
[MegaLinter] Apply linters automatic fixes
adkif Jun 27, 2023
358d781
Merge pull request #6416 from ever-co/feat/#6408-disable-notifications
evereq Jun 27, 2023
e76d86b
Merge pull request #6417 from ever-co/create-pull-request/patch
evereq Jun 27, 2023
6b22b52
feat: add new translation (en.json)
adkif Jun 28, 2023
061f5f6
fix: #6419 added "generating proposal" text
rahul-rocket Jun 28, 2023
ca8ec23
feat: add error validation messages
adkif Jun 28, 2023
c65a5b0
fix: text to translate (en.json)
adkif Jun 28, 2023
4be0161
fix: weekly limit validator
adkif Jun 28, 2023
250f182
fix: weekly limit validator
adkif Jun 28, 2023
8c3fe37
[MegaLinter] Apply linters automatic fixes
adkif Jun 28, 2023
69df40d
feat: add new attribute to employee
adkif Jun 28, 2023
db80ced
feat: generate migration to alter employee table
adkif Jun 28, 2023
23a5fbb
fix: #6419 job search page status column combine with job details
rahul-rocket Jun 28, 2023
e52a23d
Merge pull request #6427 from ever-co/fix/##6419-job-browse-search-page
rahul-rocket Jun 28, 2023
50f7337
feat: #6420 job applied CTA button for job search/browse
rahul-rocket Jun 28, 2023
7ad9055
Merge pull request #6428 from ever-co/feat/#6420-applied-button
rahul-rocket Jun 28, 2023
45b1bdb
Merge pull request #6426 from ever-co/create-pull-request/patch
evereq Jun 28, 2023
c69d332
feat: #6423 job employee number editor
rahul-rocket Jun 28, 2023
8b3655f
fix: #6423 working on job employees rates
rahul-rocket Jun 28, 2023
67eeba0
fix: #6423 updated employee rates from job -> employees page
rahul-rocket Jun 28, 2023
88139c6
fix: #6423 displayed currency format
rahul-rocket Jun 28, 2023
d376b04
fix: #6423 set min value
rahul-rocket Jun 28, 2023
04fb609
feat: add new translation (en.json)
adkif Jun 28, 2023
9034d98
feat: add new attribute to candidate
adkif Jun 28, 2023
c249ba1
Merge pull request #6429 from ever-co/feat/#6423-job-employees
rahul-rocket Jun 28, 2023
d5e5a82
feat: update candidate and employee model
adkif Jun 28, 2023
52aafcc
feat: seed minimumBillingRate values
adkif Jun 28, 2023
9b19132
feat: add minimum billing rate to rates DTO
adkif Jun 28, 2023
baece1f
feat: generate migration to alter candidate table
adkif Jun 28, 2023
1e3a980
feat: update view
adkif Jun 28, 2023
77a66a0
fix: formcontrol name
adkif Jun 28, 2023
1c94c2d
feat: generate migration for production
adkif Jun 28, 2023
fd5df3f
[MegaLinter] Apply linters automatic fixes
adkif Jun 28, 2023
aadb53c
Merge branch 'fix/#6418-employee-rates' into fix/#6418-employee-minim…
adkif Jun 28, 2023
289c221
wip: #6419 autofill hourly rate based on employee
rahul-rocket Jun 28, 2023
4502f1b
Merge branch 'develop' into fix/#6418-employee-rates
rahul-rocket Jun 28, 2023
4750f1a
fix: add more translation for bill rate
rahul-rocket Jun 28, 2023
c55fd79
Merge pull request #6425 from ever-co/fix/#6418-employee-rates
rahul-rocket Jun 28, 2023
2d53ac5
Merge branch 'develop' into fix/#6418-employee-minimum-bill-rate
rahul-rocket Jun 28, 2023
1c81f92
fix: #6418 build issue due to missing parameters
rahul-rocket Jun 28, 2023
4f0dc31
fix: added minimum billing rate to the employee table
rahul-rocket Jun 28, 2023
be2b92e
[MegaLinter] Apply linters automatic fixes
rahul-rocket Jun 28, 2023
6f8f2ce
fix: added minimum billing rate to the candidate table
rahul-rocket Jun 28, 2023
5cf930e
Merge pull request #6430 from ever-co/fix/#6418-employee-minimum-bill…
rahul-rocket Jun 28, 2023
c9f72cc
fix: increase width for minimum billing rate for job -> employees page
rahul-rocket Jun 28, 2023
25d81a8
Merge branch 'develop' into fix/#6419-job-browser-rates
rahul-rocket Jun 28, 2023
7d6f940
chore: update Gauzy AI SDK
evereq Jun 28, 2023
ba4da0c
fix: autofill employee hourly rates based on employee
rahul-rocket Jun 28, 2023
c3bbf16
Merge pull request #6432 from ever-co/fix/#6419-job-browser-rates
rahul-rocket Jun 28, 2023
19b95a3
Merge pull request #6431 from ever-co/create-pull-request/patch
evereq Jun 28, 2023
78e5cd5
fix: #6424 disappear applied jobs
rahul-rocket Jun 28, 2023
a99e85b
Merge pull request #6434 from ever-co/fix/#6424-applied-jobs-disappear
rahul-rocket Jun 28, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,54 +11,120 @@
{{ 'FORM.RATES.EXPECTED_RATE' | translate }}
</nb-card-header>
<nb-card-body>
<div class="col-12">
<div class="form-group">
<label for="payPeriodsSelect" class="label">
{{ 'FORM.LABELS.PAY_PERIOD' | translate }}
</label>
<nb-select
id="payPeriodsSelect"
formControlName="payPeriod"
[placeholder]="'FORM.LABELS.PAY_PERIOD' | translate"
class="d-block"
size="medium"
fullWidth
>
<nb-option
*ngFor="let payPeriod of payPeriods"
[value]="payPeriod"
<div class="row">
<div class="col-6">
<div class="form-group">
<label
for="payPeriodsSelect"
class="label"
>
{{
payPeriod
| replace: '_':' '
| titlecase
'FORM.LABELS.PAY_PERIOD'
| translate
}}
</nb-option>
</nb-select>
</label>
<nb-select
id="payPeriodsSelect"
formControlName="payPeriod"
[placeholder]="
'FORM.LABELS.PAY_PERIOD'
| translate
"
class="d-block"
size="medium"
fullWidth
>
<nb-option
*ngFor="
let payPeriod of payPeriods
"
[value]="payPeriod"
>
{{
payPeriod
| replace : '_' : ' '
| titlecase
}}
</nb-option>
</nb-select>
</div>
</div>
</div>
<div class="col-6 float-left">
<div class="form-group">
<label class="label" for="billRateValueInput">
{{ 'FORM.LABELS.BILL_RATE' | translate }}
</label>
<input
fullWidth
id="billRateValueInput"
type="number"
[min]="0"
step="0.1"
nbInput
formControlName="billRateValue"
[placeholder]="'FORM.PLACEHOLDERS.BILL_RATE' | translate"
/>
<div class="col-6">
<ga-currency
formControlName="billRateCurrency"
(optionChange)="currencyChanged($event)"
></ga-currency>
</div>
</div>
<div class="col-6 float-left">
<ga-currency
formControlName="billRateCurrency"
(optionChange)="currencyChanged($event)"
></ga-currency>
<div class="row">
<div class="col-6">
<div class="form-group">
<label
class="label"
for="billRateValueInput"
>
{{
'FORM.LABELS.BILL_RATE'
| translate
}}
</label>
<input
fullWidth
id="billRateValueInput"
type="number"
[min]="minimumBillingRate.value || 0"
step="0.1"
nbInput
formControlName="billRateValue"
[placeholder]="
'FORM.PLACEHOLDERS.BILL_RATE'
| translate
"
/>
</div>
<div
class="caption status-danger"
*ngIf="billRateValue.errors?.['min']"
>
{{ 'FORM.RATES.ERRORS.BILL_RATE' | translate: { min:
billRateValue.errors?.['min']?.min, currency:
billRateCurrency.value } }}
</div>
</div>
<div class="col-6">
<div class="form-group">
<label
class="label"
for="minimumBillingRateInput"
>
{{
'FORM.LABELS.BILL_RATE_MIN'
| translate
}}
</label>
<input
fullWidth
id="minimumBillingRateInput"
type="number"
[min]="0"
step="0.1"
nbInput
formControlName="minimumBillingRate"
[placeholder]="
'FORM.PLACEHOLDERS.BILL_RATE_MIN'
| translate
"
/>
</div>
<div
class="caption status-danger"
*ngIf="minimumBillingRate.errors?.['min']"
>
{{ 'FORM.RATES.ERRORS.BILL_RATE_MIN' | translate: { min:
minimumBillingRate.errors?.['min']?.min, currency:
billRateCurrency.value } }}
</div>
</div>
</div>
</nb-card-body>
</nb-card>
Expand All @@ -71,20 +137,43 @@
<nb-card-body>
<div class="form-group">
<label class="label" for="reWeeklyLimitInput">
{{ 'FORM.LABELS.RECURRING_WEEKLY_LIMIT' | translate }}
{{
'FORM.LABELS.RECURRING_WEEKLY_LIMIT'
| translate
}}
</label>
<input
fullWidth
id="reWeeklyLimitInput"
nbInput
type="number"
[min]="1"
[max]="128"
[min]="0"
[max]="168"
step="0.1"
formControlName="reWeeklyLimit"
[placeholder]="'FORM.PLACEHOLDERS.RECURRING_WEEKLY_LIMIT' | translate"
[placeholder]="
'FORM.PLACEHOLDERS.RECURRING_WEEKLY_LIMIT'
| translate
"
autofocus
/>
</div>
<div
class="caption status-danger"
*ngIf="reWeeklyLimit.errors?.['max']"
>
{{
'FORM.RATES.ERRORS.LIMIT_MAX' | translate : { max: reWeeklyLimit.errors?.['max']?.max
} }}
</div>
<div
class="caption status-danger"
*ngIf="reWeeklyLimit.errors?.['min']"
>
{{
'FORM.RATES.ERRORS.LIMIT_MIN' | translate: { min: reWeeklyLimit.errors?.['min']?.min
} }}
</div>
</nb-card-body>
</nb-card>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
import { Component, OnDestroy, OnInit, Input } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import {
IEmployee,
PayPeriodEnum,
ICandidate,
ICurrency
} from '@gauzy/contracts';
import { IEmployee, PayPeriodEnum, ICandidate, ICurrency } from '@gauzy/contracts';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { filter, tap } from 'rxjs';
import {
CandidateStore,
EmployeeStore,
Store
} from '../../../@core/services';
import { CandidateStore, EmployeeStore, Store } from '../../../@core/services';

@UntilDestroy({ checkProperties: true })
@Component({
Expand All @@ -21,7 +12,6 @@ import {
styleUrls: ['employee-rates.component.scss']
})
export class EmployeeRatesComponent implements OnInit, OnDestroy {

@Input() public isEmployee: boolean;
@Input() public isCandidate: boolean;

Expand All @@ -30,19 +20,16 @@ export class EmployeeRatesComponent implements OnInit, OnDestroy {
payPeriods = Object.values(PayPeriodEnum);

/*
* Employee Rates Form
*/
* Employee Rates Form
*/
public form: FormGroup = EmployeeRatesComponent.buildForm(this.fb);
static buildForm(fb: FormBuilder): FormGroup {
return fb.group({
payPeriod: [],
billRateValue: [],
billRateValue: ['', Validators.min(0)],
billRateCurrency: [],
reWeeklyLimit: ['', Validators.compose([
Validators.min(1),
Validators.max(128)
])
]
reWeeklyLimit: ['', Validators.compose([Validators.min(0), Validators.max(168)])],
minimumBillingRate: ['', Validators.min(0)]
});
}

Expand All @@ -51,21 +38,21 @@ export class EmployeeRatesComponent implements OnInit, OnDestroy {
private readonly store: Store,
private readonly employeeStore: EmployeeStore,
private readonly candidateStore: CandidateStore
) { }
) {}

ngOnInit() {
this.employeeStore.selectedEmployee$
.pipe(
filter((employee: IEmployee) => !!employee),
tap((employee: IEmployee) => this.selectedEmployee = employee),
tap((employee: IEmployee) => (this.selectedEmployee = employee)),
tap((employee: IEmployee) => this._syncRates(employee)),
untilDestroyed(this)
)
.subscribe();
this.candidateStore.selectedCandidate$
.pipe(
filter((candidate: ICandidate) => !!candidate),
tap((candidate: ICandidate) => this.selectedCandidate = candidate),
tap((candidate: ICandidate) => (this.selectedCandidate = candidate)),
tap((candidate: ICandidate) => this._syncRates(candidate)),
untilDestroyed(this)
)
Expand Down Expand Up @@ -96,14 +83,31 @@ export class EmployeeRatesComponent implements OnInit, OnDestroy {
payPeriod: user.payPeriod,
billRateValue: user.billRateValue,
billRateCurrency: user.billRateCurrency,
reWeeklyLimit: user.reWeeklyLimit
reWeeklyLimit: user.reWeeklyLimit,
minimumBillingRate: user.minimumBillingRate
});
}

/*
* On Changed Currency Event Emitter
*/
currencyChanged($event: ICurrency) { }
currencyChanged($event: ICurrency) {}

public get reWeeklyLimit() {
return this.form.get('reWeeklyLimit');
}

public get billRateValue() {
return this.form.get('billRateValue');
}

public get billRateCurrency() {
return this.form.get('billRateCurrency');
}

public get minimumBillingRate() {
return this.form.get('minimumBillingRate');
}

ngOnDestroy() { }
ngOnDestroy() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Cell, DefaultEditor } from 'ng2-smart-table';

@Component({
template: `<input
class="form-control"
[min]="0"
[type]="'number'"
[(ngModel)]="cell.newValue"
[name]="cell.getId()"
>`,
})
export class NumberEditorComponent extends DefaultEditor implements OnInit {

@Input() cell!: Cell;
@Output() onConfirm: EventEmitter<number> = new EventEmitter<number>();

constructor() {
super();
}

ngOnInit() {
if (this.cell.newValue) {
this.cell.newValue = +this.cell.newValue; // Convert the input to a number
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import {
NbIconModule,
NbTooltipModule,
Expand Down Expand Up @@ -40,10 +41,12 @@ import { ProjectOrganizationGridDetailsComponent } from './project-organization-
import { ProjectOrganizationEmployeesComponent } from './project-organization-employees/project-organization-employees.component';
import { PhoneUrlComponent } from './phone-url/phone-url.component';
import { AllowScreenshotCaptureComponent } from './allow-screenshot-capture/allow-screenshot-capture.component';
import { NumberEditorComponent } from './editors/number-editor.component';

@NgModule({
imports: [
CommonModule,
FormsModule,
NbIconModule,
NbTooltipModule,
NbBadgeModule,
Expand Down Expand Up @@ -83,7 +86,9 @@ import { AllowScreenshotCaptureComponent } from './allow-screenshot-capture/allo
ProjectOrganizationGridDetailsComponent,
ProjectOrganizationEmployeesComponent,
PhoneUrlComponent,
AllowScreenshotCaptureComponent
AllowScreenshotCaptureComponent,
// smart table field editor
NumberEditorComponent
],
exports: [
NotesWithTagsComponent,
Expand Down
Loading
Loading