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