From 7e0f76461d1a5bacdac656f95690c43476412b95 Mon Sep 17 00:00:00 2001 From: Boris Voropaev Date: Thu, 7 Sep 2023 09:52:01 +0300 Subject: [PATCH] calendar n document --- .../date/form-field-date.component.spec.ts | 10 +++++++++ .../types/date/form-field-date.module.ts | 5 ++++- .../document/document-section.component.html | 9 +++++--- .../document/document-section.component.scss | 14 ++++++++---- .../document/document-section.component.ts | 6 +++++ src/assets/css/basics.scss | 7 ++++++ src/assets/images/icons/document/DOC.svg | 21 ++++++++++++++++++ src/assets/images/icons/document/JPG.svg | 20 +++++++++++++++++ src/assets/images/icons/document/PDF.svg | 22 +++++++++++++++++++ src/assets/images/icons/document/PPT.svg | 19 ++++++++++++++++ src/assets/images/icons/document/XLS.svg | 20 +++++++++++++++++ 11 files changed, 145 insertions(+), 8 deletions(-) create mode 100644 src/app/_modules/form-fields/types/date/form-field-date.component.spec.ts create mode 100644 src/assets/images/icons/document/DOC.svg create mode 100644 src/assets/images/icons/document/JPG.svg create mode 100644 src/assets/images/icons/document/PDF.svg create mode 100644 src/assets/images/icons/document/PPT.svg create mode 100644 src/assets/images/icons/document/XLS.svg diff --git a/src/app/_modules/form-fields/types/date/form-field-date.component.spec.ts b/src/app/_modules/form-fields/types/date/form-field-date.component.spec.ts new file mode 100644 index 0000000..56a044e --- /dev/null +++ b/src/app/_modules/form-fields/types/date/form-field-date.component.spec.ts @@ -0,0 +1,10 @@ +import { Injectable } from "@angular/core"; +import { NativeDateAdapter } from "@angular/material/core"; + +@Injectable() export class FormDateAdapter extends NativeDateAdapter{ + getFirstDayOfWeek(): number { + return 1; + } +} + +export const DATE_FORMAT = {} \ No newline at end of file diff --git a/src/app/_modules/form-fields/types/date/form-field-date.module.ts b/src/app/_modules/form-fields/types/date/form-field-date.module.ts index 2b1847e..90c3d8b 100644 --- a/src/app/_modules/form-fields/types/date/form-field-date.module.ts +++ b/src/app/_modules/form-fields/types/date/form-field-date.module.ts @@ -10,6 +10,8 @@ import {MatFormFieldModule} from "@angular/material/form-field"; import {MatNativeDateModule} from "@angular/material/core"; import {MatInputModule} from "@angular/material/input"; import {NoopAnimationsModule} from "@angular/platform-browser/animations"; +import { DateAdapter } from '@angular/material/core'; +import { FormDateAdapter } from './form-field-date.component.spec'; @NgModule({ imports: [ @@ -31,7 +33,8 @@ import {NoopAnimationsModule} from "@angular/platform-browser/animations"; FieldDateSingleComponent ], providers: [ - DatePipe + DatePipe, + { provide: DateAdapter, useClass: FormDateAdapter } ] }) export class FormFieldDateModule {} diff --git a/src/app/_modules/pages/sections/types/basic/document/document-section.component.html b/src/app/_modules/pages/sections/types/basic/document/document-section.component.html index 1d9f132..82c13a9 100644 --- a/src/app/_modules/pages/sections/types/basic/document/document-section.component.html +++ b/src/app/_modules/pages/sections/types/basic/document/document-section.component.html @@ -1,6 +1,9 @@ - - -
\ No newline at end of file +
+
+
+ +
+
diff --git a/src/app/_modules/pages/sections/types/basic/document/document-section.component.scss b/src/app/_modules/pages/sections/types/basic/document/document-section.component.scss index 0aed01e..4e0f3eb 100644 --- a/src/app/_modules/pages/sections/types/basic/document/document-section.component.scss +++ b/src/app/_modules/pages/sections/types/basic/document/document-section.component.scss @@ -1,8 +1,14 @@ :host { - display: block; - background: url('~src/assets/images/icons/document/document_pdf_60dp.svg') top left no-repeat; - padding-left: 62px; - min-height: 60px; + display: flex; + grid-gap: 16px; +} +.doc-icon{ + flex-basis: 60px; + align-items: flex-start; + height: 60px; + background: center no-repeat; + background-image: url('~src/assets/images/icons/document/document_pdf_60dp.svg'); + background-size: contain; } a{ font-size: 20px; diff --git a/src/app/_modules/pages/sections/types/basic/document/document-section.component.ts b/src/app/_modules/pages/sections/types/basic/document/document-section.component.ts index 25061c7..46db145 100644 --- a/src/app/_modules/pages/sections/types/basic/document/document-section.component.ts +++ b/src/app/_modules/pages/sections/types/basic/document/document-section.component.ts @@ -28,6 +28,12 @@ export class DocumentSectionComponent { return this.section.groups.data[0].fields.data[2].value.data[0]; } + get docIcon(){ + const ext = this.section.groups.data[0].fields.data[0].value.data[0].extension.toUpperCase(); + return `url('/assets/images/icons/document/${ext}.svg')` + // return `url('/assets/images/icons/document/document_pdf_60dp.svg')` + } + get download(){ return this.section.groups.data[0].fields.data[0].value.data[0].links.download; } diff --git a/src/assets/css/basics.scss b/src/assets/css/basics.scss index 6214bde..d2afd00 100644 --- a/src/assets/css/basics.scss +++ b/src/assets/css/basics.scss @@ -7,9 +7,16 @@ button.mat-calendar-body-cell:hover{ background-color: transparent; border: none; + font-weight: 400; } + +button.mat-calendar-body-cell{ + font-weight: 400; +} + .mat-calendar-body-cell:not(.mat-calendar-body-disabled):hover > .mat-calendar-body-cell-content:not(.mat-calendar-body-selected):not(.mat-calendar-body-comparison-identical){ background-color: rgba(0, 162, 255,0.3); + font-weight: 400; } .tox-promotion, .tox-statusbar__branding { diff --git a/src/assets/images/icons/document/DOC.svg b/src/assets/images/icons/document/DOC.svg new file mode 100644 index 0000000..7d8972d --- /dev/null +++ b/src/assets/images/icons/document/DOC.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/icons/document/JPG.svg b/src/assets/images/icons/document/JPG.svg new file mode 100644 index 0000000..59e2799 --- /dev/null +++ b/src/assets/images/icons/document/JPG.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/icons/document/PDF.svg b/src/assets/images/icons/document/PDF.svg new file mode 100644 index 0000000..801b3a3 --- /dev/null +++ b/src/assets/images/icons/document/PDF.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/icons/document/PPT.svg b/src/assets/images/icons/document/PPT.svg new file mode 100644 index 0000000..f49c9e0 --- /dev/null +++ b/src/assets/images/icons/document/PPT.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/icons/document/XLS.svg b/src/assets/images/icons/document/XLS.svg new file mode 100644 index 0000000..ab2f9e1 --- /dev/null +++ b/src/assets/images/icons/document/XLS.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + +