-
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
#791 #1027
#791 #1027
Changes from 15 commits
7b8e451
e2cf167
1e09927
a8daf5a
3575826
f09a18d
500180b
8df76e9
272b878
11515eb
a1ed496
4754f22
e2d7676
cb8d2ec
6b2c944
984c579
ad41bcc
af21c27
ade29a9
1d37b12
653c2bc
946e08d
ea51ff0
552e838
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,4 @@ | |
</mat-grid-tile> | ||
</mat-grid-list> | ||
</div> | ||
</form> | ||
</form> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,8 @@ export class PaginatorComponent implements OnInit, OnChanges { | |
|
||
@Input() currentPage: PaginationElement; | ||
@Input() totalEntities: number; | ||
@Input() totalEntitiesDir: number; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use the same input ad it was before totalEntities |
||
|
||
@Output() pageChange = new EventEmitter<PaginationElement>(); | ||
|
||
carouselPageList: PaginationElement[] = []; | ||
|
@@ -57,7 +59,7 @@ export class PaginatorComponent implements OnInit, OnChanges { | |
} | ||
|
||
private getTotalPageAmount(): number { | ||
return Math.ceil(this.totalEntities / Constants.ITEMS_PER_PAGE); | ||
return Math.ceil(this.totalEntities / Constants.ITEMS_PER_PAGE) || Math.ceil(this.totalEntitiesDir / Constants.ITEMS_PER_PAGE_DIR); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just as an idea, maybe for getTotalPageAmount method will be good to receive from parent component flag like isDirections and then check and if yes use Constants.ITEMS_PER_PAGE_DIR |
||
} | ||
|
||
private createDisplayedPageList(): PaginationElement[] { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import { Input } from '@angular/core'; | ||
import { MatDateFormats } from '@angular/material/core'; | ||
import { WorkingDays } from '../enum/enumUA/working-hours'; | ||
import { City } from '../models/city.model'; | ||
|
@@ -25,7 +26,7 @@ export class Constants { | |
static readonly PHONE_PREFIX = '+380'; | ||
static readonly PROVIDER_ENTITY_TYPE = 1; | ||
static readonly WORKSHOP_ENTITY_TYPE = 2; | ||
|
||
static readonly ITEMS_PER_PAGE_DIR =10; | ||
static readonly ITEMS_PER_PAGE = 2 * Math.floor(window.innerWidth / (332)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what do you think is it make sense to use the same approach as with ITEMS_PER_PAGE constant? I mean "2 * Math.floor(window.innerWidth / (332))" |
||
|
||
static readonly RATE_ONE_STAR = 1; | ||
|
@@ -106,4 +107,4 @@ export const WorkingDaysValues: WorkingDaysToggleValue[] = [ | |
|
||
export class NotificationsConstants { | ||
static readonly NO_MESSAGE = 'У вас немає нових повідомлень'; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
export enum ModalConfirmationType { | ||
delete = 'delete', | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove empty line |
||
deleteDirection = 'deleteDirection', | ||
deleteTeacher = 'deleteTeacher', | ||
deleteProviderAdmin = 'deleteProviderAdmin', | ||
deleteProviderAdminDeputy = 'deleteProviderAdminDeputy', | ||
|
@@ -12,11 +14,18 @@ export enum ModalConfirmationType { | |
createApplication = 'createApplication', | ||
approveApplication = 'approveApplication', | ||
rejectApplication = 'rejectApplication', | ||
createDirection = 'createDirection', | ||
createDepartment = 'createDepartment', | ||
createClass = 'createClass', | ||
createProviderAdmin = 'createProviderAdmin', | ||
createProviderAdminDeputy = 'createProviderAdminDeputy', | ||
} | ||
export enum ModalConfirmationTitle { | ||
delete = 'ВИДАЛИТИ ГУРТОК', | ||
delete = 'ВИДАЛИТИ ГУРТОК?', | ||
deleteDirection = 'ВИДАЛИТИ НАПРЯМОК?', | ||
createDirection = 'CТВОРИТИ НАПРЯМОК?', | ||
createDepartment = 'CТВОРИТИ ВІДДІЛЕННЯ?', | ||
createClass = 'CТВОРИТИ КЛАС?', | ||
deleteChild = 'ВИЛУЧИТИ ДАНІ ПРО ДИТИНУ?', | ||
deleteTeacher = 'ВИЛУЧИТИ ДАНІ ПРО ВЧИТЕЛЯ', | ||
deleteProviderAdmin = 'ВИДАЛИТИ АДМІНІСТРАТОРА ГУРТКА', | ||
|
@@ -34,6 +43,10 @@ export enum ModalConfirmationTitle { | |
|
||
export enum ModalConfirmationText { | ||
delete = 'Ви впевнені, що хочете видалити гурток', | ||
deleteDirection = 'Ви впевнені, що хочете видалити напрямок', | ||
createDirection = 'Ви впевнені, що хочете створити напрямок?', | ||
createDepartment = 'Ви впевнені, що хочете створити відділення?', | ||
createClass = 'Ви впевнені, що хочете створити клас?', | ||
deleteChild = 'Ви впевнені, що хочете вилучити дані про дитину', | ||
deleteTeacher = 'Ви впевнені, що хочете вилучити дані про вчителя ?', | ||
deleteProviderAdmin = 'Ви впевнені, що хочете видалити адміністратора гуртка', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
export enum NoResultsTitle { | ||
noApplication = 'Заявок поки немає', | ||
noResultWorkshops = 'За результатами нічого не знайдено', | ||
noParentWorkshops = 'Тут буде відображатися інформація про гуртки, секцію або школу для навчання. Ще жодної заяви на гурток не подано.', | ||
noParentWorkshops = 'Тут буде відображатися інформація про гуртки, секцію фбо школу для навчання. Ще жодної заяви на гурток не подано.', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mistake |
||
noFavoriteWorkshops = 'Улюблених гуртків поки немає', | ||
noDirections = 'За результатами нічого не знайдено', | ||
noProviderAdmins = 'Користувачів поки немає', | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,3 +45,4 @@ export enum createProviderSteps { | |
'contacts', | ||
'description' | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,45 @@ | ||
export interface Direction { | ||
export class Direction { | ||
id: number; | ||
title: string; | ||
description: string; | ||
|
||
constructor(info, id?) { | ||
this.id = id; | ||
this.title = info.title; | ||
this.description = info.title; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. empty line |
||
} | ||
} | ||
export interface Department { | ||
|
||
export class Department { | ||
id: number; | ||
directionId: number; | ||
title: string; | ||
description: string; | ||
|
||
constructor(info, directionId, id?) { | ||
this.id = id; | ||
this.directionId = directionId; | ||
this.title = info.title; | ||
this.description = info.title; | ||
} | ||
} | ||
|
||
export interface IClass { | ||
export class IClass { | ||
id: number; | ||
departmentId: number; | ||
title: string; | ||
description: string; | ||
departmentId: number; | ||
|
||
constructor(info, departmentId, id?) { | ||
this.id = id, | ||
this.departmentId = departmentId, | ||
this.title = info.title, | ||
this.description = info.title | ||
} | ||
} | ||
|
||
export interface DirectionsFilter { | ||
totalAmount: number; | ||
entities: Direction[]; | ||
} |
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.
you can delete it as well