@afeefa/vue-app 0.0.83 → 0.0.85
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/api-resources/ApiAction.js +4 -0
- package/src/api-resources/ApiActions2.js +2 -1
- package/src/components/ATextField.vue +1 -1
- package/src/components/form/EditModal.vue +14 -6
- package/src/components/form/FormFieldMixin.js +2 -1
- package/src-admin/components/detail/DetailProperty.vue +5 -0
- package/src-admin/components/form/EditFormButtons.vue +10 -3
- package/src-admin/components/list/ListView.vue +9 -0
- package/src-admin/config/vuetify.js +2 -0
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.85
|
package/package.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { BulkAction } from './ApiAction'
|
1
|
+
import { BulkAction, SequentialBulkAction } from './ApiAction'
|
2
2
|
import { DeleteAction } from './DeleteAction'
|
3
3
|
import { GetAction } from './GetAction'
|
4
4
|
import { ListAction } from './ListAction'
|
@@ -6,6 +6,7 @@ import { SaveAction } from './SaveAction'
|
|
6
6
|
|
7
7
|
export {
|
8
8
|
BulkAction,
|
9
|
+
SequentialBulkAction,
|
9
10
|
ListAction,
|
10
11
|
GetAction,
|
11
12
|
SaveAction,
|
@@ -19,7 +19,7 @@ import { debounce } from '@a-vue/utils/debounce'
|
|
19
19
|
import { ComponentWidthMixin } from './mixins/ComponentWidthMixin'
|
20
20
|
|
21
21
|
@Component({
|
22
|
-
props: ['
|
22
|
+
props: ['debounce', 'validator', {focus: false, password: false, number: false}]
|
23
23
|
})
|
24
24
|
export default class ATextField extends Mixins(ComponentWidthMixin) {
|
25
25
|
$hasOptions = ['counter']
|
@@ -9,6 +9,8 @@
|
|
9
9
|
<slot name="activator" />
|
10
10
|
</template>
|
11
11
|
|
12
|
+
<slot name="before-form" />
|
13
|
+
|
12
14
|
<edit-form
|
13
15
|
v-if="show_"
|
14
16
|
ref="form"
|
@@ -23,8 +25,10 @@
|
|
23
25
|
:valid="valid"
|
24
26
|
/>
|
25
27
|
|
28
|
+
<slot name="after-form-fields" />
|
29
|
+
|
26
30
|
<a-row
|
27
|
-
class="mt-8 mb-1 pb-1 gap-
|
31
|
+
class="mt-8 mb-1 pb-1 gap-2"
|
28
32
|
right
|
29
33
|
>
|
30
34
|
<v-btn
|
@@ -38,6 +42,7 @@
|
|
38
42
|
:changed="changed"
|
39
43
|
:valid="valid"
|
40
44
|
small
|
45
|
+
angular
|
41
46
|
:has="{reset: !!modelToEdit.id}"
|
42
47
|
@save="$emit('save', modelToEdit, ignoreChangesOnClose)"
|
43
48
|
@reset="$refs.form.reset()"
|
@@ -45,6 +50,8 @@
|
|
45
50
|
</a-row>
|
46
51
|
</template>
|
47
52
|
</edit-form>
|
53
|
+
|
54
|
+
<slot name="after-form" />
|
48
55
|
</a-modal>
|
49
56
|
</template>
|
50
57
|
|
@@ -112,12 +119,13 @@ export default class EditModal extends Vue {
|
|
112
119
|
return true
|
113
120
|
}
|
114
121
|
|
115
|
-
async close () {
|
116
|
-
|
117
|
-
|
118
|
-
|
122
|
+
async close (force = false) {
|
123
|
+
if (!force) {
|
124
|
+
const result = await this.beforeClose()
|
125
|
+
if (!result) {
|
126
|
+
return
|
127
|
+
}
|
119
128
|
}
|
120
|
-
|
121
129
|
this.show_ = false
|
122
130
|
}
|
123
131
|
|
@@ -2,7 +2,7 @@ import { Component, Vue } from '@a-vue'
|
|
2
2
|
import { ListAction } from '@a-vue/api-resources/ApiActions'
|
3
3
|
|
4
4
|
@Component({
|
5
|
-
props: ['name', 'label', 'additionalRules']
|
5
|
+
props: ['name', 'label', 'additionalRules', 'optionRequestParams']
|
6
6
|
})
|
7
7
|
export class FormFieldMixin extends Vue {
|
8
8
|
get model () {
|
@@ -55,6 +55,7 @@ export class FormFieldMixin extends Vue {
|
|
55
55
|
if (field.hasOptionsRequest()) {
|
56
56
|
const request = field
|
57
57
|
.getOptionsRequest()
|
58
|
+
.addParams(this.optionRequestParams || {})
|
58
59
|
.addFilters(filters)
|
59
60
|
|
60
61
|
const {models} = await new ListAction()
|
@@ -7,16 +7,23 @@
|
|
7
7
|
<template #activator="{ on }">
|
8
8
|
<div v-on="disabled ? on : null">
|
9
9
|
<v-btn
|
10
|
-
fab
|
10
|
+
:fab="!angular"
|
11
11
|
small
|
12
12
|
:disabled="disabled"
|
13
13
|
color="green white--text"
|
14
14
|
title="Speichern"
|
15
15
|
@click="$emit('save')"
|
16
16
|
>
|
17
|
-
<v-icon
|
17
|
+
<v-icon
|
18
|
+
:left="angular"
|
19
|
+
:class="{['mr-1']: angular}"
|
20
|
+
>
|
18
21
|
$checkIcon
|
19
22
|
</v-icon>
|
23
|
+
|
24
|
+
<template v-if="angular">
|
25
|
+
Speichern
|
26
|
+
</template>
|
20
27
|
</v-btn>
|
21
28
|
</div>
|
22
29
|
</template>
|
@@ -56,7 +63,7 @@ import { mdiRotateLeft} from '@mdi/js'
|
|
56
63
|
props: [
|
57
64
|
'changed',
|
58
65
|
'valid',
|
59
|
-
{small: false}
|
66
|
+
{angular: false, small: false}
|
60
67
|
]
|
61
68
|
})
|
62
69
|
export default class EditFormButtons extends Vue {
|
@@ -129,6 +129,7 @@ export default class ListView extends Mixins(ListViewMixin) {
|
|
129
129
|
} // else { a: true, b: true, c: true }
|
130
130
|
|
131
131
|
classes = {
|
132
|
+
clickable: this.hasClickListener,
|
132
133
|
selectable: this.hasFlyingContext,
|
133
134
|
...classes
|
134
135
|
}
|
@@ -144,6 +145,10 @@ export default class ListView extends Mixins(ListViewMixin) {
|
|
144
145
|
return !!this.$listeners.flyingContext
|
145
146
|
}
|
146
147
|
|
148
|
+
get hasClickListener () {
|
149
|
+
return !!this.getRowListeners().click
|
150
|
+
}
|
151
|
+
|
147
152
|
emitFlyingContext (model) {
|
148
153
|
if (window.getSelection().toString()) { // do not open if text selected
|
149
154
|
// console.log(window.getSelection().toString())
|
@@ -171,4 +176,8 @@ export default class ListView extends Mixins(ListViewMixin) {
|
|
171
176
|
.a-table-row > :last-child {
|
172
177
|
width: 100%;
|
173
178
|
}
|
179
|
+
|
180
|
+
.a-table-row.clickable {
|
181
|
+
cursor: pointer;
|
182
|
+
}
|
174
183
|
</style>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import {
|
2
2
|
mdiAlarmLightOutline,
|
3
3
|
mdiArrowLeft,
|
4
|
+
mdiAlert,
|
4
5
|
mdiCalendar,
|
5
6
|
mdiCheck,
|
6
7
|
mdiCheckBold,
|
@@ -33,6 +34,7 @@ export default new Vuetify({
|
|
33
34
|
chevronRightIcon: mdiChevronRight,
|
34
35
|
thumbsUpIcon: mdiThumbUpOutline,
|
35
36
|
alarmIcon: mdiAlarmLightOutline,
|
37
|
+
alertIcon: mdiAlert,
|
36
38
|
closeIcon: mdiClose,
|
37
39
|
closeBoldIcon: mdiCloseThick,
|
38
40
|
dotsVerticalIcon: mdiDotsVertical,
|