Design: - Switch to material-icons-outlined globally - White header with green Targo logo - Sidebar: outlined icons, active state with green fill + glow - Dashboard: Material icons replace broken PNG images - Shift types: outlined icons (light_mode, dark_mode, warning_amber, etc.) - Modern scrollbar, card borders, font smoothing Timesheet: - Day-by-day mini bars in weekly overview (S1/S2 with D L M M J V S headers) - Clickable bars scroll to corresponding day card with flash animation - Double-click empty card to add shift - Weekend cards: gray background + left border, text stays readable - Whole page scrolls naturally (removed internal q-scroll-area) - Week column headers (Heures Semaine 1/2) - Monday separator line - Today: green glow + CSS circle indicator - more_time icon replaces add_circle Overview cards: - PTO: table format, no duplicate "vacances" header, aligned values - Hours: weekly chips side by side - Expenses: total badge next to button, aligned under hours card Mobile: - Modernized day cards with date header (number + weekday + month) - Delete button moved to bottom of shift card - Outlined icons unified with desktop - Weekly overview: compact "Sem. 1/2" with day-dot bars Auth: - Dev bypass: oidcLogin tries getProfile first before OIDC popup - Fixed floating-promises lint errors Bug fixes: - Removed console.log in shift-list-day - Fixed broken asset paths (src/assets → public/img) - circle.png replaced with CSS-only today indicator Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25 lines
578 B
TypeScript
25 lines
578 B
TypeScript
import { useAuthStore } from "../../../stores/auth-store";
|
|
|
|
export const useAuthApi = () => {
|
|
const authStore = useAuthStore();
|
|
|
|
const login = () => {
|
|
authStore.login();
|
|
};
|
|
|
|
const oidcLogin = async () => {
|
|
await authStore.oidcLogin();
|
|
};
|
|
|
|
const logout = async () => {
|
|
authStore.user = undefined;
|
|
await authStore.logout();
|
|
window.location.href = "https://auth.targo.ca/application/o/montargo/end-session/";
|
|
};
|
|
|
|
return {
|
|
login,
|
|
oidcLogin,
|
|
logout,
|
|
};
|
|
}; |