@afeefa/vue-app 0.0.147 → 0.0.149
Sign up to get free protection for your applications and to get access to all the features.
- package/.afeefa/package/release/version.txt +1 -1
- package/package.json +1 -1
- package/src/components/AInfo.vue +26 -0
- package/src/components/form/EditForm.vue +1 -1
- package/src/components/form/EditModal.vue +2 -2
- package/src-admin/components/list/ListView.vue +12 -10
- package/src-admin/components/pages/EditPage.vue +1 -4
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.149
|
package/package.json
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
<template>
|
2
|
+
<v-alert
|
3
|
+
v-bind="$attrs"
|
4
|
+
:style="{display: inline ? 'inline-block' : 'block'}"
|
5
|
+
dense
|
6
|
+
border="left"
|
7
|
+
colored-border
|
8
|
+
elevation="3"
|
9
|
+
v-on="$listeners"
|
10
|
+
>
|
11
|
+
<slot />
|
12
|
+
</v-alert>
|
13
|
+
</template>
|
14
|
+
|
15
|
+
<script>
|
16
|
+
import { Component, Vue } from '@a-vue'
|
17
|
+
|
18
|
+
@Component({
|
19
|
+
props: [{inline: true}]
|
20
|
+
})
|
21
|
+
export default class AInfo extends Vue {
|
22
|
+
}
|
23
|
+
</script>
|
24
|
+
|
25
|
+
<style lang="scss" scoped>
|
26
|
+
</style>
|
@@ -74,7 +74,7 @@ export default class EditForm extends Vue {
|
|
74
74
|
* Using the created() method would result in already having set
|
75
75
|
* the default date, hence not detecting a valid "change" anymore.
|
76
76
|
*
|
77
|
-
* comment 14.12. -> this should not be necessary if components do not alter models
|
77
|
+
* comment 14.12.22 -> this should not be necessary if components do not alter models
|
78
78
|
*/
|
79
79
|
// @Watch('modelToEdit', {immediate: true})
|
80
80
|
// @Watch('modelToEdit')
|
@@ -42,7 +42,7 @@
|
|
42
42
|
:changed="changed"
|
43
43
|
:valid="valid"
|
44
44
|
angular
|
45
|
-
:has="{reset: !!modelToEdit.id}"
|
45
|
+
:has="{reset: reset && !!modelToEdit.id}"
|
46
46
|
@save="$emit('save', modelToEdit, ignoreChangesOnClose, close)"
|
47
47
|
@reset="$refs.form.reset()"
|
48
48
|
/>
|
@@ -60,7 +60,7 @@ import { Component, Vue, Watch } from '@a-vue'
|
|
60
60
|
import { DialogEvent } from '@a-vue/events'
|
61
61
|
|
62
62
|
@Component({
|
63
|
-
props: ['model', 'createModelToEdit', 'show']
|
63
|
+
props: ['model', 'createModelToEdit', 'show', {reset: true}]
|
64
64
|
})
|
65
65
|
export default class EditModal extends Vue {
|
66
66
|
show_ = false
|
@@ -70,16 +70,18 @@
|
|
70
70
|
</template>
|
71
71
|
|
72
72
|
<div v-else-if="!isLoading">
|
73
|
-
<
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
73
|
+
<a-info type="warning">
|
74
|
+
<div v-if="$has.filters">
|
75
|
+
Nichts gefunden. <a
|
76
|
+
href=""
|
77
|
+
@click.prevent="resetFilters()"
|
78
|
+
>Filter zurücksetzen</a>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<div v-else>
|
82
|
+
Nichts gefunden.
|
83
|
+
</div>
|
84
|
+
</a-info>
|
83
85
|
</div>
|
84
86
|
<div
|
85
87
|
v-if="$has.filters"
|
@@ -43,7 +43,6 @@ import { DialogEvent } from '@a-vue/events'
|
|
43
43
|
})
|
44
44
|
export default class EditPage extends Vue {
|
45
45
|
unregisterRouterHook = null
|
46
|
-
ignoreChangesOnRouteChange_ = false
|
47
46
|
|
48
47
|
created () {
|
49
48
|
this.unregisterRouterHook = this.$router.beforeEach(async (to, from, next) => {
|
@@ -70,9 +69,7 @@ export default class EditPage extends Vue {
|
|
70
69
|
* hook to allow to leave a just created (saved) model
|
71
70
|
*/
|
72
71
|
ignoreChangesOnRouteChange () {
|
73
|
-
|
74
|
-
console.info('TODO switch form to forceUnchanged')
|
75
|
-
this.ignoreChangesOnRouteChange_ = true
|
72
|
+
this.$refs.form.forceUnchanged()
|
76
73
|
}
|
77
74
|
}
|
78
75
|
</script>
|