Mercurial > gemma
annotate client/src/components/admin/importschedule/Importschedule.vue @ 1455:33dda08d67be
unified layout for adminsection
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 03 Dec 2018 12:02:17 +0100 |
parents | bb47531bdd22 |
children | 9b81ac91a43e |
rev | line source |
---|---|
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
1 <template> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
2 <div class="d-flex flex-row"> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
3 <div :class="spacerStyle"></div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
4 <div class="mt-3"> |
1455
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1449
diff
changeset
|
5 <div class="card schedulecard shadow-xs"> |
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1449
diff
changeset
|
6 <h6 class="mb-0 py-2 px-3 border-bottom d-flex text-info align-items-center"> |
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1449
diff
changeset
|
7 <font-awesome-icon icon="clock" class="mr-2"></font-awesome-icon> |
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1449
diff
changeset
|
8 <translate class="headline">Importschedule</translate> |
33dda08d67be
unified layout for adminsection
Thomas Junk <thomas.junk@intevation.de>
parents:
1449
diff
changeset
|
9 </h6> |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
10 <div class="card-body schedulecardbody"> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
11 <div class="card-body schedulecardbody"> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
12 <div class="searchandfilter d-flex flex-row"> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
13 <div class="searchgroup input-group"> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
14 <div class="input-group-prepend"> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
15 <span class="input-group-text" id="search"> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
16 <font-awesome-icon icon="search"></font-awesome-icon> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
17 </span> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
18 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
19 <input |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
20 v-model="searchQuery" |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
21 type="text" |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
22 class="form-control" |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
23 placeholder |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
24 aria-label="Search" |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
25 aria-describedby="search" |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
26 > |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
27 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
28 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
29 <table v-if="schedules.length" class="table"> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
30 <thead> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
31 <tr> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
32 <th> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
33 <translate>Import</translate> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
34 </th> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
35 <th> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
36 <translate>Type</translate> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
37 </th> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
38 <th> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
39 <translate>Author</translate> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
40 </th> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
41 <th> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
42 <translate>Schedule</translate> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
43 </th> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
44 <th> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
45 <translate>Email</translate> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
46 </th> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
47 <th> </th> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
48 <th> </th> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
49 </tr> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
50 </thead> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
51 <tbody> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
52 <tr v-for="(schedule, index) in schedules" :key="index"> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
53 <td></td> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
54 <td></td> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
55 <td></td> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
56 <td></td> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
57 <td></td> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
58 <td> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
59 <font-awesome-icon icon="pencil-alt" fixed-width></font-awesome-icon> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
60 </td> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
61 <td> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
62 <font-awesome-icon @click="deleteSchedule" icon="trash" fixed-width></font-awesome-icon> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
63 </td> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
64 </tr> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
65 </tbody> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
66 </table> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
67 <div v-else class="mt-4 small text-center py-3"> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
68 <translate>No schedules</translate> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
69 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
70 <button @click="newImport" class="btn btn-info position-absolute newbutton"> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
71 <translate>New Import</translate> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
72 </button> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
73 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
74 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
75 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
76 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
77 <Importscheduledetail></Importscheduledetail> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
78 </div> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
79 </template> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
80 |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
81 <script> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
82 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
83 * without warranty, see README.md and license for details. |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
84 * |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
85 * SPDX-License-Identifier: AGPL-3.0-or-later |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
86 * License-Filename: LICENSES/AGPL-3.0.txt |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
87 * |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
88 * Copyright (C) 2018 by via donau |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
89 * – Österreichische Wasserstraßen-Gesellschaft mbH |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
90 * Software engineering by Intevation GmbH |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
91 * |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
92 * Author(s): |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
93 * Thomas Junk <thomas.junk@intevation.de> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
94 */ |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
95 |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
96 import { mapState } from "vuex"; |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
97 import Importscheduledetail from "./Importscheduledetail"; |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
98 //import { SCHEDULES } from "../../store/imports.js"; |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
99 |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
100 export default { |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
101 name: "importschedule", |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
102 components: { |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
103 Importscheduledetail |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
104 }, |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
105 data() { |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
106 return { |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
107 searchQuery: "" |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
108 }; |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
109 }, |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
110 methods: { |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
111 newImport() { |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
112 this.$store.commit("imports/setImportScheduleDetailVisible"); |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
113 }, |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
114 deleteSchedule(index) { |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
115 this.$store.commit("imports/deleteSchedule", index); |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
116 } |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
117 }, |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
118 computed: { |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
119 ...mapState("application", ["showSidebar"]), |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
120 ...mapState("imports", ["schedules"]), |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
121 spacerStyle() { |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
122 return [ |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
123 "spacer ml-3", |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
124 { |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
125 "spacer-expanded": this.showSidebar, |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
126 "spacer-collapsed": !this.showSidebar |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
127 } |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
128 ]; |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
129 } |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
130 } |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
131 }; |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
132 </script> |
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
133 |
1449 | 134 <style lang="scss" scoped> |
135 .spacer { | |
136 height: 100vh; | |
137 } | |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
138 |
1449 | 139 .spacer-collapsed { |
140 min-width: $icon-width + $offset; | |
141 transition: $transition-fast; | |
142 } | |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
143 |
1449 | 144 .spacer-expanded { |
145 min-width: $sidebar-width + $offset; | |
146 } | |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
147 |
1449 | 148 .schedulecard { |
149 width: 40vw; | |
150 min-height: 20rem; | |
151 } | |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
152 |
1449 | 153 .schedulecard-body { |
154 width: 100%; | |
155 margin-left: auto; | |
156 margin-right: auto; | |
157 } | |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
158 |
1449 | 159 .newbutton { |
160 position: absolute; | |
161 bottom: $offset; | |
162 right: $offset; | |
163 } | |
1430
4e24c2db0bf5
automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff
changeset
|
164 </style> |