Skip to content

Commit

Permalink
Merge pull request #10 from f-lab-edu/feature/4-job-posting-detail
Browse files Browse the repository at this point in the history
[#4] 공고 상세 보기 기능 구현
  • Loading branch information
Younggun-Kim authored Oct 20, 2024
2 parents 9dabd14 + 1562e57 commit 82a9238
Show file tree
Hide file tree
Showing 44 changed files with 2,057 additions and 96 deletions.
6 changes: 5 additions & 1 deletion assets/translations/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@
"workHours": "근무시간",
"numberOfPeopleUnit": "",
"wonUnit": "",
"register": "등록하기"
"register": "등록하기",
"serverError": "서버 에러",
"travelTimeGuideDescription": "긱워커가 현장에서 일할 때\n이동시간이 있는지 체크하는 부분입니다.\n\n비급여시 근무시간에서 이동시간을\n제외해서 급여가 측정됩니다.",
"breakTimeGuideDescription": "긱워커가 현장에서 일할 때\n휴게시간이 있는지 체크하는 부분입니다.\n\n비급여시 근무시간에서 휴게시간을\n제외해서 급여가 측정됩니다.",
"mealGuideDescription": "긱워커가 현장에서 일할 때\n식비를 지급하는 체크하는 부분입니다."
}
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
PODS:
- Flutter (1.0.0)
- flutter_keyboard_visibility (0.0.1):
- Flutter
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS

DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)

EXTERNAL SOURCES:
Flutter:
:path: Flutter
flutter_keyboard_visibility:
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78

PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
Expand Down
17 changes: 17 additions & 0 deletions lib/core/network/api_response.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,20 @@ abstract class FailResponse with _$FailResponse {
factory FailResponse.fromJson(Map<String, dynamic> json) =>
_$FailResponseFromJson(json);
}

extension ApiResponseExt on ApiResponse {
bool get isSuccess => maybeWhen(
success: (_) => true,
orElse: () => false,
);

bool get isFail => maybeWhen(
fail: (_) => true,
orElse: () => false,
);

bool get isError => maybeWhen(
error: () => true,
orElse: () => false,
);
}
4 changes: 4 additions & 0 deletions lib/core/router/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ class AppRouter extends RootStackRouter {
page: JobPostingFormRoute.page,
path: '/job-posting-form',
),
AutoRoute(
page: JobPostingDetailRoute.page,
path: '/job-posting-detail',
),
];
}
88 changes: 69 additions & 19 deletions lib/core/router/router.gr.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions lib/core/types/contract_type.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:withu_app/core/core.dart';

/// 계약 타입
@JsonEnum(valueField: 'serverKey')
enum ContractType with L10nKeyProvider {
/// 단기
short(l10nKey: 'shortTerm', serverKey: 'SHORT_TERM'),
Expand Down
2 changes: 2 additions & 0 deletions lib/core/types/job_category_type.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:withu_app/core/core.dart';

/// 직업 종류
@JsonEnum(valueField: 'serverKey')
enum JobCategoryType with L10nKeyProvider {
/// 촬영
photography(l10nKey: 'photography', serverKey: 'PHOTOGRAPHY'),
Expand Down
2 changes: 2 additions & 0 deletions lib/core/types/pay_type.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:withu_app/core/core.dart';

/// 급여 타입
@JsonEnum(valueField: 'serverKey')
enum PayType with L10nKeyProvider {
/// 시급
hour(l10nKey: 'hourlyWage', serverKey: 'HOURLY'),
Expand Down
22 changes: 22 additions & 0 deletions lib/core/utils/either/either.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import 'package:freezed_annotation/freezed_annotation.dart';

part 'either.freezed.dart';

@freezed
class Either<T> with _$Either<T> {
const factory Either.success(T data) = _Success<T>;

const factory Either.fail(String message) = _Fail;
}

extension EitherExt on Either {
bool get isSuccess => maybeWhen(
success: (_) => true,
orElse: () => false,
);

bool get isFail => maybeWhen(
fail: (_) => true,
orElse: () => false,
);
}
Loading

0 comments on commit 82a9238

Please sign in to comment.