@afeefa/vue-app 0.0.82 → 0.0.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 0.0.82
1
+ 0.0.84
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@afeefa/vue-app",
3
- "version": "0.0.82",
3
+ "version": "0.0.84",
4
4
  "description": "",
5
5
  "author": "Afeefa Kollektiv <kollektiv@afeefa.de>",
6
6
  "license": "MIT",
@@ -51,6 +51,8 @@ export default class ADatePicker extends Mixins(ComponentWidthMixin) {
51
51
  created () {
52
52
  if (this.value) {
53
53
  this.value_ = this.value
54
+ } else {
55
+ this.value_Changed() // force validation if date is null
54
56
  }
55
57
  this.$emit('input', this.value_)
56
58
  }
@@ -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: ['focus', 'debounce', 'validator', {password: false, number: false}]
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-4"
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
- const result = await this.beforeClose()
117
- if (!result) {
118
- return
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
 
@@ -15,6 +15,11 @@
15
15
  </v-avatar>
16
16
 
17
17
  <label :class="['label', {'label--withIcon': !!_icon}]">{{ label }}</label>
18
+ <div class="pl-2">
19
+ <slot
20
+ name="actionButton"
21
+ />
22
+ </div>
18
23
  </div>
19
24
 
20
25
  <div :class="['content', {'content--withIcon': !!_icon}]">
@@ -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 {
@@ -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,