Bugzilla – Attachment 159263 Details for
Bug 35392
HTML in translatable string
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35392: Move usage-reports store into erm store
Bug-35392-Move-usage-reports-store-into-erm-store.patch (text/plain), 11.44 KB, created by
Pedro Amorim
on 2023-11-27 11:01:14 UTC
(
hide
)
Description:
Bug 35392: Move usage-reports store into erm store
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-11-27 11:01:14 UTC
Size:
11.44 KB
patch
obsolete
>From 2da3cfa35afa86230e0d1711396c778cd720bdbd Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Mon, 27 Nov 2023 10:47:05 +0000 >Subject: [PATCH] Bug 35392: Move usage-reports store into erm store > >This is all ERM, no need to have it be separate store files >--- > .../intranet-tmpl/prog/js/vue/modules/erm.ts | 2 +- > .../intranet-tmpl/prog/js/vue/stores/erm.js | 137 +++++++++++++++++ > .../prog/js/vue/stores/usage-reports.js | 138 ------------------ > 3 files changed, 138 insertions(+), 139 deletions(-) > delete mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/stores/usage-reports.js > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts b/koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts >index 0a39c70d56..42e26712cd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/modules/erm.ts >@@ -24,7 +24,7 @@ import { useVendorStore } from "../stores/vendors"; > import { useAVStore } from "../stores/authorised-values"; > import { useERMStore } from "../stores/erm"; > import { useNavigationStore } from "../stores/navigation"; >-import { useReportsStore } from "../stores/usage-reports"; >+import { useReportsStore } from "../stores/erm"; > import i18n from "../i18n"; > > const pinia = createPinia(); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js >index 3570499ead..157cf5b676 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/erm.js >@@ -10,3 +10,140 @@ export const useERMStore = defineStore("erm", { > }, > }), > }); >+ >+export const useReportsStore = defineStore("reports", { >+ state: () => ({ >+ months_data: [ >+ { short: "Jan", description: "January", value: 1, active: true }, >+ { short: "Feb", description: "February", value: 2, active: true }, >+ { short: "Mar", description: "March", value: 3, active: true }, >+ { short: "Apr", description: "April", value: 4, active: true }, >+ { short: "May", description: "May", value: 5, active: true }, >+ { short: "Jun", description: "June", value: 6, active: true }, >+ { short: "Jul", description: "July", value: 7, active: true }, >+ { short: "Aug", description: "August", value: 8, active: true }, >+ { short: "Sep", description: "September", value: 9, active: true }, >+ { short: "Oct", description: "October", value: 10, active: true }, >+ { short: "Nov", description: "November", value: 11, active: true }, >+ { short: "Dec", description: "December", value: 12, active: true }, >+ ], >+ query: null, >+ title_property_column_options: { >+ 1: { >+ id: 1, >+ name: "Provider name", >+ active: true, >+ used_by: ["title", "item", "database", "platform"], >+ column: { >+ title: __("Data provider"), >+ data: "provider_name", >+ searchable: true, >+ orderable: true, >+ }, >+ }, >+ 2: { >+ id: 2, >+ name: "Publisher", >+ active: false, >+ used_by: ["title", "item", "database"], >+ column: { >+ title: __("Publisher"), >+ data: "publisher", >+ searchable: true, >+ orderable: true, >+ }, >+ }, >+ 3: { >+ id: 3, >+ name: "Platform", >+ active: false, >+ used_by: ["item", "database", "platform"], >+ column: { >+ title: __("Platform"), >+ data: "platform", >+ searchable: true, >+ orderable: true, >+ }, >+ }, >+ 4: { >+ id: 4, >+ name: "Publisher ID", >+ active: false, >+ used_by: ["title", "database"], >+ column: { >+ title: __("Publisher ID"), >+ data: "publisher_id", >+ searchable: true, >+ orderable: true, >+ }, >+ }, >+ 5: { >+ id: 5, >+ name: "Online ISSN", >+ active: false, >+ used_by: ["title"], >+ column: { >+ title: __("Online ISSN"), >+ data: "online_issn", >+ searchable: true, >+ orderable: true, >+ }, >+ }, >+ 6: { >+ id: 6, >+ name: "Print ISSN", >+ active: false, >+ used_by: ["title"], >+ column: { >+ title: __("Print ISSN"), >+ data: "print_issn", >+ searchable: true, >+ orderable: true, >+ }, >+ }, >+ 7: { >+ id: 7, >+ name: "DOI", >+ active: false, >+ used_by: ["title"], >+ column: { >+ title: __("DOI"), >+ data: "title_doi", >+ searchable: true, >+ orderable: true, >+ }, >+ }, >+ 8: { >+ id: 8, >+ name: "URI", >+ active: false, >+ used_by: ["title"], >+ column: { >+ title: __("URI"), >+ data: "title_uri", >+ searchable: true, >+ orderable: true, >+ }, >+ }, >+ }, >+ report_type_map: { >+ TR_B1: ["YOP", "ISBN"], >+ TR_B2: ["YOP", "ISBN"], >+ TR_B3: ["YOP", "Access_Type", "ISBN"], >+ TR_J3: ["Access_Type"], >+ TR_J4: ["YOP"], >+ }, >+ }), >+ actions: { >+ getMonthsData() { >+ return this.months_data; >+ }, >+ getColumnOptions() { >+ return this.title_property_column_options; >+ }, >+ checkReportColumns(report_type, column) { >+ if (!this.report_type_map.hasOwnProperty(report_type)) return false; >+ return this.report_type_map[report_type].includes(column); >+ }, >+ }, >+}); >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/usage-reports.js b/koha-tmpl/intranet-tmpl/prog/js/vue/stores/usage-reports.js >deleted file mode 100644 >index ff3028ec5f..0000000000 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/stores/usage-reports.js >+++ /dev/null >@@ -1,138 +0,0 @@ >-import { defineStore } from "pinia"; >- >-export const useReportsStore = defineStore("reports", { >- state: () => ({ >- months_data: [ >- { short: "Jan", description: "January", value: 1, active: true }, >- { short: "Feb", description: "February", value: 2, active: true }, >- { short: "Mar", description: "March", value: 3, active: true }, >- { short: "Apr", description: "April", value: 4, active: true }, >- { short: "May", description: "May", value: 5, active: true }, >- { short: "Jun", description: "June", value: 6, active: true }, >- { short: "Jul", description: "July", value: 7, active: true }, >- { short: "Aug", description: "August", value: 8, active: true }, >- { short: "Sep", description: "September", value: 9, active: true }, >- { short: "Oct", description: "October", value: 10, active: true }, >- { short: "Nov", description: "November", value: 11, active: true }, >- { short: "Dec", description: "December", value: 12, active: true }, >- ], >- query: null, >- title_property_column_options: { >- 1: { >- id: 1, >- name: "Provider name", >- active: true, >- used_by: ["title", "item", "database", "platform"], >- column: { >- title: __("Data provider"), >- data: "provider_name", >- searchable: true, >- orderable: true, >- }, >- }, >- 2: { >- id: 2, >- name: "Publisher", >- active: false, >- used_by: ["title", "item", "database"], >- column: { >- title: __("Publisher"), >- data: "publisher", >- searchable: true, >- orderable: true, >- }, >- }, >- 3: { >- id: 3, >- name: "Platform", >- active: false, >- used_by: ["item", "database", "platform"], >- column: { >- title: __("Platform"), >- data: "platform", >- searchable: true, >- orderable: true, >- }, >- }, >- 4: { >- id: 4, >- name: "Publisher ID", >- active: false, >- used_by: ["title", "database"], >- column: { >- title: __("Publisher ID"), >- data: "publisher_id", >- searchable: true, >- orderable: true, >- }, >- }, >- 5: { >- id: 5, >- name: "Online ISSN", >- active: false, >- used_by: ["title"], >- column: { >- title: __("Online ISSN"), >- data: "online_issn", >- searchable: true, >- orderable: true, >- }, >- }, >- 6: { >- id: 6, >- name: "Print ISSN", >- active: false, >- used_by: ["title"], >- column: { >- title: __("Print ISSN"), >- data: "print_issn", >- searchable: true, >- orderable: true, >- }, >- }, >- 7: { >- id: 7, >- name: "DOI", >- active: false, >- used_by: ["title"], >- column: { >- title: __("DOI"), >- data: "title_doi", >- searchable: true, >- orderable: true, >- }, >- }, >- 8: { >- id: 8, >- name: "URI", >- active: false, >- used_by: ["title"], >- column: { >- title: __("URI"), >- data: "title_uri", >- searchable: true, >- orderable: true, >- }, >- }, >- }, >- report_type_map: { >- TR_B1: ["YOP", "ISBN"], >- TR_B2: ["YOP", "ISBN"], >- TR_B3: ["YOP", "Access_Type", "ISBN"], >- TR_J3: ["Access_Type"], >- TR_J4: ["YOP"], >- }, >- }), >- actions: { >- getMonthsData() { >- return this.months_data; >- }, >- getColumnOptions() { >- return this.title_property_column_options; >- }, >- checkReportColumns(report_type, column) { >- if (!this.report_type_map.hasOwnProperty(report_type)) return false; >- return this.report_type_map[report_type].includes(column); >- }, >- }, >-}); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35392
:
159256
|
159263
|
159264
|
159265
|
159279
|
159280
|
159281
|
159283
|
160450
|
160451
|
160512
|
160513
|
164466
|
164467
|
164473
|
164474
|
164475