Compare commits
No commits in common. "6737bd5b456d1db51dc8b3b52e694561ba4ec8e5" and "923f5ec27cd84fb22212afee34c57234484783fb" have entirely different histories.
6737bd5b45
...
923f5ec27c
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "1.1.0",
|
"version": "1.0.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,7 +101,6 @@ 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',
|
||||||
|
@ -124,34 +123,11 @@ 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(() => {
|
onBeforeMount(() => void userStore.getUsers());
|
||||||
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,6 +159,7 @@ export default defineComponent({
|
||||||
};
|
};
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
|
||||||
if (route.query.sent === 'true') {
|
if (route.query.sent === 'true') {
|
||||||
showSent.value = true;
|
showSent.value = true;
|
||||||
}
|
}
|
||||||
|
@ -177,6 +178,8 @@ 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