feat(help): basic setup for chatbot help
This commit is contained in:
parent
e86dff3026
commit
7a20aa5d4e
|
|
@ -1,50 +1,48 @@
|
||||||
<script
|
<script setup lang="ts">
|
||||||
setup
|
//default images
|
||||||
lang="ts"
|
// import default_dashboard from 'src/assets/help-ss/default-dashboard.png';
|
||||||
>
|
import default_personal_profile from 'src/assets/help-ss/default-personnal_profile.png';
|
||||||
//default images
|
import default_timesheet from 'src/assets/help-ss/default-timesheet.png';
|
||||||
// import default_dashboard from 'src/assets/help-ss/default-dashboard.png';
|
import default_employee_list from 'src/assets/help-ss/default-employee-list.png';
|
||||||
import default_personal_profile from 'src/assets/help-ss/default-personnal_profile.png';
|
import default_employee_management from 'src/assets/help-ss/default-employee-management.png';
|
||||||
import default_timesheet from 'src/assets/help-ss/default-timesheet.png';
|
import default_validation_page from 'src/assets/help-ss/default-validation-page.png';
|
||||||
import default_employee_list from 'src/assets/help-ss/default-employee-list.png';
|
|
||||||
import default_employee_management from 'src/assets/help-ss/default-employee-management.png';
|
|
||||||
import default_validation_page from 'src/assets/help-ss/default-validation-page.png';
|
|
||||||
|
|
||||||
const default_images: Record<UserModuleAccess, string> = {
|
const default_images: Record<UserModuleAccess, string> = {
|
||||||
dashboard: '',
|
dashboard: '',
|
||||||
personal_profile: default_personal_profile,
|
personal_profile: default_personal_profile,
|
||||||
timesheets: default_timesheet,
|
timesheets: default_timesheet,
|
||||||
employee_list: default_employee_list,
|
employee_list: default_employee_list,
|
||||||
employee_management: default_employee_management,
|
employee_management: default_employee_management,
|
||||||
timesheets_approval: default_validation_page,
|
timesheets_approval: default_validation_page,
|
||||||
chatbot: '',
|
chatbot: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
import type { HelpModuleOptions } from 'src/modules/help/models/help-module.model';
|
import type { HelpModuleOptions } from 'src/modules/help/models/help-module.model';
|
||||||
import type { UserModuleAccess } from 'src/modules/shared/models/user.models';
|
import type { UserModuleAccess } from 'src/modules/shared/models/user.models';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
help_module: UserModuleAccess;
|
help_module: UserModuleAccess;
|
||||||
options: HelpModuleOptions[];
|
options: HelpModuleOptions[];
|
||||||
moduleIndex: number;
|
moduleIndex: number;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const help_module = props.help_module;
|
const help_module = props.help_module;
|
||||||
const current_path = ref<string>(default_images[help_module]);
|
const current_path = ref<string>(default_images[help_module]);
|
||||||
|
const EXCLUDED_MODULES = ['dashboard', 'chatbot']
|
||||||
|
|
||||||
const switchSide = (index: number) => {
|
const switchSide = (index: number) => {
|
||||||
if (index % 2 !== 0) {
|
if (index % 2 !== 0) {
|
||||||
return false
|
return false
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
v-if="help_module !== 'dashboard'"
|
v-if="!EXCLUDED_MODULES.includes(help_module)"
|
||||||
class="column q-my-xs bg-secondary q-py-xl"
|
class="column q-my-xs bg-secondary q-py-xl"
|
||||||
>
|
>
|
||||||
<!-- Card Header -->
|
<!-- Card Header -->
|
||||||
|
|
@ -101,7 +99,7 @@
|
||||||
size="sm"
|
size="sm"
|
||||||
/>
|
/>
|
||||||
<span class="text-accent col-auto text-weight-bolder">{{ $t(option.label).toUpperCase()
|
<span class="text-accent col-auto text-weight-bolder">{{ $t(option.label).toUpperCase()
|
||||||
}}</span>
|
}}</span>
|
||||||
<q-icon
|
<q-icon
|
||||||
v-if="!switchSide(moduleIndex)"
|
v-if="!switchSide(moduleIndex)"
|
||||||
:name="option.icon"
|
:name="option.icon"
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,6 @@ export type HelpModuleOptions = {
|
||||||
export type Options = Record<UserModuleAccess, HelpModuleOptions[]>;
|
export type Options = Record<UserModuleAccess, HelpModuleOptions[]>;
|
||||||
export type PartialOptions = Partial<Record<UserModuleAccess, HelpModuleOptions[]>>;
|
export type PartialOptions = Partial<Record<UserModuleAccess, HelpModuleOptions[]>>;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Shared images and descriptions
|
//Shared images and descriptions
|
||||||
import calendar from 'src/assets/help-ss/calendar.png';
|
import calendar from 'src/assets/help-ss/calendar.png';
|
||||||
import employee_list_display from 'src/assets/help-ss/employee-list-grid.png';
|
import employee_list_display from 'src/assets/help-ss/employee-list-grid.png';
|
||||||
|
|
@ -134,6 +132,15 @@ export const timesheets_approval_options: HelpModuleOptions[] = [
|
||||||
{ label: 'help.tutorial.shared.calendar', path: calendar, description: calendar_nav_desc, icon: 'calendar_month' },
|
{ label: 'help.tutorial.shared.calendar', path: calendar, description: calendar_nav_desc, icon: 'calendar_month' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
// Chatbot images and descriptions
|
||||||
|
import chatbot_access from 'src/assets/help-ss/access-management.png';
|
||||||
|
const chatbot_access_desc = "descriptions.chatbot.access";
|
||||||
|
|
||||||
|
export const chatbot_options: HelpModuleOptions[] = [
|
||||||
|
{ label: 'help.tutorial.chatbot.access', path: chatbot_access, description: chatbot_access_desc, icon: "access"}
|
||||||
|
];
|
||||||
|
|
||||||
export const help_module_details: Options = {
|
export const help_module_details: Options = {
|
||||||
dashboard: [],
|
dashboard: [],
|
||||||
personal_profile: profile_options,
|
personal_profile: profile_options,
|
||||||
|
|
@ -143,8 +150,3 @@ export const help_module_details: Options = {
|
||||||
timesheets_approval: timesheets_approval_options,
|
timesheets_approval: timesheets_approval_options,
|
||||||
chatbot: [],
|
chatbot: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user