update to v1.1.0 #3
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "1.0.0",
|
"version": "1.1.0",
|
||||||
"name": "@flaschengeist/schedule",
|
"name": "@flaschengeist/schedule",
|
||||||
"author": "Ferdinand Thiessen <rpm@fthiessen.de>",
|
"author": "Ferdinand Thiessen <rpm@fthiessen.de>",
|
||||||
"homepage": "https://flaschengeist.dev/Flaschengeist",
|
"homepage": "https://flaschengeist.dev/Flaschengeist",
|
||||||
|
|
|
@ -101,6 +101,7 @@ import { PERMISSIONS } from '../../../permissions';
|
||||||
import TransferInviteDialog from './TransferInviteDialog.vue';
|
import TransferInviteDialog from './TransferInviteDialog.vue';
|
||||||
import ServiceUserChip from './ServiceUserChip.vue';
|
import ServiceUserChip from './ServiceUserChip.vue';
|
||||||
import { UserAvatar } from '@flaschengeist/api/components';
|
import { UserAvatar } from '@flaschengeist/api/components';
|
||||||
|
import { DisplayNameMode } from '@flaschengeist/users';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'JobSlot',
|
name: 'JobSlot',
|
||||||
|
@ -123,11 +124,34 @@ export default defineComponent({
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
|
|
||||||
// Make sure users are loaded if we can assign them
|
// Make sure users are loaded if we can assign them
|
||||||
onBeforeMount(() => void userStore.getUsers());
|
onBeforeMount(() => {
|
||||||
|
void userStore.getUsers();
|
||||||
|
void userStore.getDisplayNameModeSetting(true);
|
||||||
|
});
|
||||||
|
|
||||||
/* Stuff used for general display */
|
/* Stuff used for general display */
|
||||||
// Get displayname of user
|
// Get displayname of user
|
||||||
function userDisplay(id: string) {
|
function userDisplay(id: string) {
|
||||||
|
switch (userStore.userSettings.display_name) {
|
||||||
|
case DisplayNameMode.FIRSTNAME:
|
||||||
|
return userStore.findUser(id)?.firstname || id;
|
||||||
|
case DisplayNameMode.LASTNAME:
|
||||||
|
return userStore.findUser(id)?.lastname || id;
|
||||||
|
case DisplayNameMode.DISPLAYNAME:
|
||||||
|
return userStore.findUser(id)?.display_name || id;
|
||||||
|
case DisplayNameMode.FIRSTNAME_LASTNAME:
|
||||||
|
return (
|
||||||
|
`${<string>userStore.findUser(id)?.firstname} ${<string>(
|
||||||
|
userStore.findUser(id)?.lastname
|
||||||
|
)}` || id
|
||||||
|
);
|
||||||
|
case DisplayNameMode.LASTNAME_FIRSTNAME:
|
||||||
|
return (
|
||||||
|
`${<string>userStore.findUser(id)?.lastname}, ${<string>(
|
||||||
|
userStore.findUser(id)?.firstname
|
||||||
|
)}` || id
|
||||||
|
);
|
||||||
|
}
|
||||||
return userStore.findUser(id)?.display_name || id;
|
return userStore.findUser(id)?.display_name || id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,6 @@ export default defineComponent({
|
||||||
};
|
};
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
|
||||||
if (route.query.sent === 'true') {
|
if (route.query.sent === 'true') {
|
||||||
showSent.value = true;
|
showSent.value = true;
|
||||||
}
|
}
|
||||||
|
@ -178,8 +177,6 @@ export default defineComponent({
|
||||||
await router.replace({ query: { sent: showSent.value ? 'true' : 'false' } });
|
await router.replace({ query: { sent: showSent.value ? 'true' : 'false' } });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function getType(row: RowData) {
|
function getType(row: RowData) {
|
||||||
var idx = row.transferee === undefined ? 0 : 1;
|
var idx = row.transferee === undefined ? 0 : 1;
|
||||||
if (row.inviter.userid === mainStore.currentUser.userid) idx += 2;
|
if (row.inviter.userid === mainStore.currentUser.userid) idx += 2;
|
||||||
|
|
Loading…
Reference in New Issue