diff --git a/src/components/user/JobRequests.vue b/src/components/user/JobRequests.vue
new file mode 100644
index 0000000..1260bb8
--- /dev/null
+++ b/src/components/user/JobRequests.vue
@@ -0,0 +1,250 @@
+
+
+
+
+ Dienstanfragen
+
+
+
+
+ Gesendete Anfragen
+
+
+
+
+
+
+
+
+
+
+
+ {{ data.item }}
+
+
+
+
+
+
+
+
+ {{ data.item }}
+
+
+
+
+
+
+
+
+ {{ data.item }}
+
+
+
+
+
+
+
+
+ Stornieren
+
+
+
+
+
+
+
+
+
+ Eingehende Anfragen
+
+
+
+
+
+
+
+
+
+
+ {{ data.item }}
+
+
+
+
+
+
+
+
+ {{ data.item }}
+
+
+
+
+
+
+
+
+ {{ data.item }}
+
+
+
+
+
+
+
+
+
+ Ablehnen
+
+ Annehmen
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/user/Jobs.vue b/src/components/user/Jobs.vue
index a50bef1..77e322d 100644
--- a/src/components/user/Jobs.vue
+++ b/src/components/user/Jobs.vue
@@ -73,10 +73,12 @@ export default {
},
created() {
this.createMonth(this.date)
+ this.getAllUsers()
},
methods: {
...mapActions({
- createMonth: 'jobs/createMonth'
+ createMonth: 'jobs/createMonth',
+ getAllUsers: 'jobs/getAllUsers'
}),
changeMonth(value) {
if (value === -1) {
diff --git a/src/components/user/Jobs/Day.vue b/src/components/user/Jobs/Day.vue
index f14941a..7c14f9c 100644
--- a/src/components/user/Jobs/Day.vue
+++ b/src/components/user/Jobs/Day.vue
@@ -17,7 +17,7 @@
+
+
+
+
+ {{ account_add }}
+
+
+
+
+ {{ data.item.firstname }} {{ data.item.lastname }}
+
+
+
+
+
+
+ senden
+
+
@@ -45,7 +74,10 @@
Eintragen
+ >Eintragen
+
@@ -71,7 +103,8 @@ export default {
data() {
return {
account_add: mdiAccountPlus,
- searchInput: null
+ searchInput: null,
+ requestUser: null
}
},
created() {
@@ -83,18 +116,36 @@ export default {
month: this.day.date.getMonth() + 1,
day: this.day.date.getDate()
})
+ this.getTransactJobs({})
+ this.getTransactJobs({
+ year: this.day.date.getFullYear(),
+ month: this.day.date.getMonth() + 1,
+ day: this.day.date.getDate()
+ })
},
methods: {
...mapActions({
+ getTransactJobs: 'requestJobs/getTransactJobs',
getUser: 'jobs/getUser',
setLoading: 'jobs/setDayLoading',
setNotLoading: 'jobs/setDayNotLoading',
addJob: 'jobs/addJob',
- deleteJob: 'jobs/deleteJob'
+ deleteJob: 'jobs/deleteJob',
+ transactJob: 'jobs/transactJob'
}),
test(event) {
console.log('blur', event)
},
+ send() {
+ this.transactJob({
+ user: this.requestUser.username,
+ year: this.day.date.getFullYear(),
+ month: this.day.date.getMonth() + 1,
+ day: this.day.date.getDate()
+ })
+ this.requestUser = null
+ this.searchInput = null
+ },
color: day => {
if (day) {
if (day.date.getDay() === 0 || day.date.getDay() === 1) {
@@ -117,12 +168,38 @@ export default {
computed: {
...mapGetters({
disabled: 'jobs/disabled',
- activeUser: 'user'
+ activeUser: 'user',
+ allUsers: 'jobs/allUsers',
+ transactJobs: 'requestJobs/transactJobs'
}),
userInWorker() {
return this.day.worker.find(a => {
return a.username === this.activeUser.username
})
+ },
+ specifiedUsers() {
+ var users = [...this.allUsers]
+ for (var i in this.day.worker) {
+ var worker = users.find(a => {
+ return a.username === this.day.worker[i].username
+ })
+ var index = users.indexOf(worker)
+ if (worker) users.splice(index, 1)
+ }
+ return users
+ },
+ canDelete() {
+ console.log(this.day.date)
+ console.log(this.transactJobs)
+ var transactJob = this.transactJobs.filter(a => {
+ return a.date - this.day.date === 0
+ })
+ console.log('filter', transactJob)
+ var test = transactJob.find(a => {
+ return a.accepted && a.answerd
+ })
+ console.log('find', test)
+ return test
}
},
watch: {
diff --git a/src/components/user/UserNavigation.vue b/src/components/user/UserNavigation.vue
index ade5ca4..a9aa1b0 100644
--- a/src/components/user/UserNavigation.vue
+++ b/src/components/user/UserNavigation.vue
@@ -2,7 +2,7 @@
- {{account}}
+ {{ account }}
Home
@@ -10,21 +10,29 @@
- {{bank}}
+ {{ bank }}
Finanzübersicht
- {{briefcase}}
+ {{ briefcase }}
Dienstübersicht
+
+
+
+ {{ switchAccount }}
+
+
+ Dienstanfragen
+
- {{account_card_details}}
+ {{ account_card_details }}
Einstellung
@@ -32,15 +40,22 @@