/* * 현장 탭 — 역할별 현장 기능 허브. * 장치업체 → 현장 체크리스트(SCR-M1), 홀매니저 → 현장 검수(SCR-M2). */ import { Ionicons } from '@expo/vector-icons'; import { router } from 'expo-router'; import React from 'react'; import { useTranslation } from 'react-i18next'; import { Pressable, ScrollView, StyleSheet, Text, View } from 'react-native'; import { Banner } from '../../components/Banner'; import { useAuth } from '../../context/AuthContext'; import { colors, radius, spacing, type } from '../../theme'; export default function FieldScreen() { const { t } = useTranslation(); const { activeWorkspace, user } = useAuth(); const role = activeWorkspace?.myRole; const isHallManager = user?.hallManager || role === 'HALL_MANAGER'; const isContractor = role === 'CONTRACTOR'; return ( {t('field.title')} {!isContractor && !isHallManager ? ( {t('field.guide')} ) : null} {isContractor ? ( router.push('/checklist')} /> ) : null} {isHallManager ? ( router.push('/inspection')} /> ) : null} ); } function Tile({ icon, title, desc, onPress, }: { icon: keyof typeof Ionicons.glyphMap; title: string; desc: string; onPress: () => void; }) { return ( {title} {desc} ); } const styles = StyleSheet.create({ scroll: { padding: spacing.md, gap: spacing.md }, title: { fontSize: type.h2.fontSize, fontWeight: '700', color: colors.neutral900 }, tile: { flexDirection: 'row', alignItems: 'center', gap: 12, backgroundColor: colors.white, borderWidth: 1, borderColor: colors.neutral200, borderRadius: radius.md, padding: spacing.md, }, tileIcon: { width: 44, height: 44, borderRadius: radius.sm, backgroundColor: colors.primary050, alignItems: 'center', justifyContent: 'center', }, tileBody: { flex: 1, gap: 2 }, tileTitle: { fontSize: type.h3.fontSize, fontWeight: '600', color: colors.neutral900 }, tileDesc: { fontSize: type.caption.fontSize, color: colors.neutral500 }, });