Bug 32030: Fix date input length
[koha.git] / koha-tmpl / intranet-tmpl / prog / js / vue / components / ERM / ERMMain.vue
1 <template>
2     <div v-if="ERMModule">
3         <Breadcrumb />
4         <div class="main container-fluid">
5             <div class="row">
6                 <div class="col-sm-10 col-sm-push-2">
7                     <main>
8                         <Dialog />
9                         <router-view />
10                     </main>
11                 </div>
12
13                 <div class="col-sm-2 col-sm-pull-10">
14                     <aside>
15                         <div id="navmenu">
16                             <div id="navmenulist">
17                                 <h5>{{ $__("E-Resource management") }}</h5>
18                                 <ul>
19                                     <li>
20                                         <router-link
21                                             to="/cgi-bin/koha/erm/agreements"
22                                         >
23                                             <i class="fa fa-check-circle-o"></i>
24                                             {{ $__("Agreements") }}</router-link
25                                         >
26                                     </li>
27                                     <li>
28                                         <router-link
29                                             to="/cgi-bin/koha/erm/licenses"
30                                         >
31                                             <i class="fa fa-gavel"></i>
32                                             {{ $__("Licenses") }}</router-link
33                                         >
34                                     </li>
35                                     <li>
36                                         <router-link
37                                             to="/cgi-bin/koha/erm/eholdings"
38                                             class="disabled"
39                                         >
40                                             <i class="fa fa-crosshairs"></i>
41                                             {{ $__("eHoldings") }}
42                                         </router-link>
43                                     </li>
44
45                                     <li>
46                                         <ul>
47                                             <li
48                                                 v-for="provider in erm_providers"
49                                                 :key="provider"
50                                             >
51                                                 <router-link
52                                                     v-if="provider == 'local'"
53                                                     :to="`/cgi-bin/koha/erm/eholdings/local`"
54                                                     class="disabled"
55                                                 >
56                                                     <i
57                                                         class="fa fa-map-marker"
58                                                     ></i>
59                                                     {{
60                                                         $__("Local")
61                                                     }}</router-link
62                                                 >
63                                                 <router-link
64                                                     v-else-if="
65                                                         provider == 'ebsco'
66                                                     "
67                                                     :to="`/cgi-bin/koha/erm/eholdings/ebsco`"
68                                                     class="disabled"
69                                                 >
70                                                     <i class="fa fa-globe"></i>
71                                                     {{
72                                                         $__("EBSCO")
73                                                     }}</router-link
74                                                 >
75                                                 <ul>
76                                                     <li>
77                                                         <router-link
78                                                             :to="`/cgi-bin/koha/erm/eholdings/${provider}/packages`"
79                                                         >
80                                                             <i
81                                                                 class="fa fa-archive"
82                                                             ></i>
83                                                             {{
84                                                                 $__("Packages")
85                                                             }}</router-link
86                                                         >
87                                                     </li>
88                                                     <li>
89                                                         <router-link
90                                                             :to="`/cgi-bin/koha/erm/eholdings/${provider}/titles`"
91                                                         >
92                                                             <i
93                                                                 class="fa fa-sort-alpha-asc"
94                                                             ></i>
95                                                             {{
96                                                                 $__("Titles")
97                                                             }}</router-link
98                                                         >
99                                                     </li>
100                                                 </ul>
101                                             </li>
102                                         </ul>
103                                     </li>
104                                 </ul>
105                             </div>
106                         </div>
107                     </aside>
108                 </div>
109             </div>
110         </div>
111     </div>
112     <div v-else>
113         {{
114             $__(
115                 "The E-Resource management module is disabled, turn on 'ERMModule' to use it"
116             )
117         }}
118     </div>
119 </template>
120
121 <script>
122 import { inject } from "vue"
123 import Breadcrumb from "./Breadcrumb.vue"
124 import Dialog from "./Dialog.vue"
125 import { fetchVendors } from "../../fetch"
126 import "vue-select/dist/vue-select.css"
127
128 export default {
129     setup() {
130         const AVStore = inject("AVStore")
131         AVStore.av_agreement_statuses = agreement_statuses
132         AVStore.av_agreement_closure_reasons = agreement_closure_reasons
133         AVStore.av_agreement_renewal_priorities = agreement_renewal_priorities
134         AVStore.av_user_roles = user_roles
135         AVStore.av_license_types = license_types
136         AVStore.av_license_statuses = license_statuses
137         AVStore.av_agreement_license_statuses = agreement_license_statuses
138         AVStore.av_agreement_license_location = agreement_license_location
139         AVStore.av_package_types = package_types
140         AVStore.av_package_content_types = package_content_types
141         AVStore.av_title_publication_types = title_publication_types
142
143         const vendorStore = inject("vendorStore")
144
145         return {
146             vendorStore,
147             erm_providers,
148             ERMModule,
149         }
150     },
151     data() {
152         return {
153             component: "agreement",
154         }
155     },
156     beforeCreate() {
157         fetchVendors().then(vendors => (this.vendorStore.vendors = vendors))
158     },
159     components: {
160         Breadcrumb,
161         Dialog,
162     },
163 }
164 </script>
165
166 <style>
167 #navmenulist a.router-link-active {
168     font-weight: 700;
169 }
170 #menu ul ul,
171 #navmenulist ul ul {
172     padding-left: 2em;
173     font-size: 100%;
174 }
175
176 form .v-select {
177     display: inline-block;
178     background-color: white;
179     width: 30%;
180 }
181
182 .v-select,
183 input:not([type="submit"]):not([type="search"]):not([type="button"]):not([type="checkbox"]),
184 textarea {
185     border-color: rgba(60, 60, 60, 0.26);
186     border-width: 1px;
187     border-radius: 4px;
188     min-width: 30%;
189 }
190 .flatpickr-input {
191     width: 30%;
192 }
193
194 #navmenulist ul li a.disabled {
195     color: #666;
196     pointer-events: none;
197     font-weight: 700;
198 }
199 #navmenulist ul li a.disabled.router-link-active {
200     color: #000;
201 }
202 </style>