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