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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
6 <h6
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
7 class="mb-0 py-2 px-3 border-bottom d-flex text-info align-items-center"
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
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
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
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
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
34 <th><translate>Import</translate></th>
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
35 <th><translate>Type</translate></th>
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
36 <th><translate>Author</translate></th>
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
37 <th><translate>Schedule</translate></th>
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
38 <th><translate>Email</translate></th>
1430
4e24c2db0bf5 automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
39 <th>&nbsp;</th>
4e24c2db0bf5 automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
40 <th>&nbsp;</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
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
51 <font-awesome-icon
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
52 icon="pencil-alt"
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
53 fixed-width
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
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
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
57 <font-awesome-icon
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
58 @click="deleteSchedule"
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
59 icon="trash"
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
60 fixed-width
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
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
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
69 <button
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
70 @click="newImport"
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
71 class="btn btn-info position-absolute newbutton"
9b81ac91a43e fix: linting
Thomas Junk <thomas.junk@intevation.de>
parents: 1455
diff changeset
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
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
138 <style lang="scss" scoped>
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
139 .schedulecard {
1529
Thomas Junk <thomas.junk@intevation.de>
parents: 1480
diff changeset
140 margin-right: $offset;
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
141 min-height: 20rem;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
142 }
1430
4e24c2db0bf5 automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
143
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
144 .schedulecard-body {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
145 width: 100%;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
146 margin-left: auto;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
147 margin-right: auto;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
148 }
1430
4e24c2db0bf5 automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
149
1449
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
150 .newbutton {
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
151 position: absolute;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
152 bottom: $offset;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
153 right: $offset;
bb47531bdd22 sass to scss
Thomas Junk <thomas.junk@intevation.de>
parents: 1430
diff changeset
154 }
1430
4e24c2db0bf5 automatic imports: added missing components
Thomas Junk <thomas.junk@intevation.de>
parents:
diff changeset
155 </style>