-
Notifications
You must be signed in to change notification settings - Fork 5
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
Oi#663 Create dropdown payType #1408
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/app/shared/enum/provider.ts
Outdated
@@ -7,7 +7,7 @@ export enum ProviderType { | |||
Other, | |||
} | |||
|
|||
export enum ProviderTypeUkr { | |||
export enum ProviderTypeUkr { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert this change
src/app/shared/enum/provider.ts
Outdated
export enum PayRateTypeUkr { | ||
Classes = 'Заняття', | ||
Month = 'Місяць', | ||
Day = 'День', | ||
Year = 'Рік', | ||
Hour = 'Година', | ||
Course = 'Курс', | ||
AllPeriod = 'Увесь період' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this enum to the ukr folder (we store all Ukrainians values in the separate folder)
src/app/shared/enum/provider.ts
Outdated
export enum PayRateType { | ||
Classes, | ||
Month, | ||
Day, | ||
Year, | ||
Hour, | ||
Course, | ||
AllPeriod | ||
} | ||
|
||
export enum PayRateTypeUkr { | ||
Classes = 'Заняття', | ||
Month = 'Місяць', | ||
Day = 'День', | ||
Year = 'Рік', | ||
Hour = 'Година', | ||
Course = 'Курс', | ||
AllPeriod = 'Увесь період' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move out from provider.ts because the payment does not relate to the provider, create a separate enum
@@ -23,6 +24,7 @@ import { AppState } from 'src/app/shared/store/app.state'; | |||
}) | |||
export class ActionsComponent implements OnInit, OnDestroy { | |||
readonly Role: typeof Role = Role; | |||
readonly PayRateTypeUkr = PayRateTypeUkr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add empty row below
[max]="validationConstants.MAX_PRICE"> | ||
</mat-radio-button> | ||
<p class="step-text">грн за</p> | ||
<div fxLayout='row' fxLayoutAlign="space-between center" > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use double quotes in the html (it is a good practice for the future, the single quotes usually are used only in ts file, double - in HTML). if you see such problems in other places (even if it is not your code) - please fix it
src/app/shared/enum/provider.ts
Outdated
export enum PayRateType { | ||
Classes, | ||
Month, | ||
Day, | ||
Year, | ||
Hour, | ||
Course, | ||
AllPeriod | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -13,6 +14,7 @@ import { Workshop } from 'src/app/shared/models/workshop.model'; | |||
export class WorkshopAboutComponent { | |||
readonly workingDays = WorkingDays; | |||
readonly workingDaysReverse = WorkingDaysReverse; | |||
readonly PayRateTypeUkr = PayRateTypeUkr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add empty row below
}else{ | ||
this.setPriceControlValue(); | ||
this.AboutFormGroup.get('payRate').reset(); | ||
this.AboutFormGroup.get('payRate')['disable']({emitEvent : true}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
save please the previous logic, revret this change. Your functionality is handled by setPriceControlValue function
@@ -107,7 +107,7 @@ export class WorkshopSectionItem extends SectionItem { | |||
export interface WorkshopCard { | |||
address: Address; | |||
directionId: number; | |||
isPerMonth: boolean; | |||
payRate: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
payRate: PayRateType
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty lines
<app-validation-hint | ||
[validationFormControl]="AboutFormGroup.get('payRate')" | ||
[isTouched]="AboutFormGroup.get('payRate').touched"> | ||
</app-validation-hint> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aligment
@@ -3,7 +3,15 @@ | |||
@import "src/app/shared/styles/dropdown.scss"; | |||
@import "src/app/shared/styles/toggle-button.scss"; | |||
|
|||
.pay-type{ | |||
flex-grow: 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woring spacing
@@ -113,6 +129,7 @@ export class CreateAboutFormComponent implements OnInit, OnDestroy { | |||
if(this.workshop.price){ | |||
this.priceRadioBtn.setValue(true, { emitEvent: false }); | |||
this.setPriceControlValue(this.workshop.price, 'enable', false); | |||
this.AboutFormGroup.get('payRate').setValue(this.workshop.payRate, {emitEvent : false}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is redundant
@@ -77,7 +80,7 @@ export class CreateAboutFormComponent implements OnInit, OnDestroy { | |||
/** | |||
* This method makes input enable if radiobutton value is true and sets the value to teh formgroup | |||
*/ | |||
private onPriceCtrlInit(): void { | |||
private onPriceCtrlInit(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this space
[validationFormControl]="AboutFormGroup.get('payRate')" | ||
[isTouched]="AboutFormGroup.get('payRate').touched"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add one space please
<div fxLayout='row' fxLayoutAlign='start center'> | ||
<div fxLayout="row" fxLayoutAlign="start"> | ||
<div fxLayout="column" fxLayoutAlign="start start"> | ||
<div fxLayout="row "fxLayoutAlign="start center"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove pelase one space
</div> | ||
</form> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line please
Fixed |
Follow the link: ita-social-projects/OoS-Backend#663