├── .github ├── ISSUE_TEMPLATE │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── ci.yml ├── .gitignore ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle.kts ├── proguard-rules.pro ├── release │ └── output-metadata.json └── src │ ├── debug │ ├── ic_logo-playstore.png │ └── res │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_logo.xml │ │ └── ic_logo_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_logo.png │ │ ├── ic_logo_foreground.png │ │ └── ic_logo_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_logo.png │ │ ├── ic_logo_foreground.png │ │ └── ic_logo_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_logo.png │ │ ├── ic_logo_foreground.png │ │ └── ic_logo_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_logo.png │ │ ├── ic_logo_foreground.png │ │ └── ic_logo_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_logo.png │ │ ├── ic_logo_foreground.png │ │ └── ic_logo_round.png │ │ └── values │ │ └── ic_logo_background.xml │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── comit │ │ └── simtong │ │ ├── SimTongApplication.kt │ │ ├── firebase │ │ ├── FCMManager.kt │ │ └── firebase.kt │ │ ├── handler │ │ └── SimTongExceptionHandler.kt │ │ └── root │ │ ├── MainActivity.kt │ │ └── MainViewModel.kt │ └── res │ ├── drawable-v24 │ └── ic_launcher_foreground.xml │ ├── drawable │ ├── ic_launcher_background.xml │ └── ic_logo_png.png │ ├── mipmap-anydpi-v26 │ ├── ic_launcher.xml │ └── ic_launcher_round.xml │ ├── mipmap-hdpi │ ├── ic_launcher.webp │ └── ic_launcher_round.webp │ ├── mipmap-mdpi │ ├── ic_launcher.webp │ └── ic_launcher_round.webp │ ├── mipmap-xhdpi │ ├── ic_launcher.webp │ └── ic_launcher_round.webp │ ├── mipmap-xxhdpi │ ├── ic_launcher.webp │ └── ic_launcher_round.webp │ ├── mipmap-xxxhdpi │ ├── ic_launcher.webp │ └── ic_launcher_round.webp │ ├── values-night │ └── themes.xml │ ├── values │ ├── colors.xml │ ├── strings.xml │ └── themes.xml │ └── xml │ ├── backup_rules.xml │ └── data_extraction_rules.xml ├── build.gradle.kts ├── buildSrc ├── build.gradle.kts └── src │ └── main │ └── java │ ├── BuildPlugins.kt │ ├── Dependency.kt │ ├── ProjectProperties.kt │ └── Versions.kt ├── common-compose ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── comit │ │ └── common │ │ ├── BtnField.kt │ │ ├── SimImageUploadLayout.kt │ │ ├── ToastWrapper.kt │ │ ├── dialog │ │ ├── SimTongCalendarDialog.kt │ │ └── timerdialog │ │ │ ├── ListItemPicker.kt │ │ │ ├── NumberPicker.kt │ │ │ └── SimTongTimerDialog.kt │ │ ├── layout.kt │ │ ├── padding.kt │ │ ├── timer.kt │ │ └── utils │ │ └── Util.kt │ └── res │ └── values │ └── string.xml ├── common-util ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── comit │ └── common │ ├── convert │ ├── FileUtil.kt │ └── UriUtil.kt │ ├── extension │ └── toast.kt │ ├── format │ ├── RegexUtils.kt │ ├── email.kt │ ├── nickname.kt │ └── password.kt │ ├── kotlin │ ├── safeLet.kt │ └── whenNotNull.kt │ └── unit │ ├── bitmap.kt │ ├── dp.kt │ ├── file.kt │ └── time.kt ├── core-design-system ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── comit │ │ └── core_design_system │ │ ├── button │ │ ├── basicbutton.kt │ │ ├── button.kt │ │ ├── checkbox.kt │ │ └── radiobutton.kt │ │ ├── color │ │ └── SimTongColor.kt │ │ ├── component │ │ ├── CarrotMarket.kt │ │ ├── Comment.kt │ │ ├── Header.kt │ │ ├── IdeaComponent.kt │ │ ├── MealList.kt │ │ ├── NoticeBoardItem.kt │ │ ├── PeopleImageList.kt │ │ ├── PictureVideoCameraFile.kt │ │ ├── PlaceComponent.kt │ │ ├── StepsProgressBar.kt │ │ ├── TabBar.kt │ │ ├── TextField.kt │ │ ├── TextHeart.kt │ │ ├── Vote.kt │ │ └── notice_list │ │ │ ├── DraggableNotification.kt │ │ │ ├── NotificationList.kt │ │ │ └── NotificationModel.kt │ │ ├── constans │ │ ├── padding.kt │ │ └── shape.kt │ │ ├── dialog │ │ └── bottomSheet.kt │ │ ├── icon │ │ └── SimTongIcon.kt │ │ ├── modifier │ │ ├── clickable.kt │ │ ├── cutter.kt │ │ └── shadow.kt │ │ ├── theme │ │ └── theme.kt │ │ ├── typography │ │ └── typography.kt │ │ └── util │ │ ├── Anim.kt │ │ ├── bitmap.kt │ │ ├── dp.kt │ │ ├── runIf.kt │ │ ├── time.kt │ │ └── toast.kt │ └── res │ ├── drawable │ ├── ic_add.xml │ ├── ic_alarm_plan.xml │ ├── ic_alarm_post.xml │ ├── ic_back_big.xml │ ├── ic_back_small.xml │ ├── ic_beil_off.xml │ ├── ic_beil_on.xml │ ├── ic_calendar_after.xml │ ├── ic_calendar_before.xml │ ├── ic_carrot_market_base.xml │ ├── ic_check.xml │ ├── ic_check_white.xml │ ├── ic_close.xml │ ├── ic_comment.xml │ ├── ic_comment_gray.xml │ ├── ic_heart_off.xml │ ├── ic_heart_off_gray.xml │ ├── ic_heart_on.xml │ ├── ic_image.xml │ ├── ic_link.xml │ ├── ic_logo.png │ ├── ic_more.xml │ ├── ic_mypage.xml │ ├── ic_navi_home.xml │ ├── ic_navi_idea.xml │ ├── ic_navi_news.xml │ ├── ic_navi_shopping.xml │ ├── ic_navi_vote.xml │ ├── ic_next.xml │ ├── ic_next_gray.xml │ ├── ic_next_gray400.xml │ ├── ic_option_bold.xml │ ├── ic_option_horizontal_bold.xml │ ├── ic_option_thin.xml │ ├── ic_password_invisible.xml │ ├── ic_password_visible.xml │ ├── ic_people_list_big.xml │ ├── ic_photo.xml │ ├── ic_plus.xml │ ├── ic_profile_big.xml │ ├── ic_profile_small.xml │ ├── ic_schedule_off.xml │ ├── ic_schedule_on.xml │ ├── ic_send.xml │ ├── ic_thumb_off.xml │ ├── ic_thumb_on.xml │ ├── ic_trash.xml │ ├── img_meal_red.png │ ├── img_meal_white.png │ └── img_notice_board_rectangle.xml │ ├── font │ ├── noto_sans_kr_black.ttf │ ├── noto_sans_kr_bold.ttf │ ├── noto_sans_kr_light.ttf │ ├── noto_sans_kr_medium.ttf │ ├── noto_sans_kr_regular.ttf │ └── noto_sans_kr_thin.ttf │ └── values │ └── strings.xml ├── core ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── comit │ └── core │ └── EventFlow.kt ├── data ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── com │ │ └── comit │ │ └── data │ │ ├── .gitkeep │ │ ├── datasource │ │ ├── LocalAuthDataSource.kt │ │ ├── RemoteAuthDataSource.kt │ │ ├── RemoteCommonsDataSource.kt │ │ ├── RemoteEmailDataSource.kt │ │ ├── RemoteFileDataSource.kt │ │ ├── RemoteHolidayDataSource.kt │ │ ├── RemoteMenuDataSource.kt │ │ └── RemoteScheduleDataSource.kt │ │ ├── extension │ │ └── MultiPart.kt │ │ ├── interceptor │ │ ├── AuthorizationInterceptor.kt │ │ └── EmptyBodyInterceptor.kt │ │ ├── repository │ │ ├── AuthRepositoryImpl.kt │ │ ├── CommonsRepositoryImpl.kt │ │ ├── EmailRepositoryImpl.kt │ │ ├── FileRepositoryImpl.kt │ │ ├── HolidayRepositoryImpl.kt │ │ ├── MenuRepositoryImpl.kt │ │ └── ScheduleRepositoryImpl.kt │ │ └── util │ │ ├── FormDataUtil.kt │ │ └── SimTongApiCall.kt │ └── test │ └── java │ └── com │ └── comit │ └── data │ └── ExampleUnitTest.kt ├── detekt-config.yml ├── di ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── comit │ └── di │ ├── .gitkeep │ ├── LocalDataSourceModule.kt │ ├── NetworkModule.kt │ ├── PreferenceModule.kt │ ├── ProvideContext.kt │ ├── RemoteDataSourceModule.kt │ └── RepositoryModule.kt ├── domain ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── com │ │ └── comit │ │ └── domain │ │ ├── .gitkeep │ │ ├── exception │ │ ├── HttpException.kt │ │ ├── NeedLoginException.kt │ │ ├── NetworkException.kt │ │ └── ThrowUnknownException.kt │ │ ├── model │ │ └── MealEntity.kt │ │ ├── repository │ │ ├── AuthRepository.kt │ │ ├── CommonsRepository.kt │ │ ├── EmailRepository.kt │ │ ├── FileRepository.kt │ │ ├── HolidayRepository.kt │ │ ├── MenuRepository.kt │ │ └── ScheduleRepository.kt │ │ └── usecase │ │ ├── commons │ │ ├── ChangePasswordUseCase.kt │ │ ├── CheckOldPasswordUseCase.kt │ │ ├── FetchSpotsUseCase.kt │ │ ├── FindAccountExistUseCase.kt │ │ ├── FindEmailDuplicationUseCase.kt │ │ ├── FindEmployeeNumberUseCase.kt │ │ ├── InitializationPasswordUseCase.kt │ │ └── TokenReissueUseCase.kt │ │ ├── email │ │ ├── CheckEmailCodeUseCase.kt │ │ └── SendEmailCodeUseCase.kt │ │ ├── files │ │ ├── UploadFileListUseCase.kt │ │ └── UploadFileUseCase.kt │ │ ├── holiday │ │ ├── CheckCanWriteHolidayUseCase.kt │ │ ├── CheckLeftHolidayUseCase.kt │ │ ├── DayOffHolidaysUseCase.kt │ │ ├── FetchHolidaysUseCase.kt │ │ ├── SetAnnualUseCase.kt │ │ └── SetWorkUseCase.kt │ │ ├── menu │ │ ├── FetchMenuUseCase.kt │ │ └── FetchPublicMenuUseCase.kt │ │ ├── schedule │ │ ├── AddPersonalScheduleUseCase.kt │ │ ├── ChangePersonalScheduleUseCase.kt │ │ ├── DeletePersonalScheduleUseCase.kt │ │ └── FetchPersonalScheduleUseCase.kt │ │ └── users │ │ ├── ChangeEmailUseCase.kt │ │ ├── ChangeNicknameUseCase.kt │ │ ├── ChangeProfileImageUseCase.kt │ │ ├── ChangeSpotUseCase.kt │ │ ├── CheckNicknameDuplicationUseCase.kt │ │ ├── ClearTokenUseCase.kt │ │ ├── FetchUserInformationUseCase.kt │ │ ├── SaveDeviceTokenUseCase.kt │ │ ├── SignInUseCase.kt │ │ ├── SignUpUseCase.kt │ │ └── VerificationEmployeeUseCase.kt │ └── test │ └── java │ └── com │ └── comit │ └── domain │ └── ExampleUnitTest.kt ├── fastlane ├── Appfile ├── Fastfile ├── Pluginfile ├── README.md └── report.xml ├── feature ├── feature-home │ ├── .gitignore │ ├── build.gradle.kts │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── feature_home │ │ │ └── ExampleInstrumentedTest.kt │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── comit │ │ │ │ └── feature_home │ │ │ │ ├── Util.kt │ │ │ │ ├── calendar │ │ │ │ ├── SimTongCalendar.kt │ │ │ │ └── SimTongCalendarGetList.kt │ │ │ │ ├── contract │ │ │ │ └── HomeContract.kt │ │ │ │ ├── mvi │ │ │ │ ├── CloseDayContract.kt │ │ │ │ ├── FetchHolidayContract.kt │ │ │ │ ├── FetchScheduleContract.kt │ │ │ │ └── WriteScheduleContract.kt │ │ │ │ ├── navigation │ │ │ │ └── HomeNavigation.kt │ │ │ │ ├── screen │ │ │ │ ├── HomeScreen.kt │ │ │ │ ├── SalaryWebViewScreen.kt │ │ │ │ ├── WriteClosedDayScreen.kt │ │ │ │ ├── alarm │ │ │ │ │ └── AlarmScreen.kt │ │ │ │ └── schedule │ │ │ │ │ ├── ShowScheduleScreen.kt │ │ │ │ │ └── WriteScheduleScreen.kt │ │ │ │ └── vm │ │ │ │ ├── CloseDayViewModel.kt │ │ │ │ ├── GetHolidayViewModel.kt │ │ │ │ ├── GetWorkCountViewModel.kt │ │ │ │ ├── HomeViewModel.kt │ │ │ │ ├── ShowScheduleViewModel.kt │ │ │ │ └── WriteScheduleViewModel.kt │ │ └── res │ │ │ ├── drawable │ │ │ ├── ic_home_coin.xml │ │ │ └── ic_home_holiday.xml │ │ │ └── values │ │ │ └── string.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── example │ │ └── feature_home │ │ └── ExampleUnitTest.kt ├── feature-mypage │ ├── .gitignore │ ├── build.gradle.kts │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ │ ├── androidTest │ │ └── java │ │ │ └── com │ │ │ └── comit │ │ │ └── feature_mypage │ │ │ └── ExampleInstrumentedTest.kt │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── comit │ │ │ │ └── feature_mypage │ │ │ │ ├── .gitkeep │ │ │ │ ├── mvi │ │ │ │ ├── EmailContract.kt │ │ │ │ ├── InputCertificationContract.kt │ │ │ │ ├── MyPageContract.kt │ │ │ │ ├── NickNameContract.kt │ │ │ │ ├── PasswordContract.kt │ │ │ │ └── WorkPlaceContract.kt │ │ │ │ ├── navigation │ │ │ │ └── MyPageNavigation.kt │ │ │ │ ├── screen │ │ │ │ ├── MyPageScreen.kt │ │ │ │ ├── PrivacyPolicyScreen.kt │ │ │ │ └── fix │ │ │ │ │ ├── FixBaseScreen.kt │ │ │ │ │ ├── email │ │ │ │ │ ├── FixEmailInputCertificationScreen.kt │ │ │ │ │ └── FixEmailScreen.kt │ │ │ │ │ ├── nickname │ │ │ │ │ └── FixNickNameScreen.kt │ │ │ │ │ ├── password │ │ │ │ │ └── FixPassword.kt │ │ │ │ │ └── workplace │ │ │ │ │ └── FixWorkPlaceScreen.kt │ │ │ │ ├── utils │ │ │ │ └── MyPageDeepLinkKeyUtil.kt │ │ │ │ └── vm │ │ │ │ ├── FixEmailViewModel.kt │ │ │ │ ├── FixNickNameViewModel.kt │ │ │ │ ├── FixPasswordViewModel.kt │ │ │ │ ├── FixWorkPlaceViewModel.kt │ │ │ │ ├── InputCertificationViewModel.kt │ │ │ │ └── MyPageViewModel.kt │ │ └── res │ │ │ ├── drawable │ │ │ └── ic_my_page_plus.xml │ │ │ └── values │ │ │ └── string.xml │ │ └── test │ │ └── java │ │ └── com │ │ └── comit │ │ └── feature_mypage │ │ └── ExampleUnitTest.kt └── feature-onboarding │ ├── .gitignore │ ├── build.gradle.kts │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── comit │ │ └── feature_auth │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── comit │ │ │ └── feature_auth │ │ │ ├── .gitkeep │ │ │ ├── mvi │ │ │ ├── FindEmployeeNumContract.kt │ │ │ ├── FindPasswordContract.kt │ │ │ ├── SIgnUpContract.kt │ │ │ ├── SignInContract.kt │ │ │ └── StartContract.kt │ │ │ ├── navigation │ │ │ └── AuthNavigation.kt │ │ │ ├── screen │ │ │ ├── error │ │ │ │ └── ErrorScreen.kt │ │ │ ├── find │ │ │ │ ├── AuthFindScreen.kt │ │ │ │ ├── employeeNumber │ │ │ │ │ ├── FindEmployeeNumMainScreen.kt │ │ │ │ │ └── SpotUiModel.kt │ │ │ │ └── password │ │ │ │ │ ├── FindPasswordCheckUserScreen.kt │ │ │ │ │ ├── FindPasswordEmailCodeScreen.kt │ │ │ │ │ ├── FindPasswordFixPasswordScreen.kt │ │ │ │ │ └── FindPasswordScreen.kt │ │ │ ├── signIn │ │ │ │ └── SignInScreen.kt │ │ │ ├── signUp │ │ │ │ ├── 1_SignUpNameScreen.kt │ │ │ │ ├── 2_SignUpVerifyScreen.kt │ │ │ │ ├── 3_SignUpPasswordScreen.kt │ │ │ │ ├── 4_SignUpNicknameScreen.kt │ │ │ │ ├── SignUpScreen.kt │ │ │ │ └── SignUpStep.kt │ │ │ └── splash │ │ │ │ └── StartScreen.kt │ │ │ ├── utils │ │ │ ├── AuthDeepLinkKeyUtil.kt │ │ │ └── BottomSheetType.kt │ │ │ └── vm │ │ │ ├── FindEmployeeNumViewModel.kt │ │ │ ├── FindPasswordViewModel.kt │ │ │ ├── SignInViewModel.kt │ │ │ ├── SignUpViewModel.kt │ │ │ └── StartViewModel.kt │ └── res │ │ ├── drawable │ │ ├── bg_splash_page1.png │ │ ├── bg_splash_page2.png │ │ ├── bg_splash_page3.png │ │ ├── bg_splash_page4.png │ │ ├── bg_splash_page5.png │ │ ├── bg_splash_page6.png │ │ ├── bg_splash_simtong.png │ │ ├── bg_splash_title.png │ │ ├── ic_chinese_simtong.png │ │ ├── ic_dang.xml │ │ ├── ic_sign_in_logo.xml │ │ ├── ic_sign_in_title.png │ │ ├── ic_sim.xml │ │ └── ic_splash_logo.xml │ │ └── values │ │ └── string.xml │ └── test │ └── java │ └── com │ └── comit │ └── feature_auth │ └── ExampleUnitTest.kt ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── local ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── com │ │ └── comit │ │ └── local │ │ ├── .gitkeep │ │ ├── datasource │ │ └── LocalAuthDataSourceImpl.kt │ │ ├── extension │ │ ├── datastore.kt │ │ └── time.kt │ │ └── preference │ │ ├── AuthPreference.kt │ │ ├── AuthPreferenceImpl.kt │ │ └── ProvideDataStore.kt │ └── test │ └── java │ └── com │ └── comit │ └── local │ └── ExampleUnitTest.kt ├── model ├── .gitignore ├── build.gradle.kts └── src │ └── main │ └── java │ └── com │ └── comit │ └── model │ ├── HolidayList.kt │ ├── LeftHoliday.kt │ ├── MenuList.kt │ ├── ScheduleList.kt │ ├── SpotList.kt │ ├── Token.kt │ └── User.kt ├── navigator ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── comit │ └── navigator │ ├── .gitkeep │ └── SimTongScreen.kt ├── remote ├── .gitignore ├── build.gradle.kts ├── consumer-rules.pro ├── proguard-rules.pro └── src │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── com │ │ └── comit │ │ └── remote │ │ ├── .gitkeep │ │ ├── api │ │ ├── AuthAPI.kt │ │ ├── CommonsAPI.kt │ │ ├── EmailAPI.kt │ │ ├── FilesAPI.kt │ │ ├── HolidayAPI.kt │ │ ├── MenuAPI.kt │ │ └── ScheduleAPI.kt │ │ ├── datasource │ │ ├── RemoteAuthDataSourceImpl.kt │ │ ├── RemoteCommonsDataSourceImpl.kt │ │ ├── RemoteEmailDataSourceImpl.kt │ │ ├── RemoteFileDataSourceImpl.kt │ │ ├── RemoteHolidayDataSourceImpl.kt │ │ ├── RemoteMenuDataSourceImpl.kt │ │ └── RemoteScheduleDataSourceImpl.kt │ │ ├── mapper │ │ └── ResponseToModel.kt │ │ ├── request │ │ ├── commons │ │ │ ├── ChangePasswordRequest.kt │ │ │ ├── EmployeeNumberRequest.kt │ │ │ ├── InitializationPasswordRequest.kt │ │ │ └── ReissueTokenRequest.kt │ │ ├── emails │ │ │ ├── CheckEmailCodeRequest.kt │ │ │ └── EmailCodeRequest.kt │ │ ├── files │ │ │ └── FileRequest.kt │ │ ├── holidays │ │ │ ├── DayOffRequest.kt │ │ │ ├── HolidaysRequest.kt │ │ │ ├── SetAnnualRequest.kt │ │ │ ├── SetWorkRequest.kt │ │ │ └── SimpleHolidaysRequest.kt │ │ ├── menu │ │ │ └── MenuRequest.kt │ │ ├── schedules │ │ │ ├── AddPersonalScheduleRequest.kt │ │ │ └── ChangePersonalScheduleRequest.kt │ │ └── users │ │ │ ├── ChangeEmailRequest.kt │ │ │ ├── ChangeNicknameRequest.kt │ │ │ ├── ChangePasswordRequest.kt │ │ │ ├── ChangeProfileImageRequest.kt │ │ │ ├── ChangeSpotRequest.kt │ │ │ ├── SignInRequest.kt │ │ │ ├── SignUpRequest.kt │ │ │ └── VerificationEmployeeRequest.kt │ │ └── response │ │ ├── commons │ │ ├── EmployeeNumberResponse.kt │ │ ├── FetchSpotsResponse.kt │ │ └── ReissueTokenResponse.kt │ │ ├── emails │ │ └── .gitkeep │ │ ├── files │ │ ├── FileListResponse.kt │ │ └── FileResponse.kt │ │ ├── holidays │ │ ├── CheckLeftHolidayResponse.kt │ │ └── FetchHolidaysResponse.kt │ │ ├── menu │ │ ├── MenuResponse.kt │ │ └── PublicMenuResponse.kt │ │ ├── schedules │ │ └── FetchPersonalScheduleResponse.kt │ │ └── users │ │ ├── FetchUserInformationResponse.kt │ │ ├── SignInResponse.kt │ │ └── SignUpResponse.kt │ └── test │ └── java │ └── com │ └── comit │ └── remote │ └── ExampleUnitTest.kt └── settings.gradle.kts /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Descrption 11 | 12 | 설명을 작성해세요. 13 | 14 | 15 | 16 | ## To-do 17 | 18 | - [ ] todo 19 | - [ ] todo 20 | 21 | 22 | 23 | ## ETC 24 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## 개요 2 | ### 디자인 화면 3 | ### 관련 채널 내용 4 | 5 | ## 작업사항 6 | 7 | ## 반영화면 8 | 9 | ## 테스트 10 | 11 | ## 기타 12 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Android CI 2 | 3 | on: 4 | push: 5 | branches: [ master, develop ] 6 | pull_request: 7 | branches: [ master, develop ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: set up JDK 11 17 | uses: actions/setup-java@v2 18 | with: 19 | java-version: '11' 20 | distribution: 'temurin' 21 | cache: gradle 22 | 23 | - name: Grant execute permission for gradlew 24 | run: chmod +x gradlew 25 | - name: Create google-services.json 26 | run: echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > ./app/src/google-services.json 27 | - name: Build with Gradle 28 | run: ./gradlew build 29 | - name: Run test 30 | run: ./gradlew test 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #built application files 2 | *.apk 3 | *.ap_ 4 | *.aab 5 | 6 | # files for the dex VM 7 | *.dex 8 | 9 | # Java class files 10 | *.class 11 | 12 | # generated files 13 | bin/ 14 | gen/ 15 | 16 | # Local configuration file (sdk path, etc) 17 | local.properties 18 | 19 | # Windows thumbnail db 20 | Thumbs.db 21 | 22 | # OSX files 23 | .DS_Store 24 | 25 | # Android Studio 26 | *.iml 27 | .idea 28 | #.idea/workspace.xml - remove # and delete .idea if it better suit your needs. 29 | .gradle 30 | build/ 31 | .navigation 32 | captures/ 33 | output.json 34 | 35 | #NDK 36 | obj/ 37 | .externalNativeBuild 38 | app/google-services.json 39 | 40 | fastlane/.env 41 | 42 | fastlane/api-key.json 43 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "fastlane" 4 | 5 | plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') 6 | eval_gemfile(plugins_path) if File.exist?(plugins_path) 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |

3 | duckie 4 |

5 |

SimTong Android

6 |
(주)로쏘의 인프라넷 서비스, 심통
7 | 8 | ## ! THIS IS MVP SERVICE ! 9 | 현재 심통은 MVP 서비스로 제작중에 있습니다 10 | 11 | ## Project Architecture 12 | 13 | **모듈 구조도** 14 | ![module](https://user-images.githubusercontent.com/80076029/179916325-3021a449-93d9-4bec-8e2c-7e0433371f7b.png) 15 | 16 | **Architecture** 17 | ![Android Architecture](https://user-images.githubusercontent.com/80076029/179916343-06ca48a7-e6a2-4121-b849-a998b37ae51e.png) 18 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle.kts. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | 23 | -keepattributes SourceFile,LineNumberTable # Keep file names and line numbers. 24 | -keep public class * extends java.lang.Exception # Optional: Keep custom exceptions. -------------------------------------------------------------------------------- /app/release/output-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "artifactType": { 4 | "type": "APK", 5 | "kind": "Directory" 6 | }, 7 | "applicationId": "com.comit.simtong", 8 | "variantName": "release", 9 | "elements": [ 10 | { 11 | "type": "SINGLE", 12 | "filters": [], 13 | "attributes": [], 14 | "versionCode": 4, 15 | "versionName": "1.0.1", 16 | "outputFile": "app-release.apk" 17 | } 18 | ], 19 | "elementType": "File" 20 | } -------------------------------------------------------------------------------- /app/src/debug/ic_logo-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/ic_logo-playstore.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-anydpi-v26/ic_logo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-anydpi-v26/ic_logo_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-hdpi/ic_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-hdpi/ic_logo.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-hdpi/ic_logo_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-hdpi/ic_logo_foreground.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-hdpi/ic_logo_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-hdpi/ic_logo_round.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-mdpi/ic_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-mdpi/ic_logo.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-mdpi/ic_logo_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-mdpi/ic_logo_foreground.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-mdpi/ic_logo_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-mdpi/ic_logo_round.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-xhdpi/ic_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-xhdpi/ic_logo.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-xhdpi/ic_logo_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-xhdpi/ic_logo_foreground.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-xhdpi/ic_logo_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-xhdpi/ic_logo_round.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-xxhdpi/ic_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-xxhdpi/ic_logo.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-xxhdpi/ic_logo_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-xxhdpi/ic_logo_foreground.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-xxhdpi/ic_logo_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-xxhdpi/ic_logo_round.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-xxxhdpi/ic_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-xxxhdpi/ic_logo.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-xxxhdpi/ic_logo_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-xxxhdpi/ic_logo_foreground.png -------------------------------------------------------------------------------- /app/src/debug/res/mipmap-xxxhdpi/ic_logo_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/debug/res/mipmap-xxxhdpi/ic_logo_round.png -------------------------------------------------------------------------------- /app/src/debug/res/values/ic_logo_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3DDC84 4 | -------------------------------------------------------------------------------- /app/src/main/java/com/comit/simtong/SimTongApplication.kt: -------------------------------------------------------------------------------- 1 | package com.comit.simtong 2 | 3 | import android.app.Application 4 | import androidx.databinding.ktx.BuildConfig 5 | import dagger.hilt.android.HiltAndroidApp 6 | import timber.log.Timber 7 | 8 | @HiltAndroidApp 9 | class SimTongApplication : Application() { 10 | override fun onCreate() { 11 | super.onCreate() 12 | 13 | if (BuildConfig.DEBUG) { 14 | Timber.plant(Timber.DebugTree()) 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/comit/simtong/firebase/firebase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.simtong.firebase 2 | 3 | import com.comit.domain.exception.UnknownException 4 | import com.google.firebase.messaging.FirebaseMessaging 5 | 6 | /** 7 | * FCM 에서 사용되는 DeviceToken 을 불러오는 함수 8 | * 9 | * @return 디바이스 토큰 10 | * @throws UnknownException DeviceToken 을 불러오지 못한 경우 발생 11 | */ 12 | internal fun getDeviceToken(): String = 13 | FirebaseMessaging.getInstance().token.result 14 | ?: throw UnknownException("디바이스 토큰 발급에 실패했습니다.\n잠시 후 다시 시도해주세요.") 15 | -------------------------------------------------------------------------------- /app/src/main/java/com/comit/simtong/root/MainViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.comit.simtong.root 2 | 3 | import androidx.lifecycle.ViewModel 4 | import androidx.lifecycle.viewModelScope 5 | import com.comit.domain.usecase.users.SaveDeviceTokenUseCase 6 | import com.google.firebase.messaging.FirebaseMessaging 7 | import dagger.hilt.android.lifecycle.HiltViewModel 8 | import kotlinx.coroutines.launch 9 | import javax.inject.Inject 10 | 11 | /** 12 | * TODO(limsaehyun) 13 | * 14 | * Device 토큰을 google-service 가 위치한 app 에서 추출하여 저장하기 위해 15 | * MainViewModel 이 존재함 16 | * app 모듈에 viewModel 이 존재해도 될까? app 모듈의 범위에 대해서 고민한 필요가 있음 17 | */ 18 | @HiltViewModel 19 | class MainViewModel @Inject constructor( 20 | private val saveDeviceTokenUseCase: SaveDeviceTokenUseCase, 21 | ) : ViewModel() { 22 | 23 | fun saveDeviceToken() { 24 | FirebaseMessaging.getInstance().token.addOnCompleteListener { task -> 25 | val token = task.result 26 | viewModelScope.launch { 27 | saveDeviceTokenUseCase( 28 | token = token 29 | ) 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_logo_png.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/main/res/drawable/ic_logo_png.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | 11 | #FFE84045 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 심통 3 | -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | `kotlin-dsl` 3 | } 4 | 5 | repositories { 6 | google() 7 | mavenCentral() 8 | gradlePluginPortal() 9 | } -------------------------------------------------------------------------------- /buildSrc/src/main/java/BuildPlugins.kt: -------------------------------------------------------------------------------- 1 | object BuildPlugins { 2 | const val ANDROID_LIBRARY_PLUGIN = "com.android.library" 3 | const val KOTLIN_ANDROID_PLUGIN = "org.jetbrains.kotlin.android" 4 | const val ANDROID_APPLICATION_PLUGIN = "com.android.application" 5 | const val DAGGER_HILT_PLUGIN = "dagger.hilt.android.plugin" 6 | const val KOTLIN_ANDROID = "kotlin-android" 7 | const val KOTLIN_KAPT = "kotlin-kapt" 8 | const val KT_LINT = "org.jlleitschuh.gradle.ktlint" 9 | 10 | const val FIREBASE_DISTRIBUTION = "com.google.firebase.appdistribution" 11 | const val FIREBASE_CRASHLYTICS = "com.google.firebase.crashlytics" 12 | const val GOOGLE_SERVICE = "com.google.gms.google-services" 13 | 14 | } -------------------------------------------------------------------------------- /buildSrc/src/main/java/ProjectProperties.kt: -------------------------------------------------------------------------------- 1 | import org.gradle.api.JavaVersion 2 | 3 | object ProjectProperties{ 4 | const val VERSION_CODE = 7 5 | const val VERSION_NAME = "1.0.4" 6 | 7 | const val APPLICATION_ID = "com.comit.simtong" 8 | 9 | const val GRADLE_ANDROID = "7.2.1" 10 | const val GRADLE_KOTLIN = "1.6.21" 11 | 12 | val JAVA_VERSION = JavaVersion.VERSION_1_8 13 | const val KOTLIN_VERSION = "1.6.21" 14 | const val KOTLINX_COROUTINES = "1.6.0" 15 | 16 | const val BUILD_GRADLE = "4.2.1" 17 | const val COMPILE_SDK_VERSION = 33 18 | const val BUILD_TOOLS_VERSION = "33.0.0" 19 | const val MIN_SDK_VERSION = 26 20 | const val TARGET_SDK_VERSION = 33 21 | } 22 | -------------------------------------------------------------------------------- /common-compose/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /common-compose/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/common-compose/consumer-rules.pro -------------------------------------------------------------------------------- /common-compose/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /common-compose/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /common-compose/src/main/java/com/comit/common/ToastWrapper.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common 2 | 3 | import android.content.Context 4 | import android.widget.Toast 5 | import androidx.compose.runtime.Composable 6 | import androidx.compose.runtime.remember 7 | import androidx.compose.ui.platform.LocalContext 8 | import java.lang.ref.WeakReference 9 | 10 | class ToastWrapper(context: Context) { 11 | private val contextWrapper = WeakReference(context) 12 | private val _context get() = contextWrapper.get()!! 13 | 14 | private val toastInstance = Toast.makeText(_context, "", Toast.LENGTH_SHORT) 15 | 16 | operator fun invoke( 17 | message: Any, 18 | length: Int = Toast.LENGTH_SHORT, 19 | ) = toastInstance.run { 20 | setText(message.toString()) 21 | duration = length 22 | show() 23 | } 24 | } 25 | 26 | @Composable 27 | fun rememberToast(): ToastWrapper { 28 | val context = LocalContext.current.applicationContext 29 | return remember(context) { 30 | ToastWrapper(context) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /common-compose/src/main/java/com/comit/common/dialog/timerdialog/NumberPicker.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common.dialog.timerdialog 2 | 3 | import androidx.compose.material.LocalTextStyle 4 | import androidx.compose.material.MaterialTheme 5 | import androidx.compose.runtime.Composable 6 | import androidx.compose.ui.Modifier 7 | import androidx.compose.ui.graphics.Color 8 | import androidx.compose.ui.text.TextStyle 9 | 10 | @Composable 11 | fun NumberPicker( 12 | modifier: Modifier = Modifier, 13 | label: (Int) -> String = { 14 | it.toString() 15 | }, 16 | value: Int, 17 | onValueChange: (Int) -> Unit, 18 | dividersColor: Color = MaterialTheme.colors.primary, 19 | range: Iterable, 20 | textStyle: TextStyle = LocalTextStyle.current, 21 | ) { 22 | ListItemPicker( 23 | modifier = modifier, 24 | label = label, 25 | value = value, 26 | onValueChange = onValueChange, 27 | dividersColor = dividersColor, 28 | list = range.toList(), 29 | textStyle = textStyle 30 | ) 31 | } 32 | -------------------------------------------------------------------------------- /common-compose/src/main/java/com/comit/common/padding.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common 2 | 3 | import androidx.compose.foundation.layout.WindowInsets 4 | import androidx.compose.foundation.layout.asPaddingValues 5 | import androidx.compose.foundation.layout.systemBars 6 | import androidx.compose.foundation.layout.windowInsetsPadding 7 | import androidx.compose.runtime.Composable 8 | import androidx.compose.ui.Modifier 9 | import androidx.compose.ui.composed 10 | 11 | val systemBarPaddings 12 | @Composable get() = WindowInsets.systemBars.asPaddingValues() 13 | 14 | fun Modifier.systemBarPadding() = 15 | composed { 16 | Modifier.windowInsetsPadding(WindowInsets.systemBars) 17 | } 18 | -------------------------------------------------------------------------------- /common-compose/src/main/res/values/string.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 알림 4 | Cancel 5 | Save 6 | -------------------------------------------------------------------------------- /common-util/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /common-util/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/common-util/consumer-rules.pro -------------------------------------------------------------------------------- /common-util/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /common-util/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /common-util/src/main/java/com/comit/common/convert/UriUtil.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common.convert 2 | 3 | import android.content.Context 4 | import android.net.Uri 5 | import java.io.File 6 | 7 | object UriUtil { 8 | // URI -> File 9 | fun toFile(context: Context, uri: Uri): File { 10 | val fileName = getFileName(context, uri) 11 | 12 | val file = FileUtil.createTempFile(context, fileName) 13 | FileUtil.copyToFile(context, uri, file) 14 | 15 | return File(file.absolutePath) 16 | } 17 | 18 | // get file name & extension 19 | fun getFileName(context: Context, uri: Uri): String { 20 | val name = uri.toString().split("/").last() 21 | val ext = context.contentResolver.getType(uri)!!.split("/").last() 22 | 23 | return "$name.$ext" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /common-util/src/main/java/com/comit/common/extension/toast.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common.extension 2 | 3 | import android.content.Context 4 | import android.widget.Toast 5 | 6 | fun String.shortToast(context: Context) = 7 | Toast.makeText(context, this, Toast.LENGTH_SHORT).show() 8 | 9 | fun String.longToast(context: Context) = 10 | Toast.makeText(context, this, Toast.LENGTH_LONG).show() 11 | -------------------------------------------------------------------------------- /common-util/src/main/java/com/comit/common/format/RegexUtils.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common.format 2 | 3 | object RegexUtils { 4 | 5 | /** 6 | * first word & Last word - space X 7 | * 8 | * space , _ , . , a ~ z , A ~ Z , 가 ~ 힣 , 0 ~ 9 9 | * 10 | * length - 1 ~ 20 11 | **/ 12 | const val NICKNAME_PATTERN = """(?=^\S)(?=^[\w\s가-힣.]{1,20}$).*(?=\S$).""" 13 | 14 | /** 15 | * a ~ z or A ~ Z & 0 ~ 9 - must more than once 16 | * 17 | * non-space, $ , + , - , _ , a ~ z , A ~ Z , 0 ~ 9 18 | * 19 | * length - 8 ~ 20 20 | **/ 21 | const val SECRET_PATTERN = """(?=.*[a-zA-Z])(?=.*\d)(?=^[\w+\-$]{8,20}$).*""" 22 | } 23 | -------------------------------------------------------------------------------- /common-util/src/main/java/com/comit/common/format/email.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common.format 2 | 3 | fun String.isEmailFormat(): Boolean = 4 | android.util.Patterns.EMAIL_ADDRESS.matcher(this).matches() 5 | -------------------------------------------------------------------------------- /common-util/src/main/java/com/comit/common/format/nickname.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common.format 2 | -------------------------------------------------------------------------------- /common-util/src/main/java/com/comit/common/format/password.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common.format 2 | 3 | fun isPasswordFormat(password: String): Boolean { 4 | return password.matches(RegexUtils.SECRET_PATTERN.toRegex()) 5 | } 6 | 7 | fun isNicknameFormat(nickname: String): Boolean = 8 | nickname.matches(RegexUtils.NICKNAME_PATTERN.toRegex()) 9 | -------------------------------------------------------------------------------- /common-util/src/main/java/com/comit/common/kotlin/whenNotNull.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common.kotlin 2 | 3 | fun whenAllNotNull(vararg options: T?, block: (List) -> R) { 4 | if (options.all { it != null }) { 5 | block(options.filterNotNull()) 6 | } 7 | } 8 | 9 | fun whenAnyNotNull(vararg options: T?, block: (List) -> R) { 10 | if (options.any { it != null }) { 11 | block(options.filterNotNull()) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /common-util/src/main/java/com/comit/common/unit/bitmap.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common.unit 2 | 3 | import android.content.Context 4 | import android.graphics.Bitmap 5 | import android.graphics.ImageDecoder 6 | import android.net.Uri 7 | import android.os.Build 8 | import android.provider.MediaStore 9 | 10 | @Suppress("DEPRECATION", "NewApi") 11 | fun Uri.parseBitmap(context: Context): Bitmap { 12 | return when (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { // 28 13 | true -> { 14 | val source = ImageDecoder.createSource(context.contentResolver, this) 15 | ImageDecoder.decodeBitmap(source) 16 | } 17 | else -> { 18 | MediaStore.Images.Media.getBitmap(context.contentResolver, this) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /common-util/src/main/java/com/comit/common/unit/dp.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common.unit 2 | 3 | import android.content.res.Resources 4 | 5 | fun Float.dp(): Float = this * density + FLOAT_TO_DP 6 | 7 | internal val density: Float 8 | get() = Resources.getSystem().displayMetrics.density 9 | 10 | private const val FLOAT_TO_DP = 0.5f 11 | -------------------------------------------------------------------------------- /common-util/src/main/java/com/comit/common/unit/file.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common.unit 2 | 3 | import java.io.File 4 | 5 | val File.size get() = if (!exists()) 0.0 else length().toDouble() 6 | val File.sizeInKb get() = size / 1024 7 | val File.sizeInMb get() = sizeInKb / 1024 8 | val File.sizeInGb get() = sizeInMb / 1024 9 | val File.sizeInTb get() = sizeInGb / 1024 10 | -------------------------------------------------------------------------------- /common-util/src/main/java/com/comit/common/unit/time.kt: -------------------------------------------------------------------------------- 1 | package com.comit.common.unit 2 | 3 | import android.annotation.SuppressLint 4 | import java.text.SimpleDateFormat 5 | import java.time.LocalDateTime 6 | import java.time.format.DateTimeFormatter 7 | import java.util.Date 8 | 9 | @SuppressLint("SimpleDateFormat") 10 | val currentTime = 11 | SimpleDateFormat("HHmm").format(Date(System.currentTimeMillis())).toInt() 12 | 13 | fun String.toLocalDateTime(): LocalDateTime = 14 | LocalDateTime.parse(this, DateTimeFormatter.ISO_OFFSET_DATE_TIME) 15 | -------------------------------------------------------------------------------- /core-design-system/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /core-design-system/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/core-design-system/consumer-rules.pro -------------------------------------------------------------------------------- /core-design-system/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /core-design-system/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /core-design-system/src/main/java/com/comit/core_design_system/component/notice_list/NotificationModel.kt: -------------------------------------------------------------------------------- 1 | package com.comit.core_design_system.component.notice_list 2 | 3 | import androidx.compose.ui.Modifier 4 | import com.comit.core_design_system.icon.SimTongIcon 5 | 6 | data class NotificationModel( 7 | val modifier: Modifier = Modifier, 8 | val icon: SimTongIcon, 9 | val typeIcon: SimTongIcon, 10 | val text: String, 11 | val time: String 12 | ) 13 | -------------------------------------------------------------------------------- /core-design-system/src/main/java/com/comit/core_design_system/constans/padding.kt: -------------------------------------------------------------------------------- 1 | package com.comit.core_design_system.constans 2 | 3 | import androidx.compose.foundation.layout.PaddingValues 4 | import androidx.compose.runtime.Stable 5 | import androidx.compose.ui.unit.dp 6 | 7 | @Stable 8 | val NoPadding = PaddingValues(0.dp) 9 | -------------------------------------------------------------------------------- /core-design-system/src/main/java/com/comit/core_design_system/constans/shape.kt: -------------------------------------------------------------------------------- 1 | package com.comit.core_design_system.constans 2 | 3 | import androidx.compose.foundation.shape.RoundedCornerShape 4 | import androidx.compose.material.Shapes 5 | import androidx.compose.runtime.Stable 6 | import androidx.compose.ui.unit.dp 7 | 8 | private object ShapeSize { 9 | 10 | @Stable 11 | val SMALL = 2.dp 12 | 13 | @Stable 14 | val MEDIUM = 5.dp 15 | 16 | @Stable 17 | val LARGE = 10.dp 18 | } 19 | 20 | @Stable 21 | val RoundShapes = Shapes( 22 | small = RoundedCornerShape(ShapeSize.SMALL), 23 | medium = RoundedCornerShape(ShapeSize.MEDIUM), 24 | large = RoundedCornerShape(ShapeSize.LARGE) 25 | ) 26 | -------------------------------------------------------------------------------- /core-design-system/src/main/java/com/comit/core_design_system/modifier/cutter.kt: -------------------------------------------------------------------------------- 1 | package com.comit.core_design_system.modifier 2 | 3 | /** 4 | * 클릭이 지연될 시간을 정의하는 변수 5 | */ 6 | private const val ClickEventDelayTime: Long = 300L 7 | 8 | internal interface MultipleEventsCutter { 9 | fun processEvent(event: () -> Unit) 10 | 11 | companion object 12 | } 13 | 14 | internal fun MultipleEventsCutter.Companion.get(): MultipleEventsCutter = 15 | MultipleEventsCutterImpl() 16 | 17 | private class MultipleEventsCutterImpl : MultipleEventsCutter { 18 | private val now: Long 19 | get() = System.currentTimeMillis() 20 | 21 | private var lastEventTimeMs: Long = 0 22 | 23 | override fun processEvent(event: () -> Unit) { 24 | if (now - lastEventTimeMs >= ClickEventDelayTime) { 25 | event.invoke() 26 | } 27 | lastEventTimeMs = now 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /core-design-system/src/main/java/com/comit/core_design_system/util/Anim.kt: -------------------------------------------------------------------------------- 1 | package com.comit.core_design_system.util 2 | 3 | import androidx.compose.animation.AnimatedVisibility 4 | import androidx.compose.animation.core.tween 5 | import androidx.compose.animation.fadeIn 6 | import androidx.compose.animation.fadeOut 7 | import androidx.compose.animation.slideInHorizontally 8 | import androidx.compose.animation.slideOutHorizontally 9 | import androidx.compose.runtime.Composable 10 | 11 | @Composable 12 | fun AnimatedScreenSlide( 13 | visible: Boolean, 14 | enterDuration: Int = 200, 15 | fadeDuration: Int = 500, 16 | context: @Composable (String) -> Unit 17 | ) { 18 | AnimatedVisibility( 19 | visible = visible, 20 | enter = slideInHorizontally(animationSpec = tween(durationMillis = enterDuration)) { 21 | -it 22 | } + fadeIn( 23 | animationSpec = tween(durationMillis = fadeDuration) 24 | ), 25 | exit = slideOutHorizontally(animationSpec = tween(durationMillis = enterDuration)) { 26 | -it 27 | } + fadeOut( 28 | animationSpec = tween(durationMillis = fadeDuration) 29 | ) 30 | ) { 31 | context("") 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /core-design-system/src/main/java/com/comit/core_design_system/util/bitmap.kt: -------------------------------------------------------------------------------- 1 | package com.comit.core_design_system.util 2 | 3 | import android.content.Context 4 | import android.graphics.Bitmap 5 | import android.graphics.ImageDecoder 6 | import android.net.Uri 7 | import android.os.Build 8 | import android.provider.MediaStore 9 | 10 | @Suppress("DEPRECATION", "NewApi") 11 | internal fun Uri.parseBitmap(context: Context): Bitmap { 12 | return when (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { 13 | true -> { 14 | val source = ImageDecoder.createSource(context.contentResolver, this) 15 | ImageDecoder.decodeBitmap(source) 16 | } 17 | else -> { 18 | MediaStore.Images.Media.getBitmap(context.contentResolver, this) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /core-design-system/src/main/java/com/comit/core_design_system/util/dp.kt: -------------------------------------------------------------------------------- 1 | package com.comit.core_design_system.util 2 | 3 | import android.content.res.Resources 4 | 5 | internal fun Float.dp(): Float = this * density + FLOAT_TO_DP 6 | 7 | internal val density: Float 8 | get() = Resources.getSystem().displayMetrics.density 9 | 10 | private const val FLOAT_TO_DP = 0.5f 11 | -------------------------------------------------------------------------------- /core-design-system/src/main/java/com/comit/core_design_system/util/runIf.kt: -------------------------------------------------------------------------------- 1 | package com.comit.core_design_system.util 2 | 3 | internal inline fun T.runIf(condition: Boolean, run: T.() -> T) = if (condition) { 4 | run() 5 | } else this 6 | -------------------------------------------------------------------------------- /core-design-system/src/main/java/com/comit/core_design_system/util/time.kt: -------------------------------------------------------------------------------- 1 | package com.comit.core_design_system.util 2 | 3 | import android.annotation.SuppressLint 4 | import java.text.SimpleDateFormat 5 | import java.util.Date 6 | 7 | object MealsTime { 8 | const val launch = 900 9 | 10 | const val dinner = 1790 11 | } 12 | 13 | fun currentMealsTime(): Int = 14 | if (currentTime > MealsTime.launch) 2 else if (currentTime > MealsTime.dinner) 1 else 0 15 | 16 | @SuppressLint("SimpleDateFormat") 17 | private val currentTime = 18 | SimpleDateFormat("HHmm").format(Date(System.currentTimeMillis())).toInt() 19 | -------------------------------------------------------------------------------- /core-design-system/src/main/java/com/comit/core_design_system/util/toast.kt: -------------------------------------------------------------------------------- 1 | package com.comit.core_design_system.util 2 | 3 | import android.content.Context 4 | import android.widget.Toast 5 | import androidx.compose.runtime.Composable 6 | import androidx.compose.runtime.remember 7 | import androidx.compose.ui.platform.LocalContext 8 | import java.lang.ref.WeakReference 9 | 10 | internal class ToastWrapper(context: Context) { 11 | private val contextWrapper = WeakReference(context) 12 | private val _context get() = contextWrapper.get()!! 13 | 14 | private val toastInstance = Toast.makeText(_context, "", Toast.LENGTH_SHORT) 15 | 16 | operator fun invoke( 17 | message: Any, 18 | length: Int = Toast.LENGTH_SHORT, 19 | ) = toastInstance.run { 20 | setText(message.toString()) 21 | duration = length 22 | show() 23 | } 24 | } 25 | 26 | @Composable 27 | internal fun rememberToast(): ToastWrapper { 28 | val context = LocalContext.current.applicationContext 29 | return remember( 30 | key1 = context, 31 | ) { 32 | ToastWrapper( 33 | context = context, 34 | ) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_add.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_alarm_plan.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 16 | 23 | 24 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_alarm_post.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_back_big.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_back_small.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_beil_off.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_beil_on.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_calendar_after.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_calendar_before.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_check.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 14 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_check_white.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 14 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_close.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 16 | 17 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_heart_off.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 14 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_heart_off_gray.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 14 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_heart_on.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 17 | 18 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_image.xml: -------------------------------------------------------------------------------- 1 | 6 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_link.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 20 | 21 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/core-design-system/src/main/res/drawable/ic_logo.png -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_more.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 14 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_mypage.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_navi_home.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_navi_idea.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 14 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_navi_news.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_navi_vote.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_next.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_next_gray.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_next_gray400.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_option_bold.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_option_horizontal_bold.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_option_thin.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 14 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_password_visible.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 20 | 21 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_people_list_big.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 12 | 15 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_photo.xml: -------------------------------------------------------------------------------- 1 | 6 | 13 | 19 | 20 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_profile_big.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 12 | 15 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_profile_small.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 12 | 15 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_schedule_off.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_schedule_on.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/ic_send.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/img_meal_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/core-design-system/src/main/res/drawable/img_meal_red.png -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/img_meal_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/core-design-system/src/main/res/drawable/img_meal_white.png -------------------------------------------------------------------------------- /core-design-system/src/main/res/drawable/img_notice_board_rectangle.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /core-design-system/src/main/res/font/noto_sans_kr_black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/core-design-system/src/main/res/font/noto_sans_kr_black.ttf -------------------------------------------------------------------------------- /core-design-system/src/main/res/font/noto_sans_kr_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/core-design-system/src/main/res/font/noto_sans_kr_bold.ttf -------------------------------------------------------------------------------- /core-design-system/src/main/res/font/noto_sans_kr_light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/core-design-system/src/main/res/font/noto_sans_kr_light.ttf -------------------------------------------------------------------------------- /core-design-system/src/main/res/font/noto_sans_kr_medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/core-design-system/src/main/res/font/noto_sans_kr_medium.ttf -------------------------------------------------------------------------------- /core-design-system/src/main/res/font/noto_sans_kr_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/core-design-system/src/main/res/font/noto_sans_kr_regular.ttf -------------------------------------------------------------------------------- /core-design-system/src/main/res/font/noto_sans_kr_thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/core-design-system/src/main/res/font/noto_sans_kr_thin.ttf -------------------------------------------------------------------------------- /core/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /core/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/core/consumer-rules.pro -------------------------------------------------------------------------------- /core/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /core/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /data/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /data/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/data/consumer-rules.pro -------------------------------------------------------------------------------- /data/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /data/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/data/src/main/java/com/comit/data/.gitkeep -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/datasource/LocalAuthDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.datasource 2 | 3 | import com.comit.model.Token 4 | import kotlinx.coroutines.flow.Flow 5 | import java.time.LocalDateTime 6 | 7 | interface LocalAuthDataSource { 8 | 9 | fun fetchAccessToken(): Flow 10 | fun fetchRefreshToken(): Flow 11 | fun fetchExpiredAt(): Flow 12 | 13 | suspend fun saveAccessToken(token: String) 14 | suspend fun saveRefreshToken(token: String) 15 | suspend fun saveExpiredAt(expiredAt: LocalDateTime) 16 | suspend fun saveToken(token: Token) 17 | 18 | suspend fun clearToken() 19 | 20 | suspend fun fetchDeviceToken(): Flow 21 | suspend fun saveDeviceToken(token: String) 22 | } 23 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/datasource/RemoteAuthDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.datasource 2 | 3 | import com.comit.model.Token 4 | import com.comit.model.User 5 | import java.util.UUID 6 | 7 | interface RemoteAuthDataSource { 8 | 9 | suspend fun signIn( 10 | employeeNumber: Int, 11 | password: String, 12 | deviceToken: String, 13 | ): Token 14 | 15 | suspend fun verificationEmployee( 16 | name: String, 17 | employeeNumber: String, 18 | ) 19 | 20 | suspend fun signUp( 21 | name: String, 22 | employeeNumber: Int, 23 | email: String, 24 | password: String, 25 | nickname: String?, 26 | profileImagePath: String?, 27 | deviceToken: String, 28 | ): Token 29 | 30 | suspend fun checkNicknameDuplication( 31 | nickname: String, 32 | ) 33 | 34 | suspend fun changeSpot( 35 | spotId: UUID, 36 | ) 37 | 38 | suspend fun changeProfileImage( 39 | profileImagePath: String, 40 | ) 41 | 42 | suspend fun changeEmail( 43 | email: String, 44 | ) 45 | 46 | suspend fun changeNickname( 47 | nickname: String, 48 | ) 49 | 50 | suspend fun fetchUserInformation(): User 51 | } 52 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/datasource/RemoteCommonsDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.datasource 2 | 3 | import com.comit.model.SpotList 4 | import com.comit.model.Token 5 | 6 | interface RemoteCommonsDataSource { 7 | 8 | suspend fun findEmployeeNumber( 9 | name: String, 10 | spotId: String, 11 | email: String, 12 | ): String 13 | 14 | suspend fun tokenReissue( 15 | refreshToken: String, 16 | ): Token 17 | 18 | suspend fun findAccountExist( 19 | employeeNumber: Int, 20 | email: String 21 | ) 22 | 23 | suspend fun findEmailDuplication( 24 | email: String 25 | ) 26 | 27 | suspend fun changePassword( 28 | password: String, 29 | newPassword: String, 30 | ) 31 | 32 | suspend fun checkPassword( 33 | oldPassword: String 34 | ) 35 | 36 | suspend fun fetchSpots(): SpotList 37 | 38 | suspend fun initializationPassword( 39 | email: String, 40 | employeeNumber: Int, 41 | newPassword: String, 42 | ) 43 | } 44 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/datasource/RemoteEmailDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.datasource 2 | 3 | interface RemoteEmailDataSource { 4 | 5 | suspend fun sendEmailCode( 6 | email: String, 7 | ) 8 | 9 | suspend fun checkEmailCode( 10 | email: String, 11 | code: String, 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/datasource/RemoteFileDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.datasource 2 | 3 | import okhttp3.MultipartBody 4 | 5 | interface RemoteFileDataSource { 6 | 7 | suspend fun uploadFile( 8 | file: MultipartBody.Part, 9 | ): String 10 | 11 | suspend fun uploadFileList( 12 | files: List, 13 | ): List 14 | } 15 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/datasource/RemoteHolidayDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.datasource 2 | 3 | import com.comit.model.HolidayList 4 | import com.comit.model.LeftHoliday 5 | import java.util.Date 6 | 7 | interface RemoteHolidayDataSource { 8 | 9 | suspend fun fetchHolidays( 10 | startAt: String, 11 | endAt: String, 12 | status: String, 13 | ): HolidayList 14 | 15 | suspend fun dayOffHolidays( 16 | date: String 17 | ) 18 | 19 | suspend fun setAnnual( 20 | date: Date, 21 | ) 22 | 23 | suspend fun setWork( 24 | date: Date 25 | ) 26 | 27 | suspend fun checkLeftHoliday( 28 | year: Int 29 | ): LeftHoliday 30 | 31 | suspend fun checkCanWriteHoliday() 32 | } 33 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/datasource/RemoteMenuDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.datasource 2 | 3 | import com.comit.model.MenuList 4 | import java.util.Date 5 | 6 | interface RemoteMenuDataSource { 7 | 8 | suspend fun fetchMenu( 9 | startAt: String, 10 | endAt: String, 11 | ): MenuList 12 | 13 | suspend fun fetchPublicMenu( 14 | date: Date 15 | ): MenuList 16 | } 17 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/datasource/RemoteScheduleDataSource.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.datasource 2 | 3 | import com.comit.model.ScheduleList 4 | import java.util.UUID 5 | 6 | interface RemoteScheduleDataSource { 7 | 8 | suspend fun fetchPersonalSchedule( 9 | startAt: String, 10 | endAt: String, 11 | ): ScheduleList 12 | 13 | suspend fun addPersonalSchedule( 14 | title: String, 15 | startAt: String, 16 | endAt: String, 17 | alarm: String?, 18 | ) 19 | 20 | suspend fun changePersonalSchedule( 21 | scheduleId: UUID, 22 | title: String, 23 | startAt: String, 24 | endAt: String, 25 | alarm: String?, 26 | ) 27 | 28 | suspend fun deletePersonalSchedule( 29 | scheduleId: UUID, 30 | ) 31 | } 32 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/extension/MultiPart.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.extension 2 | 3 | import okhttp3.MediaType.Companion.toMediaTypeOrNull 4 | import okhttp3.MultipartBody 5 | import okhttp3.RequestBody.Companion.asRequestBody 6 | import java.io.File 7 | 8 | internal fun File.toMultipart( 9 | fileName: String, 10 | ): MultipartBody.Part { 11 | val fileBody = this.asRequestBody("application/json".toMediaTypeOrNull()) 12 | return MultipartBody.Part.createFormData(fileName, this.name, fileBody) 13 | } 14 | 15 | internal fun List.toMultipartList( 16 | fileName: String, 17 | ): List = 18 | this.map { 19 | it.toMultipart( 20 | fileName = fileName, 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/interceptor/EmptyBodyInterceptor.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.interceptor 2 | 3 | import okhttp3.Interceptor 4 | import okhttp3.MediaType.Companion.toMediaType 5 | import okhttp3.Response 6 | import okhttp3.ResponseBody 7 | import javax.inject.Inject 8 | 9 | @Suppress("MagicNumber") 10 | class EmptyBodyInterceptor @Inject constructor() : Interceptor { 11 | 12 | override fun intercept(chain: Interceptor.Chain): Response { 13 | val response = chain.proceed(chain.request()) 14 | if ( 15 | response.isSuccessful.not() || 16 | response.code.let { it != 204 && it != 205 } 17 | ) { 18 | return response 19 | } 20 | 21 | if ((response.body?.contentLength() ?: -1) >= 0) { 22 | return response.newBuilder().code(200).build() 23 | } 24 | 25 | val emptyBody = ResponseBody.create("text/plain".toMediaType(), "") 26 | 27 | return response 28 | .newBuilder() 29 | .code(200) 30 | .body(emptyBody) 31 | .build() 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/repository/EmailRepositoryImpl.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.repository 2 | 3 | import com.comit.data.datasource.RemoteEmailDataSource 4 | import com.comit.domain.repository.EmailRepository 5 | import javax.inject.Inject 6 | 7 | class EmailRepositoryImpl @Inject constructor( 8 | private val remoteEmailDataSource: RemoteEmailDataSource, 9 | ) : EmailRepository { 10 | 11 | override suspend fun sendEmailCode( 12 | email: String, 13 | ) { 14 | remoteEmailDataSource.sendEmailCode( 15 | email = email, 16 | ) 17 | } 18 | 19 | override suspend fun checkEmailCode( 20 | email: String, 21 | code: String, 22 | ) { 23 | remoteEmailDataSource.checkEmailCode( 24 | email = email, 25 | code = code, 26 | ) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/repository/FileRepositoryImpl.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.repository 2 | 3 | import com.comit.data.datasource.RemoteFileDataSource 4 | import com.comit.data.extension.toMultipart 5 | import com.comit.data.extension.toMultipartList 6 | import com.comit.domain.repository.FileRepository 7 | import java.io.File 8 | import javax.inject.Inject 9 | 10 | class FileRepositoryImpl @Inject constructor( 11 | private val remoteFileDataSource: RemoteFileDataSource, 12 | ) : FileRepository { 13 | override suspend fun uploadFile( 14 | file: File, 15 | ): String { 16 | return remoteFileDataSource.uploadFile( 17 | file = file.toMultipart(FORM_DATA_FILE_NAME) 18 | ) 19 | } 20 | 21 | override suspend fun uploadFileList( 22 | files: List, 23 | ): List { 24 | return remoteFileDataSource.uploadFileList( 25 | files = files.toMultipartList(FORM_DATA_FILE_LIST_NAME) 26 | ) 27 | } 28 | 29 | private companion object { 30 | const val FORM_DATA_FILE_NAME = "file" 31 | const val FORM_DATA_FILE_LIST_NAME = "files" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/repository/MenuRepositoryImpl.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.repository 2 | 3 | import com.comit.data.datasource.RemoteMenuDataSource 4 | import com.comit.domain.repository.MenuRepository 5 | import com.comit.model.MenuList 6 | import java.util.Date 7 | import javax.inject.Inject 8 | 9 | class MenuRepositoryImpl @Inject constructor( 10 | private val remoteMenuDataSource: RemoteMenuDataSource, 11 | ) : MenuRepository { 12 | 13 | override suspend fun fetchMenu( 14 | startAt: String, 15 | endAt: String, 16 | ): MenuList { 17 | return remoteMenuDataSource.fetchMenu( 18 | startAt = startAt, 19 | endAt = endAt, 20 | ) 21 | } 22 | 23 | override suspend fun fetchPublicMenu( 24 | date: Date, 25 | ): MenuList { 26 | return remoteMenuDataSource.fetchPublicMenu( 27 | date = date, 28 | ) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /data/src/main/java/com/comit/data/util/FormDataUtil.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data.util 2 | 3 | import okhttp3.MediaType.Companion.toMediaType 4 | import okhttp3.MultipartBody 5 | import okhttp3.RequestBody 6 | import okhttp3.RequestBody.Companion.asRequestBody 7 | import okhttp3.RequestBody.Companion.toRequestBody 8 | import java.io.File 9 | 10 | object FormDataUtil { 11 | // File -> Multipart 12 | fun getImageMultipart(key: String, file: File): MultipartBody.Part { 13 | return MultipartBody.Part.createFormData( 14 | name = key, 15 | filename = file.name, 16 | body = file.asRequestBody("image/*".toMediaType()) 17 | ) 18 | } 19 | // String -> RequestBody 20 | fun getTextRequestBody(string: String): RequestBody { 21 | return string.toRequestBody("text/plain".toMediaType()) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /data/src/test/java/com/comit/data/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.data 2 | 3 | import junit.framework.Assert.assertEquals 4 | import org.junit.Test 5 | 6 | /** 7 | * Example local unit test, which will execute on the development machine (host). 8 | * 9 | * See [testing documentation](http://d.android.com/tools/testing). 10 | */ 11 | class ExampleUnitTest { 12 | @Test 13 | fun addition_isCorrect() { 14 | assertEquals(4, 2 + 2) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /detekt-config.yml: -------------------------------------------------------------------------------- 1 | complexity: 2 | LongMethod: 3 | threshold: 100 4 | ignoreAnnotated: [ 'Composable' ] 5 | ComplexMethod: 6 | ignoreAnnotated: [ 'Composable' ] 7 | LongParameterList: 8 | active: false 9 | TooManyFunctions: 10 | active: false 11 | 12 | performance: 13 | SpreadOperator: 14 | active: false 15 | 16 | style: 17 | MagicNumber: 18 | ignorePropertyDeclaration: true 19 | ignoreCompanionObjectPropertyDeclaration: true 20 | ignoreAnnotated: [ 'AllowMagicNumber' ] 21 | ForbiddenComment: 22 | active: false 23 | UnusedPrivateMember: 24 | ignoreAnnotated: [ 'preview' ] 25 | ThrowsCount: 26 | active: false 27 | ReturnCount: 28 | active: false 29 | LoopWithTooManyJumpStatements: 30 | active: false 31 | DestructuringDeclarationWithTooManyEntries: 32 | active: false 33 | MaxLineLength: 34 | excludeCommentStatements: true 35 | 36 | naming: 37 | TopLevelPropertyNaming: 38 | constantPattern: '[A-Z가-힣][A-Za-z0-9가-힣_]*' 39 | FunctionNaming: 40 | ignoreAnnotated: [ 'Composable' ] 41 | MatchingDeclarationName: 42 | active: false 43 | VariableNaming: 44 | active: false 45 | PackageNaming: 46 | active: false 47 | -------------------------------------------------------------------------------- /di/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /di/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/di/consumer-rules.pro -------------------------------------------------------------------------------- /di/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /di/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /di/src/main/java/com/comit/di/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/di/src/main/java/com/comit/di/.gitkeep -------------------------------------------------------------------------------- /di/src/main/java/com/comit/di/LocalDataSourceModule.kt: -------------------------------------------------------------------------------- 1 | @file:Suppress("UnnecessaryAbstractClass") 2 | 3 | package com.comit.di 4 | 5 | import com.comit.data.datasource.LocalAuthDataSource 6 | import com.comit.local.datasource.LocalAuthDataSourceImpl 7 | import dagger.Binds 8 | import dagger.Module 9 | import dagger.hilt.InstallIn 10 | import dagger.hilt.components.SingletonComponent 11 | import javax.inject.Singleton 12 | 13 | @Module 14 | @InstallIn(SingletonComponent::class) 15 | abstract class LocalDataSourceModule { 16 | 17 | @Singleton 18 | @Binds 19 | abstract fun provideLocalAuthDataSource( 20 | localAuthDataSourceImpl: LocalAuthDataSourceImpl 21 | ): LocalAuthDataSource 22 | } 23 | -------------------------------------------------------------------------------- /di/src/main/java/com/comit/di/PreferenceModule.kt: -------------------------------------------------------------------------------- 1 | @file:Suppress("UnnecessaryAbstractClass") 2 | 3 | package com.comit.di 4 | 5 | import com.comit.local.preference.AuthPreference 6 | import com.comit.local.preference.AuthPreferenceImpl 7 | import dagger.Binds 8 | import dagger.Module 9 | import dagger.hilt.InstallIn 10 | import dagger.hilt.components.SingletonComponent 11 | import javax.inject.Singleton 12 | 13 | @Module 14 | @InstallIn(SingletonComponent::class) 15 | abstract class PreferenceModule { 16 | 17 | @Singleton 18 | @Binds 19 | abstract fun provideAuthPreference( 20 | authPreferenceImpl: AuthPreferenceImpl 21 | ): AuthPreference 22 | } 23 | -------------------------------------------------------------------------------- /di/src/main/java/com/comit/di/ProvideContext.kt: -------------------------------------------------------------------------------- 1 | package com.comit.di 2 | 3 | import android.content.Context 4 | import com.comit.local.preference.AuthPreferenceImpl 5 | import dagger.Module 6 | import dagger.Provides 7 | import dagger.hilt.InstallIn 8 | import dagger.hilt.android.qualifiers.ApplicationContext 9 | import dagger.hilt.components.SingletonComponent 10 | import javax.inject.Singleton 11 | 12 | @Module 13 | @InstallIn(SingletonComponent::class) 14 | object ProvideContext { 15 | 16 | @Singleton 17 | @Provides 18 | fun provideAuthPreference( 19 | @ApplicationContext context: Context, 20 | ): AuthPreferenceImpl = AuthPreferenceImpl( 21 | context = context, 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /domain/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /domain/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/domain/consumer-rules.pro -------------------------------------------------------------------------------- /domain/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /domain/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/domain/src/main/java/com/comit/domain/.gitkeep -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/exception/NeedLoginException.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.exception 2 | 3 | /** 4 | * RefreshToken 이 만료되어 로그인이 필요할 경우에 발생하는 Exception 5 | */ 6 | class NeedLoginException : RuntimeException() { 7 | override val message: String 8 | get() = "토큰이 만료되어 로그인이 필요합니다" 9 | } 10 | 11 | /** 12 | * RefreshToken 이 존재하지 않아 발생하는 Exception 13 | */ 14 | class RefreshTokenNotFound : RuntimeException() { 15 | override val message: String 16 | get() = "토큰이 존재하지 않습니다 로그인이 필요합니다." 17 | } 18 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/exception/NetworkException.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.exception 2 | 3 | /** 4 | * 인터넷이 없을 경우 발생하는 RuntimeException 5 | */ 6 | class NoInternetException : RuntimeException() { 7 | override val message: String 8 | get() = "네트워크가 불안정합니다. 데이터나 와이파이 연결 상태를 확인해주세요." 9 | } 10 | 11 | /** 12 | * 인터넷이 없을 경우 발생하는 RuntimeException 13 | */ 14 | class NoConnectivityException : RuntimeException() { 15 | override val message: String 16 | get() = "네트워크가 불안정합니다. 데이터나 와이파이 연결 상태를 확인해주세요." 17 | } 18 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/model/MealEntity.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.model 2 | 3 | data class MealEntity( 4 | val date: String, 5 | val food: List 6 | ) 7 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/repository/AuthRepository.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.repository 2 | 3 | import com.comit.model.User 4 | import java.io.File 5 | import java.util.UUID 6 | 7 | interface AuthRepository { 8 | 9 | suspend fun signIn( 10 | employeeNumber: Int, 11 | password: String, 12 | ) 13 | 14 | suspend fun verificationEmployee( 15 | name: String, 16 | employeeNumber: String, 17 | ) 18 | 19 | suspend fun signUp( 20 | name: String, 21 | employeeNumber: Int, 22 | email: String, 23 | password: String, 24 | nickname: String?, 25 | profileImage: File?, 26 | ) 27 | 28 | suspend fun checkNicknameDuplication( 29 | nickname: String, 30 | ) 31 | 32 | suspend fun changeSpot( 33 | spotId: UUID, 34 | ) 35 | 36 | suspend fun changeProfileImage( 37 | profileImg: File, 38 | ) 39 | 40 | suspend fun changeEmail( 41 | email: String, 42 | ) 43 | 44 | suspend fun changeNickname( 45 | nickname: String, 46 | ) 47 | 48 | suspend fun fetchUserInformation(): User 49 | 50 | suspend fun saveDeviceToken(token: String) 51 | 52 | suspend fun clearToken() 53 | } 54 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/repository/CommonsRepository.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.repository 2 | 3 | import com.comit.model.SpotList 4 | 5 | interface CommonsRepository { 6 | 7 | suspend fun findEmployeeNumber( 8 | name: String, 9 | spotId: String, 10 | email: String, 11 | ): String 12 | 13 | suspend fun tokenReissue() 14 | 15 | suspend fun findAccountExist( 16 | employeeNumber: Int, 17 | email: String 18 | ) 19 | 20 | suspend fun findEmailDuplication( 21 | email: String 22 | ) 23 | 24 | suspend fun changePassword( 25 | password: String, 26 | newPassword: String, 27 | ) 28 | 29 | suspend fun checkOldPassword( 30 | oldPassword: String, 31 | ) 32 | 33 | suspend fun fetchSpots(): SpotList 34 | 35 | suspend fun initializationPassword( 36 | email: String, 37 | employeeNumber: Int, 38 | newPassword: String, 39 | ) 40 | } 41 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/repository/EmailRepository.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.repository 2 | 3 | interface EmailRepository { 4 | 5 | suspend fun sendEmailCode( 6 | email: String, 7 | ) 8 | 9 | suspend fun checkEmailCode( 10 | email: String, 11 | code: String, 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/repository/FileRepository.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.repository 2 | 3 | import java.io.File 4 | 5 | interface FileRepository { 6 | 7 | suspend fun uploadFile( 8 | file: File, 9 | ): String 10 | 11 | suspend fun uploadFileList( 12 | files: List, 13 | ): List 14 | } 15 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/repository/HolidayRepository.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.repository 2 | 3 | import com.comit.model.HolidayList 4 | import com.comit.model.LeftHoliday 5 | import java.util.Date 6 | 7 | interface HolidayRepository { 8 | 9 | suspend fun fetchHolidays( 10 | startAt: String, 11 | endAt: String, 12 | status: String, 13 | ): HolidayList 14 | 15 | suspend fun dayOffHolidays( 16 | date: String 17 | ) 18 | 19 | suspend fun setAnnual( 20 | date: Date, 21 | ) 22 | 23 | suspend fun setWork( 24 | date: Date 25 | ) 26 | 27 | suspend fun checkLeftHoliday( 28 | year: Int, 29 | ): LeftHoliday 30 | 31 | suspend fun checkCanWriteHoliday() 32 | } 33 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/repository/MenuRepository.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.repository 2 | 3 | import com.comit.model.MenuList 4 | import java.util.Date 5 | 6 | interface MenuRepository { 7 | 8 | suspend fun fetchMenu( 9 | startAt: String, 10 | endAt: String, 11 | ): MenuList 12 | 13 | suspend fun fetchPublicMenu( 14 | date: Date 15 | ): MenuList 16 | } 17 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/repository/ScheduleRepository.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.repository 2 | 3 | import com.comit.model.ScheduleList 4 | import java.util.UUID 5 | 6 | interface ScheduleRepository { 7 | 8 | suspend fun fetchPersonalSchedule( 9 | startAt: String, 10 | endAt: String 11 | ): ScheduleList 12 | 13 | suspend fun addPersonalSchedule( 14 | title: String, 15 | startAt: String, 16 | endAt: String, 17 | alarm: String?, 18 | ) 19 | 20 | suspend fun changePersonalSchedule( 21 | scheduleId: UUID, 22 | title: String, 23 | startAt: String, 24 | endAt: String, 25 | alarm: String?, 26 | ) 27 | 28 | suspend fun deletePersonalSchedule( 29 | scheduleId: UUID, 30 | ) 31 | } 32 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/commons/ChangePasswordUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.commons 2 | 3 | import com.comit.domain.repository.CommonsRepository 4 | import javax.inject.Inject 5 | 6 | class ChangePasswordUseCase @Inject constructor( 7 | private val repository: CommonsRepository 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | params: Params, 12 | ) = kotlin.runCatching { 13 | repository.changePassword( 14 | password = params.password, 15 | newPassword = params.newPassword, 16 | ) 17 | } 18 | 19 | data class Params( 20 | val password: String, 21 | val newPassword: String, 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/commons/CheckOldPasswordUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.commons 2 | 3 | import com.comit.domain.repository.CommonsRepository 4 | import javax.inject.Inject 5 | 6 | class CheckOldPasswordUseCase @Inject constructor( 7 | private val repository: CommonsRepository 8 | ) { 9 | suspend operator fun invoke( 10 | params: Params, 11 | ) = kotlin.runCatching { 12 | repository.checkOldPassword( 13 | oldPassword = params.oldPassword, 14 | ) 15 | } 16 | 17 | data class Params( 18 | val oldPassword: String, 19 | ) 20 | } 21 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/commons/FetchSpotsUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.commons 2 | 3 | import com.comit.domain.repository.CommonsRepository 4 | import javax.inject.Inject 5 | 6 | class FetchSpotsUseCase @Inject constructor( 7 | private val repository: CommonsRepository, 8 | ) { 9 | 10 | suspend operator fun invoke() = kotlin.runCatching { 11 | repository.fetchSpots() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/commons/FindAccountExistUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.commons 2 | 3 | import com.comit.domain.repository.CommonsRepository 4 | import javax.inject.Inject 5 | 6 | class FindAccountExistUseCase @Inject constructor( 7 | private val repository: CommonsRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | params: Params 12 | ) = kotlin.runCatching { 13 | repository.findAccountExist( 14 | employeeNumber = params.employeeNumber, 15 | email = params.email, 16 | ) 17 | } 18 | 19 | data class Params( 20 | val employeeNumber: Int, 21 | val email: String, 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/commons/FindEmailDuplicationUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.commons 2 | 3 | import com.comit.domain.repository.CommonsRepository 4 | import javax.inject.Inject 5 | 6 | class FindEmailDuplicationUseCase @Inject constructor( 7 | private val repository: CommonsRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | email: String, 12 | ) = kotlin.runCatching { 13 | repository.findEmailDuplication( 14 | email = email 15 | ) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/commons/FindEmployeeNumberUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.commons 2 | 3 | import com.comit.domain.repository.CommonsRepository 4 | import javax.inject.Inject 5 | 6 | class FindEmployeeNumberUseCase @Inject constructor( 7 | private val repository: CommonsRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | params: Params, 12 | ) = kotlin.runCatching { 13 | repository.findEmployeeNumber( 14 | name = params.name, 15 | spotId = params.spotId, 16 | email = params.email, 17 | ) 18 | } 19 | 20 | data class Params( 21 | val name: String, 22 | val spotId: String, 23 | val email: String, 24 | ) 25 | } 26 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/commons/InitializationPasswordUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.commons 2 | 3 | import com.comit.domain.repository.CommonsRepository 4 | import javax.inject.Inject 5 | 6 | class InitializationPasswordUseCase @Inject constructor( 7 | private val repository: CommonsRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | params: Params, 12 | ) = kotlin.runCatching { 13 | repository.initializationPassword( 14 | email = params.email, 15 | employeeNumber = params.employeeNumber, 16 | newPassword = params.newPassword, 17 | ) 18 | } 19 | 20 | data class Params( 21 | val email: String, 22 | val employeeNumber: Int, 23 | val newPassword: String, 24 | ) 25 | } 26 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/commons/TokenReissueUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.commons 2 | 3 | import com.comit.domain.repository.CommonsRepository 4 | import javax.inject.Inject 5 | 6 | class TokenReissueUseCase @Inject constructor( 7 | private val commonsRepository: CommonsRepository, 8 | ) { 9 | 10 | suspend operator fun invoke() = kotlin.runCatching { 11 | commonsRepository.tokenReissue() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/email/CheckEmailCodeUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.email 2 | 3 | import com.comit.domain.repository.EmailRepository 4 | import javax.inject.Inject 5 | 6 | class CheckEmailCodeUseCase @Inject constructor( 7 | private val repository: EmailRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | params: Params, 12 | ) = kotlin.runCatching { 13 | repository.checkEmailCode( 14 | email = params.email, 15 | code = params.code, 16 | ) 17 | } 18 | 19 | data class Params( 20 | val email: String, 21 | val code: String, 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/email/SendEmailCodeUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.email 2 | 3 | import com.comit.domain.repository.EmailRepository 4 | import javax.inject.Inject 5 | 6 | class SendEmailCodeUseCase @Inject constructor( 7 | private val repository: EmailRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | email: String 12 | ) = kotlin.runCatching { 13 | repository.sendEmailCode( 14 | email = email, 15 | ) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/files/UploadFileListUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.files 2 | 3 | import com.comit.domain.repository.FileRepository 4 | import java.io.File 5 | import javax.inject.Inject 6 | 7 | class UploadFileListUseCase @Inject constructor( 8 | private val repository: FileRepository, 9 | ) { 10 | 11 | suspend operator fun invoke( 12 | files: List 13 | ) = kotlin.runCatching { 14 | repository.uploadFileList( 15 | files = files, 16 | ) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/files/UploadFileUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.files 2 | 3 | import com.comit.domain.repository.FileRepository 4 | import java.io.File 5 | import javax.inject.Inject 6 | 7 | class UploadFileUseCase @Inject constructor( 8 | private val repository: FileRepository, 9 | ) { 10 | 11 | suspend operator fun invoke( 12 | file: File, 13 | ) = kotlin.runCatching { 14 | repository.uploadFile( 15 | file = file, 16 | ) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/holiday/CheckCanWriteHolidayUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.holiday 2 | 3 | import com.comit.domain.repository.HolidayRepository 4 | import javax.inject.Inject 5 | 6 | class CheckCanWriteHolidayUseCase @Inject constructor( 7 | private val holidayRepository: HolidayRepository, 8 | ) { 9 | 10 | suspend operator fun invoke() = kotlin.runCatching { 11 | holidayRepository.checkCanWriteHoliday() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/holiday/CheckLeftHolidayUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.holiday 2 | 3 | import com.comit.domain.repository.HolidayRepository 4 | import javax.inject.Inject 5 | 6 | class CheckLeftHolidayUseCase @Inject constructor( 7 | private val repository: HolidayRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | year: Int 12 | ) = kotlin.runCatching { 13 | repository.checkLeftHoliday( 14 | year = year, 15 | ) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/holiday/DayOffHolidaysUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.holiday 2 | 3 | import com.comit.domain.repository.HolidayRepository 4 | import javax.inject.Inject 5 | 6 | class DayOffHolidaysUseCase @Inject constructor( 7 | private val repository: HolidayRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | date: String, 12 | ) = kotlin.runCatching { 13 | repository.dayOffHolidays( 14 | date = date, 15 | ) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/holiday/FetchHolidaysUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.holiday 2 | 3 | import com.comit.domain.repository.HolidayRepository 4 | import javax.inject.Inject 5 | 6 | class FetchHolidaysUseCase @Inject constructor( 7 | private val repository: HolidayRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | startAt: String, 12 | endAt: String, 13 | status: String, 14 | ) = kotlin.runCatching { 15 | repository.fetchHolidays( 16 | startAt = startAt, 17 | endAt = endAt, 18 | status = status, 19 | ) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/holiday/SetAnnualUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.holiday 2 | 3 | import com.comit.domain.repository.HolidayRepository 4 | import java.util.Date 5 | import javax.inject.Inject 6 | 7 | class SetAnnualUseCase @Inject constructor( 8 | private val repository: HolidayRepository, 9 | ) { 10 | 11 | suspend operator fun invoke( 12 | date: Date, 13 | ) = kotlin.runCatching { 14 | repository.setAnnual( 15 | date = date, 16 | ) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/holiday/SetWorkUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.holiday 2 | 3 | import com.comit.domain.repository.HolidayRepository 4 | import java.util.Date 5 | import javax.inject.Inject 6 | 7 | class SetWorkUseCase @Inject constructor( 8 | private val repository: HolidayRepository, 9 | ) { 10 | 11 | suspend operator fun invoke( 12 | date: Date, 13 | ) = kotlin.runCatching { 14 | repository.setWork( 15 | date = date, 16 | ) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/menu/FetchMenuUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.menu 2 | 3 | import com.comit.domain.model.MealEntity 4 | import com.comit.domain.repository.MenuRepository 5 | import com.comit.model.MenuList 6 | import javax.inject.Inject 7 | 8 | class FetchMenuUseCase @Inject constructor( 9 | private val repository: MenuRepository, 10 | ) { 11 | 12 | suspend operator fun invoke( 13 | startAt: String, 14 | endAt: String, 15 | ) = kotlin.runCatching { 16 | repository.fetchMenu( 17 | startAt = startAt, 18 | endAt = endAt, 19 | ).menu.map { 20 | it.toEntity() 21 | } 22 | } 23 | } 24 | 25 | fun MenuList.Menu.toEntity() = 26 | MealEntity( 27 | date = date, 28 | food = meal.split(',') 29 | ) 30 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/menu/FetchPublicMenuUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.menu 2 | 3 | import com.comit.domain.repository.MenuRepository 4 | import java.util.Date 5 | import javax.inject.Inject 6 | 7 | class FetchPublicMenuUseCase @Inject constructor( 8 | private val repository: MenuRepository, 9 | ) { 10 | 11 | suspend operator fun invoke( 12 | date: Date, 13 | ) = kotlin.runCatching { 14 | repository.fetchPublicMenu( 15 | date = date, 16 | ) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/schedule/AddPersonalScheduleUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.schedule 2 | 3 | import com.comit.domain.repository.ScheduleRepository 4 | import javax.inject.Inject 5 | 6 | class AddPersonalScheduleUseCase @Inject constructor( 7 | private val repository: ScheduleRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | params: Params, 12 | ) = kotlin.runCatching { 13 | repository.addPersonalSchedule( 14 | title = params.title, 15 | startAt = params.startAt, 16 | endAt = params.endAt, 17 | alarm = params.alarms, 18 | ) 19 | } 20 | 21 | data class Params( 22 | val title: String, 23 | val startAt: String, 24 | val endAt: String, 25 | val alarms: String?, 26 | ) 27 | } 28 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/schedule/ChangePersonalScheduleUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.schedule 2 | 3 | import com.comit.domain.repository.ScheduleRepository 4 | import java.util.UUID 5 | import javax.inject.Inject 6 | 7 | class ChangePersonalScheduleUseCase @Inject constructor( 8 | private val repository: ScheduleRepository, 9 | ) { 10 | suspend operator fun invoke( 11 | params: Params, 12 | ) = kotlin.runCatching { 13 | repository.changePersonalSchedule( 14 | scheduleId = params.scheduleId, 15 | title = params.title, 16 | startAt = params.startAt, 17 | endAt = params.endAt, 18 | alarm = params.alarms, 19 | ) 20 | } 21 | 22 | data class Params( 23 | val scheduleId: UUID, 24 | val title: String, 25 | val startAt: String, 26 | val endAt: String, 27 | val alarms: String?, 28 | ) 29 | } 30 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/schedule/DeletePersonalScheduleUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.schedule 2 | 3 | import com.comit.domain.repository.ScheduleRepository 4 | import java.util.UUID 5 | import javax.inject.Inject 6 | 7 | class DeletePersonalScheduleUseCase @Inject constructor( 8 | private val repository: ScheduleRepository, 9 | ) { 10 | 11 | suspend operator fun invoke( 12 | scheduleId: UUID, 13 | ) = kotlin.runCatching { 14 | repository.deletePersonalSchedule( 15 | scheduleId = scheduleId, 16 | ) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/schedule/FetchPersonalScheduleUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.schedule 2 | 3 | import com.comit.domain.repository.ScheduleRepository 4 | import javax.inject.Inject 5 | 6 | class FetchPersonalScheduleUseCase @Inject constructor( 7 | private val repository: ScheduleRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | startAt: String, 12 | endAt: String, 13 | ) = kotlin.runCatching { 14 | repository.fetchPersonalSchedule( 15 | startAt = startAt, 16 | endAt = endAt, 17 | ) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/users/ChangeEmailUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.users 2 | 3 | import com.comit.domain.repository.AuthRepository 4 | import javax.inject.Inject 5 | 6 | class ChangeEmailUseCase @Inject constructor( 7 | private val repository: AuthRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | params: Params, 12 | ) = kotlin.runCatching { 13 | repository.changeEmail( 14 | email = params.email, 15 | ) 16 | } 17 | 18 | data class Params( 19 | val email: String, 20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/users/ChangeNicknameUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.users 2 | 3 | import com.comit.domain.repository.AuthRepository 4 | import javax.inject.Inject 5 | 6 | class ChangeNicknameUseCase @Inject constructor( 7 | private val repository: AuthRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | params: Params, 12 | ) = kotlin.runCatching { 13 | repository.changeNickname( 14 | nickname = params.nickname, 15 | ) 16 | } 17 | 18 | data class Params( 19 | val nickname: String, 20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/users/ChangeProfileImageUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.users 2 | 3 | import com.comit.domain.repository.AuthRepository 4 | import java.io.File 5 | import javax.inject.Inject 6 | 7 | class ChangeProfileImageUseCase @Inject constructor( 8 | private val repository: AuthRepository, 9 | ) { 10 | 11 | suspend operator fun invoke( 12 | profileImg: File, 13 | ) = kotlin.runCatching { 14 | repository.changeProfileImage( 15 | profileImg = profileImg, 16 | ) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/users/ChangeSpotUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.users 2 | 3 | import com.comit.domain.repository.AuthRepository 4 | import java.util.UUID 5 | import javax.inject.Inject 6 | 7 | class ChangeSpotUseCase @Inject constructor( 8 | private val repository: AuthRepository, 9 | ) { 10 | 11 | suspend operator fun invoke( 12 | params: Params, 13 | ) = kotlin.runCatching { 14 | repository.changeSpot( 15 | spotId = params.spotId, 16 | ) 17 | } 18 | 19 | data class Params( 20 | val spotId: UUID, 21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/users/CheckNicknameDuplicationUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.users 2 | 3 | import com.comit.domain.repository.AuthRepository 4 | import javax.inject.Inject 5 | 6 | class CheckNicknameDuplicationUseCase @Inject constructor( 7 | private val repository: AuthRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | params: Params, 12 | ) = kotlin.runCatching { 13 | repository.checkNicknameDuplication( 14 | nickname = params.nickname, 15 | ) 16 | } 17 | 18 | data class Params( 19 | val nickname: String, 20 | ) 21 | } 22 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/users/ClearTokenUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.users 2 | 3 | import com.comit.domain.repository.AuthRepository 4 | import javax.inject.Inject 5 | 6 | class ClearTokenUseCase @Inject constructor( 7 | private val authRepository: AuthRepository, 8 | ) { 9 | 10 | suspend operator fun invoke() = kotlin.runCatching { 11 | authRepository.clearToken() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/users/FetchUserInformationUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.users 2 | 3 | import com.comit.domain.repository.AuthRepository 4 | import javax.inject.Inject 5 | 6 | class FetchUserInformationUseCase @Inject constructor( 7 | private val repository: AuthRepository, 8 | ) { 9 | 10 | suspend operator fun invoke() = kotlin.runCatching { 11 | repository.fetchUserInformation() 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/users/SaveDeviceTokenUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.users 2 | 3 | import com.comit.domain.repository.AuthRepository 4 | import javax.inject.Inject 5 | 6 | class SaveDeviceTokenUseCase @Inject constructor( 7 | private val repository: AuthRepository, 8 | ) { 9 | 10 | suspend operator fun invoke(token: String) = kotlin.runCatching { 11 | repository.saveDeviceToken( 12 | token = token, 13 | ) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/users/SignInUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.users 2 | 3 | import com.comit.domain.repository.AuthRepository 4 | import javax.inject.Inject 5 | 6 | class SignInUseCase @Inject constructor( 7 | private val repository: AuthRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | params: Params, 12 | ) = kotlin.runCatching { 13 | repository.signIn( 14 | employeeNumber = params.employeeNumber, 15 | password = params.password, 16 | ) 17 | } 18 | 19 | data class Params( 20 | val employeeNumber: Int, 21 | val password: String, 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/users/SignUpUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.users 2 | 3 | import com.comit.domain.repository.AuthRepository 4 | import java.io.File 5 | import javax.inject.Inject 6 | 7 | class SignUpUseCase @Inject constructor( 8 | private val repository: AuthRepository, 9 | ) { 10 | 11 | suspend operator fun invoke( 12 | params: Params, 13 | ) = kotlin.runCatching { 14 | repository.signUp( 15 | name = params.name, 16 | employeeNumber = params.employeeNumber, 17 | email = params.email, 18 | password = params.password, 19 | nickname = params.nickname, 20 | profileImage = params.profileImage, 21 | ) 22 | } 23 | 24 | data class Params( 25 | val name: String, 26 | val employeeNumber: Int, 27 | val email: String, 28 | val password: String, 29 | val nickname: String?, 30 | val profileImage: File?, 31 | ) 32 | } 33 | -------------------------------------------------------------------------------- /domain/src/main/java/com/comit/domain/usecase/users/VerificationEmployeeUseCase.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain.usecase.users 2 | 3 | import com.comit.domain.repository.AuthRepository 4 | import javax.inject.Inject 5 | 6 | class VerificationEmployeeUseCase @Inject constructor( 7 | private val repository: AuthRepository, 8 | ) { 9 | 10 | suspend operator fun invoke( 11 | params: Params 12 | ) = kotlin.runCatching { 13 | repository.verificationEmployee( 14 | name = params.name, 15 | employeeNumber = params.employeeNumber, 16 | ) 17 | } 18 | 19 | data class Params( 20 | val name: String, 21 | val employeeNumber: String, 22 | ) 23 | } 24 | -------------------------------------------------------------------------------- /domain/src/test/java/com/comit/domain/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.domain 2 | 3 | import junit.framework.Assert.assertEquals 4 | import org.junit.Test 5 | 6 | /** 7 | * Example local unit test, which will execute on the development machine (host). 8 | * 9 | * See [testing documentation](http://d.android.com/tools/testing). 10 | */ 11 | class ExampleUnitTest { 12 | @Test 13 | fun addition_isCorrect() { 14 | assertEquals(4, 2 + 2) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /fastlane/Appfile: -------------------------------------------------------------------------------- 1 | json_key_file("api-key.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one 2 | package_name("com.comit.simtong") 3 | -------------------------------------------------------------------------------- /fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | # This file contains the fastlane.tools configuration 2 | # You can find the documentation at https://docs.fastlane.tools 3 | # 4 | # For a list of all available actions, check out 5 | # 6 | # https://docs.fastlane.tools/actions 7 | # 8 | # For a list of all available plugins, check out 9 | # 10 | # https://docs.fastlane.tools/plugins/available-plugins 11 | # 12 | 13 | # Uncomment the line if you want fastlane to automatically update itself 14 | # update_fastlane 15 | 16 | default_platform(:android) 17 | 18 | platform :android do 19 | desc "Runs all the tests" 20 | lane :test do 21 | gradle(task: "test") 22 | end 23 | 24 | desc "Submit a new Beta Build to Crashlytics Beta" 25 | lane :beta do 26 | gradle(task: "clean assembleRelease") 27 | crashlytics 28 | 29 | # sh "your_script.sh" 30 | # You can also use other beta testing services here 31 | end 32 | 33 | desc "Deploy a new version to the Google Play" 34 | lane :deploy do 35 | gradle(task: "clean assembleRelease") 36 | upload_to_play_store 37 | end 38 | end 39 | 40 | desc "Lane for distribution" 41 | lane :distribute do 42 | gradle( task: "clean assembleRelease") 43 | firebase_app_distribution( 44 | app: ENV["APP_ID"], # Please Set Env Variable in /fastlane/.env!! 45 | debug: true 46 | ) 47 | end -------------------------------------------------------------------------------- /fastlane/Pluginfile: -------------------------------------------------------------------------------- 1 | # Autogenerated by fastlane 2 | # 3 | # Ensure this file is checked in to source control! 4 | 5 | gem 'fastlane-plugin-firebase_app_distribution' 6 | -------------------------------------------------------------------------------- /fastlane/README.md: -------------------------------------------------------------------------------- 1 | fastlane documentation 2 | ---- 3 | 4 | # Installation 5 | 6 | Make sure you have the latest version of the Xcode command line tools installed: 7 | 8 | ```sh 9 | xcode-select --install 10 | ``` 11 | 12 | For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) 13 | 14 | # Available Actions 15 | 16 | ### distribute 17 | 18 | ```sh 19 | [bundle exec] fastlane distribute 20 | ``` 21 | 22 | Lane for distribution 23 | 24 | ---- 25 | 26 | 27 | ## Android 28 | 29 | ### android test 30 | 31 | ```sh 32 | [bundle exec] fastlane android test 33 | ``` 34 | 35 | Runs all the tests 36 | 37 | ### android beta 38 | 39 | ```sh 40 | [bundle exec] fastlane android beta 41 | ``` 42 | 43 | Submit a new Beta Build to Crashlytics Beta 44 | 45 | ### android deploy 46 | 47 | ```sh 48 | [bundle exec] fastlane android deploy 49 | ``` 50 | 51 | Deploy a new version to the Google Play 52 | 53 | ---- 54 | 55 | This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. 56 | 57 | More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). 58 | 59 | The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). 60 | -------------------------------------------------------------------------------- /fastlane/report.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /feature/feature-home/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /feature/feature-home/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-home/consumer-rules.pro -------------------------------------------------------------------------------- /feature/feature-home/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /feature/feature-home/src/androidTest/java/com/example/feature_home/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.example.feature_home 2 | 3 | import androidx.test.ext.junit.runners.AndroidJUnit4 4 | import androidx.test.platform.app.InstrumentationRegistry 5 | import junit.framework.Assert.assertEquals 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | /** 10 | * Instrumented test, which will execute on an Android device. 11 | * 12 | * See [testing documentation](http://d.android.com/tools/testing). 13 | */ 14 | @RunWith(AndroidJUnit4::class) 15 | class ExampleInstrumentedTest { 16 | @Test 17 | fun useAppContext() { 18 | // Context of the app under test. 19 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 20 | assertEquals("com.example.feature_home.test", appContext.packageName) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /feature/feature-home/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /feature/feature-home/src/main/java/com/comit/feature_home/contract/HomeContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_home.contract 2 | 3 | import com.comit.core_design_system.component.Meal 4 | 5 | data class HomeState( 6 | 7 | val mealList: List = emptyList(), 8 | ) 9 | 10 | sealed class HomeSideEffect { 11 | object CanWriteHoliday : HomeSideEffect() 12 | 13 | object TokenException : HomeSideEffect() 14 | 15 | object CannotWriteHoliday : HomeSideEffect() 16 | } 17 | -------------------------------------------------------------------------------- /feature/feature-home/src/main/java/com/comit/feature_home/mvi/CloseDayContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_home.mvi 2 | 3 | data class CloseDayState( 4 | val year: String = "", 5 | val month: String = "", 6 | val day: String = "", 7 | val leftHoliday: Int = 0, 8 | ) 9 | 10 | sealed class CloseDaySideEffect { 11 | 12 | object CloseDayChangeSuccess : CloseDaySideEffect() 13 | 14 | object DateInputWrong : CloseDaySideEffect() 15 | 16 | object TokenException : CloseDaySideEffect() 17 | 18 | object AlreadyHoliday : CloseDaySideEffect() 19 | 20 | object TooManyHoliday : CloseDaySideEffect() 21 | 22 | object TooManyAnnualDay : CloseDaySideEffect() 23 | 24 | object AlreadyAnnualDay : CloseDaySideEffect() 25 | 26 | object AlreadyWork : CloseDaySideEffect() 27 | 28 | object CannotChangeWorkState : CloseDaySideEffect() 29 | } 30 | -------------------------------------------------------------------------------- /feature/feature-home/src/main/java/com/comit/feature_home/mvi/FetchHolidayContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_home.mvi 2 | 3 | import com.comit.model.HolidayList 4 | 5 | data class FetchHolidayState( 6 | val holidayList: List 7 | ) { 8 | data class Holiday( 9 | val date: String, 10 | val type: String, 11 | ) 12 | } 13 | 14 | fun HolidayList.toState() = FetchHolidayState( 15 | holidayList = holidays.map { 16 | it.toStateHoliday() 17 | } 18 | ) 19 | 20 | fun HolidayList.Holiday.toStateHoliday() = FetchHolidayState.Holiday( 21 | date = date, 22 | type = title, 23 | ) 24 | 25 | sealed class FetchHolidaySideEffect { 26 | 27 | object FetchHolidaySuccess : FetchHolidaySideEffect() 28 | } 29 | -------------------------------------------------------------------------------- /feature/feature-home/src/main/java/com/comit/feature_home/mvi/FetchScheduleContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_home.mvi 2 | 3 | import com.comit.model.ScheduleList 4 | 5 | data class FetchScheduleState( 6 | val scheduleList: List = listOf() 7 | ) { 8 | data class Schedule( 9 | val id: String = "", 10 | val startAt: String = "", 11 | val endAt: String = "", 12 | val title: String = "" 13 | ) 14 | } 15 | 16 | fun ScheduleList.toState() = FetchScheduleState( 17 | scheduleList = schedules.map { 18 | it.toStateSchedule() 19 | } 20 | ) 21 | 22 | fun ScheduleList.Schedule.toStateSchedule() = FetchScheduleState.Schedule( 23 | id = id, 24 | startAt = startAt, 25 | endAt = endAt, 26 | title = title 27 | ) 28 | 29 | sealed class FetchScheduleSideEffect { 30 | 31 | object DeleteScheduleDateError : FetchScheduleSideEffect() 32 | 33 | object DeleteScheduleCannotFound : FetchScheduleSideEffect() 34 | 35 | object DeleteScheduleSuccess : FetchScheduleSideEffect() 36 | 37 | object TokenError : FetchScheduleSideEffect() 38 | } 39 | -------------------------------------------------------------------------------- /feature/feature-home/src/main/java/com/comit/feature_home/mvi/WriteScheduleContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_home.mvi 2 | 3 | data class WriteScheduleState( 4 | val title: String = "", 5 | val scheduleStart: String = "", 6 | val scheduleEnd: String = "", 7 | val alarm: String = "", 8 | 9 | val errMsgTitle: String ? = null, 10 | val errMsgScheduleStart: String ? = null, 11 | val errMsgScheduleEnd: String ? = null, 12 | val errMsgAlarm: String ? = null 13 | ) 14 | 15 | sealed class WriteScheduleSideInEffect { 16 | 17 | object WriteScheduleSuccess : WriteScheduleSideInEffect() 18 | 19 | object InputTextFormError : WriteScheduleSideInEffect() 20 | 21 | object TokenException : WriteScheduleSideInEffect() 22 | 23 | object CannotFindSchedule : WriteScheduleSideInEffect() 24 | } 25 | -------------------------------------------------------------------------------- /feature/feature-home/src/main/java/com/comit/feature_home/screen/SalaryWebViewScreen.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_home.screen 2 | 3 | import androidx.compose.runtime.Composable 4 | import androidx.compose.ui.tooling.preview.Preview 5 | import com.google.accompanist.web.WebView 6 | import com.google.accompanist.web.rememberWebViewState 7 | 8 | private const val WebViewURL = "https://em.sungsimdang.co.kr:8443/" 9 | 10 | @Composable 11 | fun SalaryWebViewScreen() { 12 | val webViewState = 13 | rememberWebViewState( 14 | url = WebViewURL, 15 | additionalHttpHeaders = emptyMap() 16 | ) 17 | 18 | WebView( 19 | state = webViewState, 20 | onCreated = { webView -> 21 | with(webView) { 22 | settings.run { 23 | javaScriptEnabled = true 24 | domStorageEnabled = true 25 | javaScriptCanOpenWindowsAutomatically = false 26 | } 27 | } 28 | }, 29 | ) 30 | } 31 | 32 | @Preview 33 | @Composable 34 | fun PreviewHolidayWebViewScreen() { 35 | SalaryWebViewScreen() 36 | } 37 | -------------------------------------------------------------------------------- /feature/feature-home/src/main/res/drawable/ic_home_holiday.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 17 | 20 | 23 | 24 | -------------------------------------------------------------------------------- /feature/feature-home/src/test/java/com/example/feature_home/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.example.feature_home 2 | 3 | import junit.framework.TestCase.assertEquals 4 | import org.junit.Test 5 | 6 | /** 7 | * Example local unit test, which will execute on the development machine (host). 8 | * 9 | * See [testing documentation](http://d.android.com/tools/testing). 10 | */ 11 | class ExampleUnitTest { 12 | @Test 13 | fun addition_isCorrect() { 14 | assertEquals(4, 2 + 2) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /feature/feature-mypage/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /feature/feature-mypage/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-mypage/consumer-rules.pro -------------------------------------------------------------------------------- /feature/feature-mypage/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /feature/feature-mypage/src/androidTest/java/com/comit/feature_mypage/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_mypage 2 | 3 | import androidx.test.ext.junit.runners.AndroidJUnit4 4 | import androidx.test.platform.app.InstrumentationRegistry 5 | import junit.framework.TestCase.assertEquals 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | /** 10 | * Instrumented test, which will execute on an Android device. 11 | * 12 | * See [testing documentation](http://d.android.com/tools/testing). 13 | */ 14 | @RunWith(AndroidJUnit4::class) 15 | class ExampleInstrumentedTest { 16 | @Test 17 | fun useAppContext() { 18 | // Context of the app under test. 19 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 20 | assertEquals("com.comit.feature_mypage.test", appContext.packageName) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /feature/feature-mypage/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /feature/feature-mypage/src/main/java/com/comit/feature_mypage/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-mypage/src/main/java/com/comit/feature_mypage/.gitkeep -------------------------------------------------------------------------------- /feature/feature-mypage/src/main/java/com/comit/feature_mypage/mvi/EmailContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_mypage.mvi 2 | 3 | data class FixEmailState( 4 | val email: String = "", 5 | val code: String = "", 6 | 7 | val errEmail: String ? = null, 8 | val errCode: String ? = null 9 | ) 10 | 11 | sealed class FixEmailSideEffect { 12 | 13 | object EmailNotCorrect : FixEmailSideEffect() 14 | 15 | object SendCodeFinish : FixEmailSideEffect() 16 | 17 | object TooManyRequestsException : FixEmailSideEffect() 18 | 19 | object SameEmailException : FixEmailSideEffect() 20 | } 21 | -------------------------------------------------------------------------------- /feature/feature-mypage/src/main/java/com/comit/feature_mypage/mvi/InputCertificationContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_mypage.mvi 2 | 3 | data class InputCertificationState( 4 | val code: String = "", 5 | 6 | val errCode: String ? = null, 7 | ) 8 | 9 | sealed class InputCertificationSideEffect { 10 | 11 | object CertificationCorrect : InputCertificationSideEffect() 12 | 13 | object CertificationNotValid : InputCertificationSideEffect() 14 | 15 | object CertificationNotCorrect : InputCertificationSideEffect() 16 | 17 | object ChangeEmailSuccess : InputCertificationSideEffect() 18 | 19 | object EmailFormError : InputCertificationSideEffect() 20 | 21 | object CheckEmailFail : InputCertificationSideEffect() 22 | 23 | object SameEmailException : InputCertificationSideEffect() 24 | } 25 | -------------------------------------------------------------------------------- /feature/feature-mypage/src/main/java/com/comit/feature_mypage/mvi/MyPageContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_mypage.mvi 2 | 3 | data class MyPageState( 4 | val name: String = "", 5 | val email: String = "", 6 | val nickname: String = "", 7 | val spot: String = "", 8 | val profileImagePath: String? = null, 9 | ) 10 | 11 | sealed class MyPageSideEffect { 12 | 13 | data class LimitSize( 14 | val size: Double, 15 | ) : MyPageSideEffect() 16 | } 17 | -------------------------------------------------------------------------------- /feature/feature-mypage/src/main/java/com/comit/feature_mypage/mvi/NickNameContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_mypage.mvi 2 | 3 | data class FixNickNameState( 4 | val nickname: String = "", 5 | 6 | val errNicknameMsg: String ? = null, 7 | ) 8 | 9 | sealed class FixNickNameSideEffect { 10 | 11 | object FixNickNameSuccess : FixNickNameSideEffect() 12 | 13 | object NickNameFormException : FixNickNameSideEffect() 14 | 15 | object TokenException : FixNickNameSideEffect() 16 | 17 | object SameNickNameException : FixNickNameSideEffect() 18 | 19 | object ServerException : FixNickNameSideEffect() 20 | } 21 | -------------------------------------------------------------------------------- /feature/feature-mypage/src/main/java/com/comit/feature_mypage/mvi/PasswordContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_mypage.mvi 2 | 3 | data class FixPasswordState( 4 | val password: String = "", 5 | val oldPassword: String = "", 6 | 7 | val errMsgPassword: String ? = null, 8 | val errMsgOldPassword: String ? = null, 9 | ) 10 | 11 | sealed class FixPasswordInSideEffect { 12 | 13 | object OldPasswordCorrect : FixPasswordInSideEffect() 14 | 15 | object OldPasswordNotCorrect : FixPasswordInSideEffect() 16 | 17 | object PasswordFormException : FixPasswordInSideEffect() 18 | 19 | object NoInputPasswordException : FixPasswordInSideEffect() 20 | 21 | object FixPasswordSuccess : FixPasswordInSideEffect() 22 | } 23 | -------------------------------------------------------------------------------- /feature/feature-mypage/src/main/java/com/comit/feature_mypage/mvi/WorkPlaceContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_mypage.mvi 2 | 3 | import com.comit.model.SpotList 4 | import java.util.UUID 5 | 6 | data class FixWorkPlaceState( 7 | val spotList: List = listOf(), 8 | val spotId: UUID ? = null, 9 | 10 | val errMsgSpotList: String = "근무지점을 불러오는데 실패했습니다.", 11 | ) { 12 | data class Spot( 13 | val id: String, 14 | val name: String, 15 | val location: String, 16 | ) 17 | } 18 | 19 | fun SpotList.toState() = FixWorkPlaceState( 20 | spotList = spotList.map { 21 | it.toStateSpot() 22 | } 23 | ) 24 | 25 | fun SpotList.Spot.toStateSpot() = FixWorkPlaceState.Spot( 26 | id = id, 27 | name = name, 28 | location = location 29 | ) 30 | 31 | sealed class FixWorkPlaceSideEffect { 32 | 33 | object ChangeWorkPlaceSuccess : FixWorkPlaceSideEffect() 34 | 35 | object NoIdException : FixWorkPlaceSideEffect() 36 | 37 | object TokenException : FixWorkPlaceSideEffect() 38 | 39 | object NotFoundPlaceException : FixWorkPlaceSideEffect() 40 | 41 | object CannotChangePlaceTooMuch : FixWorkPlaceSideEffect() 42 | 43 | object FetchWorkPlaceFail : FixWorkPlaceSideEffect() 44 | } 45 | -------------------------------------------------------------------------------- /feature/feature-mypage/src/main/java/com/comit/feature_mypage/utils/MyPageDeepLinkKeyUtil.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_mypage.utils 2 | 3 | object MyPageDeepLinkKeyUtil { 4 | const val EMAIL = "email" 5 | } 6 | -------------------------------------------------------------------------------- /feature/feature-mypage/src/main/res/drawable/ic_my_page_plus.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /feature/feature-mypage/src/test/java/com/comit/feature_mypage/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_mypage 2 | 3 | import junit.framework.TestCase.assertEquals 4 | import org.junit.Test 5 | 6 | /** 7 | * Example local unit test, which will execute on the development machine (host). 8 | * 9 | * See [testing documentation](http://d.android.com/tools/testing). 10 | */ 11 | class ExampleUnitTest { 12 | @Test 13 | fun addition_isCorrect() { 14 | assertEquals(4, 2 + 2) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /feature/feature-onboarding/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /feature/feature-onboarding/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-onboarding/consumer-rules.pro -------------------------------------------------------------------------------- /feature/feature-onboarding/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /feature/feature-onboarding/src/androidTest/java/com/comit/feature_auth/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_auth 2 | 3 | import androidx.test.ext.junit.runners.AndroidJUnit4 4 | import androidx.test.platform.app.InstrumentationRegistry 5 | import junit.framework.Assert.assertEquals 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | /** 10 | * Instrumented test, which will execute on an Android device. 11 | * 12 | * See [testing documentation](http://d.android.com/tools/testing). 13 | */ 14 | @RunWith(AndroidJUnit4::class) 15 | class ExampleInstrumentedTest { 16 | @Test 17 | fun useAppContext() { 18 | // Context of the app under test. 19 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 20 | assertEquals("com.comit.feature_auth.test", appContext.packageName) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/java/com/comit/feature_auth/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-onboarding/src/main/java/com/comit/feature_auth/.gitkeep -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/java/com/comit/feature_auth/mvi/FindEmployeeNumContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_auth.mvi 2 | 3 | import com.comit.feature_auth.screen.find.employeeNumber.SpotUiModel 4 | 5 | data class FindEmployeeNumState( 6 | 7 | val name: String = "", 8 | val email: String = "", 9 | val place: String = "", 10 | val placeId: String = "", 11 | val placeList: List = emptyList(), 12 | 13 | val employeeNum: String = "", 14 | 15 | val errMsgName: String? = null, 16 | val errMsgPlace: String? = null, 17 | val errMsgEmail: String? = null, 18 | ) 19 | 20 | sealed class FindEmployeeNumSideEffect { 21 | 22 | data class NavigateToResultScreen( 23 | val employeeNum: String, 24 | ) : FindEmployeeNumSideEffect() 25 | 26 | object UserInfoNotMatched : FindEmployeeNumSideEffect() 27 | 28 | object FetchSpot : FindEmployeeNumSideEffect() 29 | } 30 | -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/java/com/comit/feature_auth/mvi/FindPasswordContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_auth.mvi 2 | 3 | data class FindPasswordState( 4 | val pageState: Int = 0, 5 | 6 | val employeeNumber: String = "", 7 | val email: String = "", 8 | val emailCode: String = "", 9 | val newPassword: String = "", 10 | val newPasswordCheck: String = "", 11 | 12 | val restartBtnEnabled: Boolean = false, 13 | 14 | val fieldErrEmployeeNumber: String? = null, 15 | val fieldErrEmail: String? = null, 16 | val fieldErrEmailCode: String? = null, 17 | ) 18 | 19 | sealed class FindPasswordSideEffect { 20 | 21 | object NavigateToSignIn : FindPasswordSideEffect() 22 | 23 | object UserIsAlready : FindPasswordSideEffect() 24 | 25 | object UserNotFound : FindPasswordSideEffect() 26 | 27 | object EmailValidError : FindPasswordSideEffect() 28 | 29 | object EmployeeNumNotNum : FindPasswordSideEffect() 30 | 31 | object EmailVerifyAlready : FindPasswordSideEffect() 32 | 33 | object TooManyRequest : FindPasswordSideEffect() 34 | 35 | object NavigateToFixPassword : FindPasswordSideEffect() 36 | 37 | object EmailCodeNotCorrect : FindPasswordSideEffect() 38 | 39 | object EmailFormat : FindPasswordSideEffect() 40 | } 41 | -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/java/com/comit/feature_auth/mvi/SignInContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_auth.mvi 2 | 3 | data class SignInState( 4 | val employeeNumber: String = "", 5 | val password: String = "", 6 | 7 | val errMsgEmployeeNumber: String ? = null, 8 | val errMsgPassword: String ? = null, 9 | ) 10 | 11 | sealed class SignInSideEffect { 12 | 13 | object NavigateToHomeScreen : SignInSideEffect() 14 | 15 | object IdOrPasswordNotCorrect : SignInSideEffect() 16 | 17 | object NumberFormat : SignInSideEffect() 18 | } 19 | -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/java/com/comit/feature_auth/mvi/StartContract.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_auth.mvi 2 | 3 | sealed class StartState { 4 | 5 | object Initial : StartState() 6 | } 7 | 8 | sealed class StartSideEffect { 9 | 10 | object NavigateToHome : StartSideEffect() 11 | 12 | object NavigateToSignIn : StartSideEffect() 13 | } 14 | -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/java/com/comit/feature_auth/screen/find/employeeNumber/SpotUiModel.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_auth.screen.find.employeeNumber 2 | 3 | import com.comit.model.SpotList 4 | 5 | class SpotUiModel( 6 | val id: String, 7 | val name: String, 8 | val location: String, 9 | ) 10 | 11 | fun SpotList.Spot.toUiModel() = 12 | SpotUiModel( 13 | id = id, 14 | name = name, 15 | location = location, 16 | ) 17 | 18 | fun SpotList.toUiModel(): List = 19 | this.spotList.map { it.toUiModel() } 20 | -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/java/com/comit/feature_auth/screen/signUp/SignUpStep.kt: -------------------------------------------------------------------------------- 1 | @file:Suppress("UnusedPrivateMember") 2 | 3 | package com.comit.feature_auth.screen.signUp 4 | 5 | private const val FirstStep: Int = 1 6 | private const val SecondStep: Int = 2 7 | private const val ThirdStep: Int = 3 8 | private const val FourthStep: Int = 4 9 | 10 | class SignUpStep { 11 | 12 | enum class InputUserInfo( 13 | val title: String, 14 | val offsetIdx: Int, 15 | ) { 16 | NAME("이름을 입력해주세요.", FirstStep), 17 | EMPLOYEE_NUMBER("사원번호를 입력해주세요.", SecondStep), 18 | EMAIL("이메일을 입력해주세요.", ThirdStep), 19 | // AGREED("약관을 동의해주세요.", FourthStep), 20 | } 21 | 22 | enum class InputPassword( 23 | val title: String, 24 | val offsetIdx: Int, 25 | ) { 26 | Password("비밀번호를 입력해주세요.", FirstStep), 27 | CheckPassword("비밀번호를 다시 입력해주세요.", SecondStep), 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/java/com/comit/feature_auth/utils/AuthDeepLinkKeyUtil.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_auth.utils 2 | 3 | object AuthDeepLinkKeyUtil { 4 | const val MESSAGE = "message" 5 | } 6 | -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/java/com/comit/feature_auth/utils/BottomSheetType.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_auth.utils 2 | 3 | enum class BottomSheetType { 4 | Show, 5 | Hide 6 | } 7 | -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/res/drawable/bg_splash_page1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-onboarding/src/main/res/drawable/bg_splash_page1.png -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/res/drawable/bg_splash_page2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-onboarding/src/main/res/drawable/bg_splash_page2.png -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/res/drawable/bg_splash_page3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-onboarding/src/main/res/drawable/bg_splash_page3.png -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/res/drawable/bg_splash_page4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-onboarding/src/main/res/drawable/bg_splash_page4.png -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/res/drawable/bg_splash_page5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-onboarding/src/main/res/drawable/bg_splash_page5.png -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/res/drawable/bg_splash_page6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-onboarding/src/main/res/drawable/bg_splash_page6.png -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/res/drawable/bg_splash_simtong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-onboarding/src/main/res/drawable/bg_splash_simtong.png -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/res/drawable/bg_splash_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-onboarding/src/main/res/drawable/bg_splash_title.png -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/res/drawable/ic_chinese_simtong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-onboarding/src/main/res/drawable/ic_chinese_simtong.png -------------------------------------------------------------------------------- /feature/feature-onboarding/src/main/res/drawable/ic_sign_in_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/feature/feature-onboarding/src/main/res/drawable/ic_sign_in_title.png -------------------------------------------------------------------------------- /feature/feature-onboarding/src/test/java/com/comit/feature_auth/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.feature_auth 2 | 3 | import junit.framework.Assert.assertEquals 4 | import org.junit.Test 5 | 6 | /** 7 | * Example local unit test, which will execute on the development machine (host). 8 | * 9 | * See [testing documentation](http://d.android.com/tools/testing). 10 | */ 11 | class ExampleUnitTest { 12 | @Test 13 | fun addition_isCorrect() { 14 | assertEquals(4, 2 + 2) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Dec 19 11:28:41 KST 2022 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /local/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /local/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/local/consumer-rules.pro -------------------------------------------------------------------------------- /local/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /local/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /local/src/main/java/com/comit/local/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/local/src/main/java/com/comit/local/.gitkeep -------------------------------------------------------------------------------- /local/src/main/java/com/comit/local/extension/time.kt: -------------------------------------------------------------------------------- 1 | package com.comit.local.extension 2 | 3 | import java.time.Instant 4 | import java.time.LocalDateTime 5 | import java.time.ZoneId 6 | 7 | internal fun LocalDateTime.toEpochSecond() = 8 | this.atZone(ZoneId.systemDefault()).toEpochSecond() 9 | 10 | internal fun Long.epochSecondToLocalDateTime() = Instant 11 | .ofEpochSecond(this) 12 | .atZone(ZoneId.systemDefault()) 13 | .toLocalDateTime() 14 | -------------------------------------------------------------------------------- /local/src/main/java/com/comit/local/preference/AuthPreference.kt: -------------------------------------------------------------------------------- 1 | package com.comit.local.preference 2 | 3 | import kotlinx.coroutines.flow.Flow 4 | import java.time.LocalDateTime 5 | 6 | interface AuthPreference { 7 | 8 | fun fetchAccessToken(): Flow 9 | fun fetchRefreshToken(): Flow 10 | fun fetchExpiredAt(): Flow 11 | 12 | suspend fun saveAccessToken(token: String) 13 | suspend fun saveRefreshToken(token: String) 14 | suspend fun saveExpiredAt(expiredAt: LocalDateTime) 15 | 16 | suspend fun clearAccessToken() 17 | suspend fun clearRefreshToken() 18 | suspend fun clearExpiredAt() 19 | 20 | suspend fun fetchDeviceToken(): Flow 21 | suspend fun saveDeviceToken(token: String) 22 | } 23 | -------------------------------------------------------------------------------- /local/src/main/java/com/comit/local/preference/ProvideDataStore.kt: -------------------------------------------------------------------------------- 1 | package com.comit.local.preference 2 | 3 | import android.content.Context 4 | import androidx.datastore.core.DataStore 5 | import androidx.datastore.preferences.core.Preferences 6 | import androidx.datastore.preferences.preferencesDataStore 7 | 8 | private const val DATASTORE_NAME = "SIM_TONG_DATASTORE" 9 | 10 | internal val Context.datastore: DataStore by preferencesDataStore( 11 | name = DATASTORE_NAME, 12 | ) 13 | -------------------------------------------------------------------------------- /local/src/test/java/com/comit/local/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.local 2 | 3 | import junit.framework.Assert.assertEquals 4 | import org.junit.Test 5 | 6 | /** 7 | * Example local unit test, which will execute on the development machine (host). 8 | * 9 | * See [testing documentation](http://d.android.com/tools/testing). 10 | */ 11 | class ExampleUnitTest { 12 | @Test 13 | fun addition_isCorrect() { 14 | assertEquals(4, 2 + 2) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /model/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /model/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("java-library") 3 | id("org.jetbrains.kotlin.jvm") 4 | } 5 | 6 | java { 7 | sourceCompatibility = JavaVersion.VERSION_1_8 8 | targetCompatibility = JavaVersion.VERSION_1_8 9 | } 10 | -------------------------------------------------------------------------------- /model/src/main/java/com/comit/model/HolidayList.kt: -------------------------------------------------------------------------------- 1 | package com.comit.model 2 | 3 | data class HolidayList( 4 | val holidays: List 5 | ) { 6 | 7 | data class Holiday( 8 | val date: String, 9 | val title: String, 10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /model/src/main/java/com/comit/model/LeftHoliday.kt: -------------------------------------------------------------------------------- 1 | package com.comit.model 2 | 3 | data class LeftHoliday( 4 | val result: Int 5 | ) 6 | -------------------------------------------------------------------------------- /model/src/main/java/com/comit/model/MenuList.kt: -------------------------------------------------------------------------------- 1 | package com.comit.model 2 | 3 | data class MenuList( 4 | val menu: List, 5 | ) { 6 | data class Menu( 7 | val date: String, 8 | val meal: String, 9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /model/src/main/java/com/comit/model/ScheduleList.kt: -------------------------------------------------------------------------------- 1 | package com.comit.model 2 | 3 | data class ScheduleList( 4 | val schedules: List, 5 | ) { 6 | data class Schedule( 7 | val id: String, 8 | val startAt: String, 9 | val endAt: String, 10 | val title: String, 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /model/src/main/java/com/comit/model/SpotList.kt: -------------------------------------------------------------------------------- 1 | package com.comit.model 2 | 3 | data class SpotList( 4 | val spotList: List 5 | ) { 6 | data class Spot( 7 | val id: String, 8 | val name: String, 9 | val location: String, 10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /model/src/main/java/com/comit/model/Token.kt: -------------------------------------------------------------------------------- 1 | package com.comit.model 2 | 3 | import java.time.LocalDateTime 4 | 5 | data class Token( 6 | val accessToken: String, 7 | val accessTokenExp: LocalDateTime, 8 | val refreshToken: String, 9 | ) 10 | -------------------------------------------------------------------------------- /model/src/main/java/com/comit/model/User.kt: -------------------------------------------------------------------------------- 1 | package com.comit.model 2 | 3 | data class User( 4 | val name: String, 5 | val email: String, 6 | val nickname: String, 7 | val spot: String, 8 | val profileImagePath: String, 9 | ) 10 | -------------------------------------------------------------------------------- /navigator/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /navigator/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id(BuildPlugins.ANDROID_LIBRARY_PLUGIN) 3 | id(BuildPlugins.KOTLIN_ANDROID_PLUGIN) 4 | id(BuildPlugins.KOTLIN_KAPT) 5 | } 6 | 7 | android { 8 | compileSdk = ProjectProperties.COMPILE_SDK_VERSION 9 | 10 | defaultConfig { 11 | minSdk = ProjectProperties.MIN_SDK_VERSION 12 | targetSdk = ProjectProperties.TARGET_SDK_VERSION 13 | 14 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 15 | } 16 | 17 | buildTypes { 18 | release { 19 | isMinifyEnabled = false 20 | proguardFiles( 21 | getDefaultProguardFile("proguard-android-optimize.txt"), 22 | "proguard-rules.pro" 23 | ) 24 | } 25 | } 26 | 27 | compileOptions { 28 | sourceCompatibility = ProjectProperties.JAVA_VERSION 29 | targetCompatibility = ProjectProperties.JAVA_VERSION 30 | } 31 | 32 | kotlinOptions { 33 | jvmTarget = ProjectProperties.JAVA_VERSION.toString() 34 | } 35 | } 36 | 37 | dependencies { 38 | 39 | implementation("androidx.core:core-ktx:1.7.0") 40 | implementation("androidx.appcompat:appcompat:1.4.2") 41 | implementation("com.google.android.material:material:1.6.1") 42 | } 43 | -------------------------------------------------------------------------------- /navigator/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/navigator/consumer-rules.pro -------------------------------------------------------------------------------- /navigator/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /navigator/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /navigator/src/main/java/com/comit/navigator/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/navigator/src/main/java/com/comit/navigator/.gitkeep -------------------------------------------------------------------------------- /remote/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /remote/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/remote/consumer-rules.pro -------------------------------------------------------------------------------- /remote/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /remote/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/remote/src/main/java/com/comit/remote/.gitkeep -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/api/EmailAPI.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.api 2 | 3 | import com.comit.remote.request.emails.EmailCodeRequest 4 | import retrofit2.http.Body 5 | import retrofit2.http.GET 6 | import retrofit2.http.POST 7 | import retrofit2.http.Query 8 | 9 | interface EmailAPI { 10 | 11 | @POST("$EMAILS/code") 12 | suspend fun sendEmailCode( 13 | @Body request: EmailCodeRequest, 14 | ) 15 | 16 | @GET("$EMAILS") 17 | suspend fun checkEmailCode( 18 | @Query("email") email: String, 19 | @Query("code") code: String, 20 | ) 21 | 22 | private companion object { 23 | const val EMAILS = "emails" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/api/FilesAPI.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.api 2 | 3 | import com.comit.remote.response.files.FileListResponse 4 | import com.comit.remote.response.files.FileResponse 5 | import okhttp3.MultipartBody 6 | import retrofit2.http.Multipart 7 | import retrofit2.http.POST 8 | import retrofit2.http.Part 9 | 10 | interface FilesAPI { 11 | 12 | @Multipart 13 | @POST("$FILES") 14 | suspend fun uploadFile( 15 | @Part file: MultipartBody.Part, 16 | ): FileResponse 17 | 18 | @POST("$FILES/list") 19 | suspend fun uploadFileList( 20 | @Part files: List, 21 | ): FileListResponse 22 | 23 | private companion object { 24 | const val FILES = "files" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/api/MenuAPI.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.api 2 | 3 | import com.comit.remote.response.menu.MenuResponse 4 | import com.comit.remote.response.menu.PublicMenuResponse 5 | import retrofit2.http.GET 6 | import retrofit2.http.Query 7 | import java.util.Date 8 | 9 | interface MenuAPI { 10 | 11 | @GET("$MENU") 12 | suspend fun fetchMenu( 13 | @Query("start_at") startAt: String, 14 | @Query("end_at") endAt: String, 15 | ): MenuResponse 16 | 17 | @GET("$MENU/public") 18 | suspend fun fetchPublicMenu( 19 | @Query("date") date: Date, 20 | ): PublicMenuResponse 21 | 22 | private companion object { 23 | const val MENU = "menu" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/datasource/RemoteEmailDataSourceImpl.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.datasource 2 | 3 | import com.comit.data.datasource.RemoteEmailDataSource 4 | import com.comit.data.util.simTongApiCall 5 | import com.comit.remote.api.EmailAPI 6 | import com.comit.remote.request.emails.EmailCodeRequest 7 | import javax.inject.Inject 8 | 9 | class RemoteEmailDataSourceImpl @Inject constructor( 10 | private val emailAPI: EmailAPI, 11 | ) : RemoteEmailDataSource { 12 | 13 | override suspend fun sendEmailCode( 14 | email: String, 15 | ) = simTongApiCall { 16 | emailAPI.sendEmailCode( 17 | request = EmailCodeRequest( 18 | email = email, 19 | ), 20 | ) 21 | } 22 | 23 | override suspend fun checkEmailCode( 24 | email: String, 25 | code: String, 26 | ) = simTongApiCall { 27 | emailAPI.checkEmailCode( 28 | email = email, 29 | code = code, 30 | ) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/datasource/RemoteFileDataSourceImpl.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.datasource 2 | 3 | import com.comit.data.datasource.RemoteFileDataSource 4 | import com.comit.data.util.simTongApiCall 5 | import com.comit.remote.api.FilesAPI 6 | import okhttp3.MultipartBody 7 | import javax.inject.Inject 8 | 9 | class RemoteFileDataSourceImpl @Inject constructor( 10 | private val repository: FilesAPI, 11 | ) : RemoteFileDataSource { 12 | 13 | override suspend fun uploadFile( 14 | file: MultipartBody.Part, 15 | ): String = simTongApiCall { 16 | repository.uploadFile( 17 | file = file, 18 | ).filePath 19 | } 20 | 21 | override suspend fun uploadFileList( 22 | files: List, 23 | ): List = simTongApiCall { 24 | repository.uploadFileList( 25 | files = files, 26 | ).filePathList 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/datasource/RemoteMenuDataSourceImpl.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.datasource 2 | 3 | import com.comit.data.datasource.RemoteMenuDataSource 4 | import com.comit.data.util.simTongApiCall 5 | import com.comit.model.MenuList 6 | import com.comit.remote.api.MenuAPI 7 | import com.comit.remote.mapper.toModel 8 | import java.util.Date 9 | import javax.inject.Inject 10 | 11 | class RemoteMenuDataSourceImpl @Inject constructor( 12 | private val menuAPI: MenuAPI, 13 | ) : RemoteMenuDataSource { 14 | 15 | override suspend fun fetchMenu( 16 | startAt: String, 17 | endAt: String, 18 | ): MenuList = simTongApiCall { 19 | menuAPI.fetchMenu( 20 | startAt = startAt, 21 | endAt = endAt, 22 | ).toModel() 23 | } 24 | 25 | override suspend fun fetchPublicMenu( 26 | date: Date, 27 | ): MenuList = simTongApiCall { 28 | menuAPI.fetchPublicMenu( 29 | date = date, 30 | ).toModel() 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/commons/ChangePasswordRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.commons 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class ChangePasswordRequest( 6 | @SerializedName("password") 7 | val password: String, 8 | 9 | @SerializedName("new_password") 10 | val newPassword: String, 11 | ) 12 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/commons/EmployeeNumberRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.commons 2 | 3 | import com.google.gson.annotations.SerializedName 4 | import java.util.UUID 5 | 6 | data class EmployeeNumberRequest( 7 | 8 | @field:SerializedName("name") 9 | val name: String, 10 | 11 | @field:SerializedName("spotId") 12 | val spotId: UUID, 13 | 14 | @field:SerializedName("email") 15 | val email: String, 16 | ) 17 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/commons/InitializationPasswordRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.commons 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class InitializationPasswordRequest( 6 | @SerializedName("email") 7 | val email: String, 8 | @SerializedName("employee_number") 9 | val employeeNumber: Int, 10 | @SerializedName("new_password") 11 | val newPassword: String, 12 | ) 13 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/commons/ReissueTokenRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.commons 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class ReissueTokenRequest( 6 | 7 | @field:SerializedName("Refresh-Token") 8 | val refreshToken: String, 9 | ) 10 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/emails/CheckEmailCodeRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.emails 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class CheckEmailCodeRequest( 6 | 7 | @field:SerializedName("email") 8 | val email: String, 9 | 10 | @field:SerializedName("code") 11 | val code: String, 12 | ) 13 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/emails/EmailCodeRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.emails 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class EmailCodeRequest( 6 | 7 | @field:SerializedName("email") 8 | val email: String, 9 | ) 10 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/files/FileRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.files 2 | 3 | import com.google.gson.annotations.SerializedName 4 | import java.io.File 5 | 6 | data class FileRequest( 7 | 8 | @field:SerializedName("file") 9 | val file: File, 10 | ) 11 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/holidays/DayOffRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.holidays 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class DayOffRequest( 6 | 7 | @field:SerializedName("date") 8 | val date: String 9 | ) 10 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/holidays/HolidaysRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.holidays 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class HolidaysRequest( 6 | 7 | @field:SerializedName("years") 8 | val years: Int, 9 | 10 | @field:SerializedName("months") 11 | val months: Int, 12 | ) 13 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/holidays/SetAnnualRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.holidays 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class SetAnnualRequest( 6 | 7 | @field:SerializedName("date") 8 | val date: String 9 | ) 10 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/holidays/SetWorkRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.holidays 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class SetWorkRequest( 6 | 7 | @field:SerializedName("date") 8 | val date: String 9 | ) 10 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/holidays/SimpleHolidaysRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.holidays 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class SimpleHolidaysRequest( 6 | 7 | @field:SerializedName("years") 8 | val years: Int, 9 | 10 | @field:SerializedName("months") 11 | val months: Int, 12 | ) 13 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/menu/MenuRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.menu 2 | 3 | import com.google.gson.annotations.SerializedName 4 | import java.util.Date 5 | 6 | data class MenuRequest( 7 | 8 | @field:SerializedName("date") 9 | val date: Date, 10 | ) 11 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/schedules/AddPersonalScheduleRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.schedules 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class AddPersonalScheduleRequest( 6 | 7 | @SerializedName("title") 8 | val title: String, 9 | 10 | @SerializedName("start_at") 11 | val startAt: String, 12 | 13 | @SerializedName("end_at") 14 | val endAt: String, 15 | 16 | @SerializedName("alarm") 17 | val alarm: String ?, 18 | ) 19 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/schedules/ChangePersonalScheduleRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.schedules 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class ChangePersonalScheduleRequest( 6 | 7 | @SerializedName("title") 8 | val title: String, 9 | 10 | @SerializedName("start_at") 11 | val startAt: String, 12 | 13 | @SerializedName("end_at") 14 | val endAt: String, 15 | 16 | @SerializedName("alarm") 17 | val alarm: String?, 18 | ) 19 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/users/ChangeEmailRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.users 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class ChangeEmailRequest( 6 | 7 | @field:SerializedName("email") 8 | val email: String, 9 | ) 10 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/users/ChangeNicknameRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.users 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class ChangeNicknameRequest( 6 | 7 | @field:SerializedName("nickname") 8 | val nickname: String, 9 | ) 10 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/users/ChangePasswordRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.users 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class ChangePasswordRequest( 6 | 7 | @field:SerializedName("email") 8 | val email: String, 9 | 10 | @field:SerializedName("employee_number") 11 | val employeeNumber: String, 12 | 13 | @field:SerializedName("new_password") 14 | val newPassword: String, 15 | ) 16 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/users/ChangeProfileImageRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.users 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class ChangeProfileImageRequest( 6 | @SerializedName("profile_image_path") 7 | val profileImagePath: String, 8 | ) 9 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/users/ChangeSpotRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.users 2 | 3 | import com.google.gson.annotations.SerializedName 4 | import java.util.UUID 5 | 6 | data class ChangeSpotRequest( 7 | @SerializedName("spot_id") 8 | val spotId: UUID, 9 | ) 10 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/users/SignInRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.users 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class SignInRequest( 6 | 7 | @field:SerializedName("employee_number") 8 | val employeeNumber: Int, 9 | 10 | @field:SerializedName("password") 11 | val password: String, 12 | 13 | @field:SerializedName("device_token") 14 | val deviceToken: String, 15 | ) 16 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/users/SignUpRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.users 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class SignUpRequest( 6 | @field:SerializedName("name") 7 | val name: String, 8 | 9 | @field:SerializedName("employee_number") 10 | val employeeNumber: Int, 11 | 12 | @field:SerializedName("email") 13 | val email: String, 14 | 15 | @field:SerializedName("password") 16 | val password: String, 17 | 18 | @field:SerializedName("nickname") 19 | val nickname: String?, 20 | 21 | @field:SerializedName("profile_image_path") 22 | val profileImagePath: String?, 23 | 24 | @field:SerializedName("device_token") 25 | val deviceToken: String, 26 | ) 27 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/request/users/VerificationEmployeeRequest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.request.users 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class VerificationEmployeeRequest( 6 | 7 | @field:SerializedName("name") 8 | val name: String, 9 | 10 | @field:SerializedName("employee_number") 11 | val employeeNumber: Int, 12 | ) 13 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/commons/EmployeeNumberResponse.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.response.commons 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class EmployeeNumberResponse( 6 | 7 | @field:SerializedName("employee_number") 8 | val employeeNumber: String, 9 | ) 10 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/commons/FetchSpotsResponse.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.response.commons 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class FetchSpotsResponse( 6 | @SerializedName("spot_list") 7 | val spotList: List 8 | ) { 9 | data class Spot( 10 | @SerializedName("id") 11 | val id: String, 12 | @SerializedName("name") 13 | val name: String, 14 | @SerializedName("location") 15 | val location: String, 16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/commons/ReissueTokenResponse.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.response.commons 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class ReissueTokenResponse( 6 | 7 | @field:SerializedName("access_token") 8 | val accessToken: String, 9 | 10 | @field:SerializedName("access_token_exp") 11 | val accessTokenExp: String, 12 | 13 | @field:SerializedName("refresh_token") 14 | val refreshToken: String, 15 | ) 16 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/emails/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Team-ComIT/SimTong-Android/48293d51264908cc2f1ece572bf42c8c2f93880d/remote/src/main/java/com/comit/remote/response/emails/.gitkeep -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/files/FileListResponse.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.response.files 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class FileListResponse( 6 | @SerializedName("file_path_list") 7 | val filePathList: List, 8 | ) 9 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/files/FileResponse.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.response.files 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class FileResponse( 6 | 7 | @field:SerializedName("file_path") 8 | val filePath: String, 9 | ) 10 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/holidays/CheckLeftHolidayResponse.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.response.holidays 2 | 3 | data class CheckLeftHolidayResponse( 4 | val result: Int, 5 | ) 6 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/holidays/FetchHolidaysResponse.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.response.holidays 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class FetchHolidaysResponse( 6 | 7 | @field:SerializedName("holidays") 8 | val holidays: List 9 | ) { 10 | 11 | data class Holiday( 12 | 13 | @field:SerializedName("date") 14 | val date: String, 15 | 16 | @field:SerializedName("type") 17 | val title: String, 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/menu/MenuResponse.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.response.menu 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class MenuResponse( 6 | 7 | @field:SerializedName("menu") 8 | val menu: List, 9 | ) { 10 | data class Menu( 11 | 12 | @field:SerializedName("date") 13 | val date: String, 14 | 15 | @field:SerializedName("meal") 16 | val meal: String, 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/menu/PublicMenuResponse.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.response.menu 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class PublicMenuResponse( 6 | 7 | @field:SerializedName("menu") 8 | val menu: List, 9 | ) { 10 | data class Menu( 11 | 12 | @field:SerializedName("date") 13 | val date: String, 14 | 15 | @field:SerializedName("meal") 16 | val meal: String, 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/schedules/FetchPersonalScheduleResponse.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.response.schedules 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class FetchPersonalScheduleResponse( 6 | 7 | @field:SerializedName("schedules") 8 | val schedules: List, 9 | ) { 10 | data class Schedule( 11 | 12 | @field:SerializedName("id") 13 | val id: String, 14 | 15 | @field:SerializedName("start_at") 16 | val startAt: String, 17 | 18 | @field:SerializedName("end_at") 19 | val endAt: String, 20 | 21 | @field:SerializedName("title") 22 | val title: String, 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/users/FetchUserInformationResponse.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.response.users 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class FetchUserInformationResponse( 6 | 7 | @field:SerializedName("name") 8 | val name: String, 9 | 10 | @field:SerializedName("email") 11 | val email: String, 12 | 13 | @field:SerializedName("nickname") 14 | val nickname: String, 15 | 16 | @field:SerializedName("spot") 17 | val spot: String, 18 | 19 | @field:SerializedName("profile_image_path") 20 | val profileImagePath: String, 21 | ) 22 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/users/SignInResponse.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.response.users 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class SignInResponse( 6 | 7 | @field:SerializedName("access_token") 8 | val accessToken: String, 9 | 10 | @field:SerializedName("access_token_exp") 11 | val accessTokenExp: String, 12 | 13 | @field:SerializedName("refresh_token") 14 | val refreshToken: String, 15 | ) 16 | -------------------------------------------------------------------------------- /remote/src/main/java/com/comit/remote/response/users/SignUpResponse.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote.response.users 2 | 3 | import com.google.gson.annotations.SerializedName 4 | 5 | data class SignUpResponse( 6 | 7 | @field:SerializedName("access_token") 8 | val accessToken: String, 9 | 10 | @field:SerializedName("access_token_exp") 11 | val accessTokenExp: String, 12 | 13 | @field:SerializedName("refresh_token") 14 | val refreshToken: String, 15 | ) 16 | -------------------------------------------------------------------------------- /remote/src/test/java/com/comit/remote/ExampleUnitTest.kt: -------------------------------------------------------------------------------- 1 | package com.comit.remote 2 | 3 | import junit.framework.Assert.assertEquals 4 | import org.junit.Test 5 | 6 | /** 7 | * Example local unit test, which will execute on the development machine (host). 8 | * 9 | * See [testing documentation](http://d.android.com/tools/testing). 10 | */ 11 | class ExampleUnitTest { 12 | @Test 13 | fun addition_isCorrect() { 14 | assertEquals(4, 2 + 2) 15 | } 16 | } 17 | --------------------------------------------------------------------------------