5180 fichiers 38.5 Mo 0 téléchargements 484 vues mis à jour il y a 7 heures ui
nitro-v36-with-renderer-v36 / src / components / housekeeping / views / hotel / HousekeepingHotelTab.tsx
HousekeepingHotelTab.tsx 2.1 Ko Télécharger le fichier
import { FC, ReactNode, useState } from 'react';
import { FaBullhorn, FaFilter, FaShieldAlt, FaSync, FaTools } from 'react-icons/fa';
import { LocalizeText } from '../../../../api';
import { NativeTextTree } from '../../../../common/native-text/NativeTextTree';
import { HousekeepingSubTabs } from '../common/HousekeepingSubTabs';
import { HousekeepingHotelAlertView } from './HousekeepingHotelAlertView';
import { HousekeepingMaintenanceView } from './HousekeepingMaintenanceView';
import { HousekeepingReloadView } from './HousekeepingReloadView';
import { HousekeepingSecurityView } from './HousekeepingSecurityView';
import { HousekeepingWordFilterView } from './HousekeepingWordFilterView';

type HotelToolsSection = 'alert' | 'maintenance' | 'reload' | 'wordfilter' | 'security';

const SECTIONS: { id: HotelToolsSection; icon: ReactNode }[] = [
    { id: 'alert', icon: <FaBullhorn size={10} /> },
    { id: 'maintenance', icon: <FaTools size={10} /> },
    { id: 'reload', icon: <FaSync size={10} /> },
    { id: 'wordfilter', icon: <FaFilter size={10} /> },
    { id: 'security', icon: <FaShieldAlt size={10} /> }
];

/** Hotel-wide tools: alerts, maintenance with a countdown, hot reloads and the word filter. */
export const HousekeepingHotelTab: FC = () => {
    const [section, setSection] = useState<HotelToolsSection>('alert');

    return (
        <NativeTextTree>
            <div className="flex flex-col gap-2">
                <HousekeepingSubTabs<HotelToolsSection>
                    active={section}
                    tabs={SECTIONS.map(({ id, icon }) => ({ id, icon, label: LocalizeText(`housekeeping.hotel.section.${id}`) }))}
                    onChange={setSection}
                />
                {section === 'alert' && <HousekeepingHotelAlertView />}
                {section === 'maintenance' && <HousekeepingMaintenanceView />}
                {section === 'reload' && <HousekeepingReloadView />}
                {section === 'wordfilter' && <HousekeepingWordFilterView />}
                {section === 'security' && <HousekeepingSecurityView />}
            </div>
        </NativeTextTree>
    );
};
15Sujets
1Dépôts
20Membres
3En ligne
Profile
Inscrit
Dernière visite
Messages
0
Votes positifs
0
Votes négatifs
0

Nous utilisons des cookies pour assurer le bon fonctionnement du site et améliorer votre expérience. en savoir plus

Autoriser