diff --git a/src/app/_modules/form-fields/types/document/form-field-document.component.scss b/src/app/_modules/form-fields/types/document/form-field-document.component.scss index 48eab06..f7b512e 100644 --- a/src/app/_modules/form-fields/types/document/form-field-document.component.scss +++ b/src/app/_modules/form-fields/types/document/form-field-document.component.scss @@ -55,8 +55,9 @@ .values { .item { - background: transparent url('~src/assets/images/icons/document/document_pdf_60dp.svg') 0 0 no-repeat; - min-height: 60px; + background: transparent url('~src/assets/images/icons/document/document_60dp.svg') 0 0 no-repeat; + background-size: contain; + height: 60px; padding-left: 72px; font-size: 20px; display: flex; diff --git a/src/app/_modules/form-fields/types/document/single/field-document-single.component.html b/src/app/_modules/form-fields/types/document/single/field-document-single.component.html index 6e082f1..e06ec39 100644 --- a/src/app/_modules/form-fields/types/document/single/field-document-single.component.html +++ b/src/app/_modules/form-fields/types/document/single/field-document-single.component.html @@ -10,8 +10,10 @@
{{asset.extension}}
+{{extension}}
\ No newline at end of file
diff --git a/src/app/_modules/form-fields/types/document/single/field-document-single.component.ts b/src/app/_modules/form-fields/types/document/single/field-document-single.component.ts
index b9b48bd..13b3460 100644
--- a/src/app/_modules/form-fields/types/document/single/field-document-single.component.ts
+++ b/src/app/_modules/form-fields/types/document/single/field-document-single.component.ts
@@ -52,6 +52,9 @@ export class FieldDocumentSingleComponent {
this.asset = asset;
this.control?.setValue(asset?.id);
}
+ get extension(){
+ return `url(/assets/images/icons/document/${ICON_TYPE[this.asset.extension]}.svg)`
+ }
@@ -87,3 +90,17 @@ export class FieldDocumentSingleComponent {
});
}
}
+
+const ICON_TYPE:any={
+ rtf:'DOC',
+ docx:'DOC',
+ doc:'DOC',
+ xl:'XLS',
+ xls:'XLS',
+ xlsx:'XLS',
+ ppt:'PPT',
+ pptx:'PPT',
+ jpg:'JPG',
+ jpeg:'JPG',
+ pdf:'PDF'
+}
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 4e0f3eb..c948ad0 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
@@ -7,7 +7,7 @@
align-items: flex-start;
height: 60px;
background: center no-repeat;
- background-image: url('~src/assets/images/icons/document/document_pdf_60dp.svg');
+ background-image: url('~src/assets/images/icons/document/document_60dp.svg');
background-size: contain;
}
a{
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 46db145..5a5dfcf 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
@@ -29,12 +29,29 @@ export class DocumentSectionComponent {
}
get docIcon(){
- const ext = this.section.groups.data[0].fields.data[0].value.data[0].extension.toUpperCase();
+ const ext = ICON_TYPE[
+ this.section.groups.data[0].fields.data[0].value.data[0].extension
+ ]
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;
}
}
+
+const ICON_TYPE:any={
+ rtf:'DOC',
+ docx:'DOC',
+ doc:'DOC',
+ xl:'XLS',
+ xls:'XLS',
+ xlsx:'XLS',
+ ppt:'PPT',
+ pptx:'PPT',
+ jpg:'JPG',
+ jpeg:'JPG',
+ pdf:'PDF'
+}
+
diff --git a/src/app/_modules/pages/sections/types/basic/member/item/member-section-item.component.scss b/src/app/_modules/pages/sections/types/basic/member/item/member-section-item.component.scss
index 756d6bf..26f7ffc 100644
--- a/src/app/_modules/pages/sections/types/basic/member/item/member-section-item.component.scss
+++ b/src/app/_modules/pages/sections/types/basic/member/item/member-section-item.component.scss
@@ -19,7 +19,7 @@
}
.doc{
display: block;
- background: url('~src/assets/images/icons/document/document_pdf_60dp.svg') top left no-repeat;
+ background: url('~src/assets/images/icons/document/document_60dp.svg') top left no-repeat;
padding-left: 62px;
min-height: 60px;
}
diff --git a/src/app/_modules/pages/sections/types/basic/member/list/member-section-list.component.ts b/src/app/_modules/pages/sections/types/basic/member/list/member-section-list.component.ts
index b0fae3a..4868ee7 100644
--- a/src/app/_modules/pages/sections/types/basic/member/list/member-section-list.component.ts
+++ b/src/app/_modules/pages/sections/types/basic/member/list/member-section-list.component.ts
@@ -89,10 +89,12 @@ export class MemberSectionListComponent {
const ICON_TYPE:any={
+ rtf:'DOC',
docx:'DOC',
doc:'DOC',
xl:'XLS',
xls:'XLS',
+ xlsx:'XLS',
ppt:'PPT',
pptx:'PPT',
jpg:'JPG',