Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/assets/images/empty-order.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions src/components/_common/EmptyState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ const styles = StyleSheet.create({
backgroundColor: colors.WHITE,
},
icon: {
width: 220,
height: 220,
marginBottom: 16,
width: 180,
height: 180,
marginBottom: 25,
},
title: {
fontSize: 18,
fontSize: 20,
fontFamily: 'Pretendard-SemiBold',
color: '#222',
textAlign: 'center',
},
subtitle: {
marginTop: 8,
fontSize: 14,
marginTop: 5,
fontSize: 15,
fontFamily: 'Pretendard-Regular',
color: '#666',
textAlign: 'center',
Expand Down
4 changes: 2 additions & 2 deletions src/navigations/bottomTabs/SellerBottomTabsNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import { SvgProps } from 'react-native-svg';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';

import { MenuItem } from '../stack/SellerStackNavigator';
import AcceptActive from '@/assets/icons/accept-active.svg';
import Accept from '@/assets/icons/accept.svg';
import MenuActive from '@/assets/icons/menu-active.svg';
Expand All @@ -14,6 +13,7 @@ import { sellerNavigations } from '@/constants/navigations';
import SellerMenuScreen from '@/screens/seller/SellerMenuScreen';
import SellerMypageScreen from '@/screens/seller/SellerMypageScreen';
import SellerOrderScreen from '@/screens/seller/SellerOrderScreen';
import { MenuItem } from '@/types/domain';

export type SellerBottomTabsParamList = {
[sellerNavigations.MENU_HOME]: { updatedMenu?: MenuItem } | undefined;
Expand Down Expand Up @@ -64,7 +64,7 @@ function SellerBottomTabsNavigator() {
name={sellerNavigations.MENU_HOME}
component={SellerMenuScreen}
options={{
title: '메뉴관리',
title: '메뉴 관리',
tabBarIcon: ({ focused }) => renderTabIcon(focused, MenuActive, Menu),
}}
/>
Expand Down
22 changes: 14 additions & 8 deletions src/screens/notification/NotificationScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,28 @@ const getIconByType = (type: string) => {
}
};

// ✅ 더미데이터
const dummyNotifications = [
{
id: 1,
type: 'ENVIRONMENT_LEVEL_UP',
title: '레벨업',
type: 'ORDER_COMPLETION',
title: '주문 완료',
createdAt: '2분 전',
body: '축하합니다! 환경 레벨 3단계를 달성했어요.\n환경 쿠폰이 발급되었어요',
body: '경성꽈배기의 주문이 접수되었습니다!\n가게에서 곧 준비를 시작할거에요.',
},
{
id: 2,
type: 'ORDER_COMPLETION',
title: '주문 완료',
createdAt: '2분 전',
body: '죠죠 대학로점의 주문이 접수되었습니다!\n가게에서 곧 준비를 시작할거에요.',
type: 'ENVIRONMENT_LEVEL_UP',
title: '레벨업',
createdAt: '3분 전',
body: '축하합니다! 환경 레벨 3단계를 달성했어요.\n환경 쿠폰이 발급되었어요',
},
// {
// id: 3,
// type: 'ORDER_COMPLETION',
// title: '주문 완료',
// createdAt: '5일 전',
// body: '죠죠 대학로점의 주문이 접수되었습니다!\n가게에서 곧 준비를 시작할거에요.',
// },
];

const NotificationScreen = () => {
Expand Down
26 changes: 15 additions & 11 deletions src/screens/seller/SellerMenuModifyScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import {
import { launchImageLibrary, ImagePickerResponse, Asset } from 'react-native-image-picker';
import { RouteProp, useNavigation, useRoute } from '@react-navigation/native';
import { StackNavigationProp } from '@react-navigation/stack';
import Minus from '@/assets/icons/minus.svg';
import Plus from '@/assets/icons/plus.svg';
import { colors } from '@/constants/colors';
import { sellerNavigations } from '@/constants/navigations';
import { SellerStackparamList } from '@/navigations/stack/SellerStackNavigator';
Expand Down Expand Up @@ -178,7 +180,7 @@ const SellerMenuModifyScreen = () => {
<Text style={styles.label}>수량</Text>
<View style={styles.quantityBox}>
<TouchableOpacity style={styles.sideButton} onPress={decrease}>
<Text style={styles.buttonText}>-</Text>
<Minus width={22} height={22} />
</TouchableOpacity>
<TextInput
style={styles.quantityInput}
Expand All @@ -188,7 +190,7 @@ const SellerMenuModifyScreen = () => {
keyboardType="numeric"
/>
<TouchableOpacity style={styles.sideButton} onPress={increase}>
<Text style={styles.buttonText}>+</Text>
<Plus width={22} height={22} />
</TouchableOpacity>
</View>
</View>
Expand Down Expand Up @@ -236,7 +238,6 @@ const styles = StyleSheet.create({
marginBottom: 20,
flexDirection: 'row',
marginHorizontal: 25,
alignItems: 'center',
gap: 5,
},
scrollContainer: {
Expand All @@ -246,16 +247,19 @@ const styles = StyleSheet.create({
flex: 1,
borderWidth: 1,
borderColor: colors.GRAY_200,
borderRadius: 4,
paddingHorizontal: 8,
paddingVertical: 4,
borderRadius: 8,
paddingHorizontal: 12,
paddingVertical: 8,
color: colors.BLACK,
fontSize: 15,
fontFamily: 'Pretendard-Regular',
},
label: {
marginTop: 5,
width: 80,
fontSize: 16,
color: colors.GRAY_700,
fontFamily: 'Pretendard-Regular',
fontSize: 15,
color: colors.BLACK,
fontFamily: 'Pretendard-Medium',
},
controls: {
flex: 1,
Expand Down Expand Up @@ -285,7 +289,7 @@ const styles = StyleSheet.create({
textAlign: 'center',
},
quantityInput: {
width: 130,
flex: 1,
height: 40,
textAlign: 'center',
borderWidth: 1,
Expand Down Expand Up @@ -320,7 +324,7 @@ const styles = StyleSheet.create({
imageButton: {
marginHorizontal: 25,
marginLeft: 25 + 80 + 5,
paddingVertical: 12,
paddingVertical: 8,
borderRadius: 6,
backgroundColor: colors.WHITE,
borderColor: colors.GREEN,
Expand Down
93 changes: 59 additions & 34 deletions src/screens/seller/SellerMenuScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const SellerMenuScreen = () => {
style={styles.topContainer}
onPress={() => navigation.navigate(sellerNavigations.MENU_REGISTER)}
>
<Plus stroke={colors.GREEN} width={24} height={24} />
<Plus stroke={colors.WHITE} width={22} height={22} />
<Text style={styles.greenRegularText_15}>메뉴등록</Text>
</TouchableOpacity>

Expand All @@ -90,29 +90,30 @@ const SellerMenuScreen = () => {
showsVerticalScrollIndicator={false}
contentContainerStyle={{ paddingBottom: 24 }}
>
{menus.map((menu) => (
<View key={menu.id} style={styles.innerListContainer}>
<View style={styles.infoContainer}>
<Image style={styles.img} source={menu.image} />
<View style={styles.textContainer}>
<Text style={styles.blackBoldText_15}>{menu.name}</Text>
<Text style={styles.grayRegularText_13}>{menu.info}</Text>
<Text style={styles.grayRegularText_13}>
{menu.price.toLocaleString('ko-KR')}원
</Text>
{menus.map((menu, index) => (
<View key={menu.id}>
<View style={styles.innerListContainer}>
<View style={styles.infoContainer}>
<Image style={styles.img} source={menu.image} />
<View style={styles.textContainer}>
<View>
<Text style={styles.blackBoldText_15}>{menu.name}</Text>
<Text style={styles.grayRegularText_13}>{menu.info}</Text>
</View>
<Text style={styles.priceText}>{menu.price.toLocaleString('ko-KR')}원</Text>
</View>
</View>
<TouchableOpacity
style={styles.deleteButton}
onPress={() => navigation.navigate(sellerNavigations.MENU_MODIFY, { menu })}
>
<Text style={styles.editText}>수정</Text>
<Pencil width={14} height={14} />
</TouchableOpacity>
</View>
<TouchableOpacity
style={styles.deleteButton}
onPress={() =>
navigation.navigate(sellerNavigations.MENU_MODIFY, {
menu,
})
}
>
<Pencil width={15} height={15} />
<Text style={styles.grayRegularText_13}>수정</Text>
</TouchableOpacity>

{/* 마지막 요소가 아닐 때만 line 표시 */}
{index < menus.length - 1 && <View style={styles.line} />}
</View>
))}
</ScrollView>
Expand All @@ -129,13 +130,20 @@ const styles = StyleSheet.create({
},
innerContainer: {
paddingHorizontal: 20,
paddingVertical: 13,
paddingVertical: 18,
},
topContainer: {
flexDirection: 'row',
alignItems: 'center',
backgroundColor: colors.WHITE,
alignSelf: 'stretch',
alignSelf: 'flex-start',
paddingLeft: 6,
paddingRight: 9,
paddingVertical: 5,
backgroundColor: '#079500',
gap: 3,
borderWidth: 1,
borderRadius: 8,
borderColor: '#079500',
},
listContainer: {
flexShrink: 0,
Expand All @@ -152,7 +160,7 @@ const styles = StyleSheet.create({
},
infoContainer: {
flexDirection: 'row',
gap: 5,
gap: 10,
},
img: {
width: 80,
Expand All @@ -164,31 +172,48 @@ const styles = StyleSheet.create({
textContainer: {
justifyContent: 'center',
flexDirection: 'column',
gap: 3,
},
greenRegularText_15: {
fontSize: 15,
fontFamily: 'Pretendard-Regular',
color: colors.GREEN,
fontFamily: 'Pretendard-SemiBold',
color: colors.WHITE,
},
blackBoldText_15: {
fontSize: 15,
fontFamily: 'Pretendard-Bold',
fontSize: 16,
fontFamily: 'Pretendard-Medium',
color: colors.BLACK,
},
grayRegularText_13: {
fontSize: 13,
fontFamily: 'Pretendard-Regular',
color: colors.GRAY_700,
},
editText: {
fontSize: 13,
fontFamily: 'Pretendard-Regular',
color: colors.BLACK,
},
priceText: {
fontSize: 15,
fontFamily: 'Pretendard-SemiBold',
color: colors.BLACK,
},
deleteButton: {
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
paddingVertical: 4,
paddingHorizontal: 6,
backgroundColor: colors.GRAY_200,
borderRadius: 10,
gap: 2,
paddingHorizontal: 10,
backgroundColor: colors.WHITE,
borderColor: '#9C9C9C',
borderWidth: 1,
borderRadius: 7,
gap: 4,
},
line: {
height: 1,
backgroundColor: '#eaeaeaff',
},
});

Expand Down
2 changes: 1 addition & 1 deletion src/screens/seller/SellerMypageScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SellerMypageScreen = () => {

const dummyInsight = {
salesAmount: 125000,
popularMenu: ['죠죠 야끼소바', '새우구이', '매운 우동'],
popularMenu: ['경성꽈배기', '팥도너츠', '김치고기 고로케'],
monthAmount: {
'2025-05': 1050000,
'2025-06': 800000,
Expand Down
21 changes: 18 additions & 3 deletions src/screens/seller/SellerOrderScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { useState } from 'react';
import { Text, StyleSheet, View, FlatList, ActivityIndicator } from 'react-native';
import { TouchableOpacity } from 'react-native-gesture-handler';
import { SafeAreaView } from 'react-native-safe-area-context';
import EmptyOrderImage from '@/assets/images/empty-order.webp';
import EmptyState from '@/components/_common/EmptyState';
import CustomModal from '@/components/_modal/CustomModal';
import { colors } from '@/constants/colors';
import { stateMap } from '@/constants/modalStates';
Expand All @@ -25,7 +27,13 @@ const SellerOrderScreen = () => {
const { mutate: failOrder } = useFailOrder();

const renderItem = ({ item: order }: { item: SellerOrder }) => {
const time = order.pickupDueTime.substring(11, 16);
const date = new Date(order.pickupDueTime);
const time = date.toLocaleTimeString('ko-KR', {
hour: '2-digit',
minute: '2-digit',
hour12: false,
timeZone: 'Asia/Seoul',
});
const formattedAmount = `${order.totalAmount.toLocaleString('ko-KR')}원`;

return (
Expand Down Expand Up @@ -108,7 +116,14 @@ const SellerOrderScreen = () => {
ListFooterComponent={
isFetchingNextPage ? <ActivityIndicator style={{ marginVertical: 16 }} /> : null
}
contentContainerStyle={{ paddingBottom: 45 }}
ListEmptyComponent={
<EmptyState
icon={EmptyOrderImage}
title="신규 주문이 없습니다"
subtitle="주문이 들어오면 바로 알려드릴게요"
/>
}
contentContainerStyle={{ flexGrow: 1, paddingBottom: 45 }}
/>
</View>

Expand Down Expand Up @@ -195,7 +210,7 @@ const styles = StyleSheet.create({
},
whiteRegularText_15: {
fontSize: 15,
fontFamily: 'Pretendard-Regular',
fontFamily: 'Pretendard-SemiBold',
color: colors.WHITE,
},
blackRegularText_15: {
Expand Down
2 changes: 1 addition & 1 deletion src/screens/store/MenuDetailScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const MenuDetailScreen = () => {
{menu.dailyDiscountPercent > 0 && (
<Text style={styles.totalOriginal}>{(menu.price * count).toLocaleString()}원</Text>
)}
<Text style={styles.total}>{menu.discountPrice.toLocaleString()}원</Text>
<Text style={styles.total}>{(menu.discountPrice * count).toLocaleString()}원</Text>
</View>
<Pressable style={styles.cartBtn} onPress={addToCart}>
<Text style={styles.cartBtnText}>장바구니에 담기</Text>
Expand Down