@agendize/vue-settings
Version:
Vue agendize's settings component
41 lines (40 loc) • 1.72 kB
TypeScript
import { AccountEntity, CalendarApi, SchedulingRightsEntity } from "@agendize/js-calendar-api";
import { Locale } from "@agendize/az-i18n";
import { Ref } from "vue";
import { Router } from "vue-router";
import { PageWithTabsAndPanelOptions, TabsOptions } from "@agendize/design-system";
import FetchAllRightsUseCase from "../fetchAllRightsUseCase";
export declare enum COMPANIES_TABS {
COMPANIES = "companies",
PLANNINGS = "plannings",
SCHEDULING_RIGHTS = "schedulingRights"
}
export declare function SchedulingRightsViewModel(api: CalendarApi, locale: Locale, fetchAllRightsUseCase: FetchAllRightsUseCase, organisation: AccountEntity, router: Router): SchedulingRightsViewModelType;
interface SchedulingRightsViewModelType {
pageOptions: Ref<PageWithTabsAndPanelOptions>;
currentTab: Ref<string>;
changeTab: (option: TabsOptions) => void;
rights: Ref<SchedulingRightsEntity[]>;
rightsTableInfo: {
columns: {
label: string;
field: string;
width: string;
sortable: boolean;
headerStyles?: string;
columnStyles?: string;
columnClasses?: string;
sortCompareFn?: (a: any, b: any) => number;
}[];
sortable: {
order: string;
sort: 'desc' | 'asc';
};
};
filterRights: (rights: SchedulingRightsEntity[], search: string) => SchedulingRightsEntity[];
displayRightDetails: (right: SchedulingRightsEntity) => void;
fetchRights: (page: number) => Promise<SchedulingRightsEntity[]>;
getListOfAccess: (right: SchedulingRightsEntity) => string[];
loading: Ref<boolean>;
}
export {};