Skip to content

Commit f467b88

Browse files
committed
Update version to v1.10.0 and add internal comment feature; rename updatedAt to registeredAt in UserActivationItem and ActivationPage
1 parent 931c01c commit f467b88

File tree

4 files changed

+73
-7
lines changed

4 files changed

+73
-7
lines changed

src/boot/changelog.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { boot } from "quasar/wrappers";
22

3-
const version = "v1.9.5";
3+
const version = "v1.10.0";
44
const changelog = {
5+
"v1.10.0": [
6+
"Das LT kann interne Kommentare zu MA hinterlassen (bspw. zur Verfügbarkeit)",
7+
"Bei der Freischaltung von MA steht jetzt immer das korrekte Registrierungsdatum",
8+
],
59
"v1.9.5": [
610
"Weitere Dokumente für MA hinzugefügt",
711
],

src/components/UserActivationItem.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export default defineComponent({
153153
type: String,
154154
required: true
155155
},
156-
updatedAt: {
156+
registeredAt: {
157157
type: String,
158158
required: true
159159
},
@@ -166,7 +166,7 @@ export default defineComponent({
166166
setup(props) {
167167
const avatar = ref('')
168168
const assigneeAvatar = ref('')
169-
const date = new moment(props.updatedAt).format('DD.MM.YYYY')
169+
const date = new moment(props.registeredAt).format('DD.MM.YYYY')
170170
const imageDialog = ref(false)
171171
const mail = ref('')
172172
const name = ref('')

src/pages/ActivationPage.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ export default defineComponent({
3131
const [index, item] = entry
3232
userList.value.push({
3333
uuid: item.uuid,
34-
updatedAt: item.updatedAt,
34+
registeredAt: item.registeredAt,
3535
AssigneeModel: item.AssigneeModel
3636
})
3737
}))
3838
userList.value.sort((a, b) => {
39-
const as = a.updatedAt;
40-
const bs = b.updatedAt;
39+
const as = a.registeredAt;
40+
const bs = b.registeredAt;
4141
if (as > bs) return 1;
4242
if (as < bs) return -1;
4343
return 0;

src/pages/ProfilePage.vue

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,24 @@
7878
v-bind="item"
7979
/>
8080
</q-list>
81+
<q-space class="q-mt-md" />
82+
<q-expansion-item
83+
expand-separator
84+
label="Kommentar (intern)"
85+
class="text-h6 q-mb-md"
86+
:default-opened=false
87+
>
88+
<q-editor
89+
v-model="comment"
90+
min-height="10rem"
91+
:toolbar="toolbarButtons"
92+
placeholder="Kein Kommentar hinterlegt"
93+
class="q-mx-md"
94+
/>
95+
<div class="q-pa-md">
96+
<q-btn label="Kommentar speichern" @click="saveComment" color="primary"/>
97+
</div>
98+
</q-expansion-item>
8199
</template>
82100

83101
<script>
@@ -106,7 +124,25 @@ export default {
106124
const isLT = proxy.$keycloak.tokenParsed.groups.includes('Leitungsteam')
107125
const user = ref({})
108126
const name = ref({})
109-
127+
const comment = ref("")
128+
const toolbarButtons = ref([
129+
[
130+
'bold',
131+
'italic',
132+
'underline',
133+
'strike'
134+
],
135+
[
136+
'undo',
137+
'redo'
138+
],
139+
[
140+
'unordered',
141+
'ordered',
142+
'outdent',
143+
'indent'
144+
],
145+
])
110146
111147
api.get('/user/' + uuid)
112148
.then(function(response) {
@@ -166,6 +202,11 @@ export default {
166202
avatar.value = URL.createObjectURL(response.data, 'binary').toString('base64')
167203
}).catch(function(e){})
168204
205+
api.get('/userComment/' + uuid).then(function(response) {
206+
comment.value = response.data.comment || ''
207+
}).catch(function(e){})
208+
209+
169210
function addDocument(docType) {
170211
if (docType !== 'criminalRecord' && docType !== 'selfCommitment' && docType !== 'privacyCommitment' && docType !== 'parentalConsent') {
171212
return
@@ -226,6 +267,24 @@ export default {
226267
}).catch((e) => {})
227268
}
228269
270+
function saveComment() {
271+
api.post('/userComment/' + uuid, {
272+
comment: comment.value
273+
}).then(function() {
274+
$q.notify({
275+
message: 'Kommentar gespeichert',
276+
color: 'positive',
277+
icon: 'fa-solid fa-check'
278+
})
279+
}).catch(function(e){
280+
$q.notify({
281+
message: 'Fehler beim Speichern des Kommentars',
282+
color: 'negative',
283+
icon: 'fa-solid fa-times'
284+
})
285+
})
286+
}
287+
229288
return {
230289
avatar,
231290
dialog,
@@ -235,6 +294,9 @@ export default {
235294
name,
236295
uuid,
237296
isLT,
297+
comment,
298+
toolbarButtons,
299+
saveComment,
238300
addDocument,
239301
getCriminalRecord
240302
}

0 commit comments

Comments
 (0)