WIP Набросала отображение данных
This commit is contained in:
@@ -74,7 +74,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
protocolsData: (state) => state.medical.protocolsData,
|
||||
protocolsList: (state) => state.medical.protocolsList,
|
||||
}),
|
||||
sortingClass() {
|
||||
return this.sorting
|
||||
@@ -86,8 +86,8 @@ export default {
|
||||
};
|
||||
},
|
||||
sortingYears() {
|
||||
if (!this.protocolsData) return [];
|
||||
let years = this.protocolsData
|
||||
if (!this.protocolsList) return [];
|
||||
let years = this.protocolsList
|
||||
.map((elem) => {
|
||||
return elem?.start.slice(0, 4);
|
||||
})
|
||||
@@ -95,9 +95,9 @@ export default {
|
||||
return this.sorting ? [...new Set(years.reverse())] : [...new Set(years)];
|
||||
},
|
||||
sortingProtocols() {
|
||||
if (!this.protocolsData) return [];
|
||||
if (!this.protocolsList) return [];
|
||||
let protocols = [];
|
||||
this.protocolsData.forEach((elem) =>
|
||||
this.protocolsList.forEach((elem) =>
|
||||
protocols.push({
|
||||
id: elem.id,
|
||||
employee: {
|
||||
|
||||
Reference in New Issue
Block a user