feat: Complete Admin Phase 1 Event screens migration
- Migrate 8 admin event screens to OS_Wrapper (dashboard, lists, detail, forms, utility) - Add enableKeyboardHandling to 3 form screens (reject-input, type-create, type-update) - Migrate ScreenEventTypeOfEvent from Voting to OS_Wrapper - Update TASK-005 with Admin Phase 1 completion status - Total: 140 files migrated (~83% complete) Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
import {
|
||||
AlertDefaultSystem,
|
||||
BoxButtonOnFooter,
|
||||
OS_Wrapper,
|
||||
TextAreaCustom,
|
||||
ViewWrapper,
|
||||
} from "@/components";
|
||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
||||
@@ -107,20 +107,20 @@ export default function AdminEventRejectInput() {
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<ViewWrapper
|
||||
footerComponent={buttonSubmit}
|
||||
headerComponent={<AdminBackButtonAntTitle title="Penolakan Event" />}
|
||||
>
|
||||
<TextAreaCustom
|
||||
value={data}
|
||||
onChangeText={setData}
|
||||
placeholder="Masukan alasan"
|
||||
required
|
||||
showCount
|
||||
maxLength={1000}
|
||||
/>
|
||||
</ViewWrapper>
|
||||
</>
|
||||
<OS_Wrapper
|
||||
enableKeyboardHandling
|
||||
contentPaddingBottom={250}
|
||||
footerComponent={buttonSubmit}
|
||||
headerComponent={<AdminBackButtonAntTitle title="Penolakan Event" />}
|
||||
>
|
||||
<TextAreaCustom
|
||||
value={data}
|
||||
onChangeText={setData}
|
||||
placeholder="Masukan alasan"
|
||||
required
|
||||
showCount
|
||||
maxLength={1000}
|
||||
/>
|
||||
</OS_Wrapper>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Spacing, StackCustom, ViewWrapper } from "@/components";
|
||||
import { OS_Wrapper, Spacing, StackCustom } from "@/components";
|
||||
import { IconArchive } from "@/components/_Icon";
|
||||
import {
|
||||
IconList,
|
||||
@@ -65,17 +65,15 @@ export default function AdminVoting() {
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
<ViewWrapper>
|
||||
<AdminTitlePage title="Event" />
|
||||
<Spacing />
|
||||
<OS_Wrapper>
|
||||
<AdminTitlePage title="Event" />
|
||||
<Spacing />
|
||||
|
||||
<StackCustom gap={"xs"}>
|
||||
{listData.map((item, i) => (
|
||||
<AdminComp_BoxDashboard key={i} item={item} />
|
||||
))}
|
||||
</StackCustom>
|
||||
</ViewWrapper>
|
||||
</>
|
||||
<StackCustom gap={"xs"}>
|
||||
{listData.map((item, i) => (
|
||||
<AdminComp_BoxDashboard key={i} item={item} />
|
||||
))}
|
||||
</StackCustom>
|
||||
</OS_Wrapper>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
BoxButtonOnFooter,
|
||||
ButtonCustom,
|
||||
OS_Wrapper,
|
||||
TextInputCustom,
|
||||
ViewWrapper,
|
||||
} from "@/components";
|
||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||
import { apiEventCreateTypeOfEvent } from "@/service/api-admin/api-master-admin";
|
||||
@@ -50,17 +50,17 @@ export default function AdminEventTypeOfEventCreate() {
|
||||
</BoxButtonOnFooter>
|
||||
);
|
||||
return (
|
||||
<>
|
||||
<ViewWrapper
|
||||
headerComponent={<AdminBackButtonAntTitle title="Tambah Tipe Acara" />}
|
||||
footerComponent={buttonSubmit}
|
||||
>
|
||||
<TextInputCustom
|
||||
placeholder="Masukkan Tipe Acara"
|
||||
value={value}
|
||||
onChangeText={setValue}
|
||||
/>
|
||||
</ViewWrapper>
|
||||
</>
|
||||
<OS_Wrapper
|
||||
enableKeyboardHandling
|
||||
contentPaddingBottom={250}
|
||||
headerComponent={<AdminBackButtonAntTitle title="Tambah Tipe Acara" />}
|
||||
footerComponent={buttonSubmit}
|
||||
>
|
||||
<TextInputCustom
|
||||
placeholder="Masukkan Tipe Acara"
|
||||
value={value}
|
||||
onChangeText={setValue}
|
||||
/>
|
||||
</OS_Wrapper>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
import {
|
||||
BoxButtonOnFooter,
|
||||
ButtonCustom,
|
||||
OS_Wrapper,
|
||||
Spacing,
|
||||
TextCustom,
|
||||
TextInputCustom,
|
||||
ViewWrapper,
|
||||
} from "@/components";
|
||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
@@ -89,25 +89,25 @@ export default function AdminEventTypeOfEventUpdate() {
|
||||
</BoxButtonOnFooter>
|
||||
);
|
||||
return (
|
||||
<>
|
||||
<ViewWrapper
|
||||
headerComponent={<AdminBackButtonAntTitle title="Ubah Tipe Acara" />}
|
||||
footerComponent={buttonSubmit}
|
||||
>
|
||||
<TextInputCustom
|
||||
placeholder="Masukkan Tipe Acara"
|
||||
value={data.name}
|
||||
onChangeText={(text) => setData({ ...data, name: text })}
|
||||
/>
|
||||
<OS_Wrapper
|
||||
enableKeyboardHandling
|
||||
contentPaddingBottom={250}
|
||||
headerComponent={<AdminBackButtonAntTitle title="Ubah Tipe Acara" />}
|
||||
footerComponent={buttonSubmit}
|
||||
>
|
||||
<TextInputCustom
|
||||
placeholder="Masukkan Tipe Acara"
|
||||
value={data.name}
|
||||
onChangeText={(text) => setData({ ...data, name: text })}
|
||||
/>
|
||||
|
||||
<TextCustom>Aktivasi</TextCustom>
|
||||
<Spacing height={10} />
|
||||
<Switch
|
||||
color={MainColor.yellow}
|
||||
value={data.active}
|
||||
onValueChange={(value) => setData({ ...data, active: value })}
|
||||
/>
|
||||
</ViewWrapper>
|
||||
</>
|
||||
<TextCustom>Aktivasi</TextCustom>
|
||||
<Spacing height={10} />
|
||||
<Switch
|
||||
color={MainColor.yellow}
|
||||
value={data.active}
|
||||
onValueChange={(value) => setData({ ...data, active: value })}
|
||||
/>
|
||||
</OS_Wrapper>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
import { ActionIcon, AlertDefaultSystem, Spacing } from "@/components";
|
||||
import { ActionIcon, AlertDefaultSystem, OS_Wrapper, Spacing } from "@/components";
|
||||
import { IconDot } from "@/components/_Icon/IconComponent";
|
||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
||||
import AdminButtonReview from "@/components/_ShareComponent/Admin/ButtonReview";
|
||||
import NewWrapper from "@/components/_ShareComponent/NewWrapper";
|
||||
import ReportBox from "@/components/Box/ReportBox";
|
||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
@@ -133,7 +132,7 @@ export function Admin_ScreenEventDetail() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<NewWrapper
|
||||
<OS_Wrapper
|
||||
hideFooter
|
||||
headerComponent={headerComponent}
|
||||
// footerComponent={
|
||||
@@ -154,7 +153,7 @@ export function Admin_ScreenEventDetail() {
|
||||
|
||||
{footerComponent}
|
||||
<Spacing />
|
||||
</NewWrapper>
|
||||
</OS_Wrapper>
|
||||
|
||||
<EventDetailDrawer
|
||||
isVisible={openDrawer}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { OS_Wrapper } from "@/components";
|
||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||
import NewWrapper from "@/components/_ShareComponent/NewWrapper";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { PAGINATION_DEFAULT_TAKE } from "@/constants/constans-value";
|
||||
import { PADDING_INLINE, PAGINATION_DEFAULT_TAKE } from "@/constants/constans-value";
|
||||
import { createPaginationComponents } from "@/helpers/paginationHelpers";
|
||||
import { usePagination } from "@/hooks/use-pagination";
|
||||
import { apiAdminEventListOfParticipants } from "@/service/api-admin/api-admin-event";
|
||||
@@ -62,7 +62,8 @@ export function Admin_ScreenEventListOfParticipants() {
|
||||
});
|
||||
|
||||
return (
|
||||
<NewWrapper
|
||||
<OS_Wrapper
|
||||
contentPadding={PADDING_INLINE}
|
||||
listData={pagination.listData}
|
||||
renderItem={renderItem}
|
||||
keyExtractor={(item: any) => item.id.toString()}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { SearchInput } from "@/components";
|
||||
import { OS_Wrapper, SearchInput } from "@/components";
|
||||
import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage";
|
||||
import NewWrapper from "@/components/_ShareComponent/NewWrapper";
|
||||
import { MainColor } from "@/constants/color-palet";
|
||||
import { PAGINATION_DEFAULT_TAKE } from "@/constants/constans-value";
|
||||
import { createPaginationComponents } from "@/helpers/paginationHelpers";
|
||||
@@ -87,7 +86,7 @@ export function Admin_ScreenEventStatus() {
|
||||
});
|
||||
|
||||
return (
|
||||
<NewWrapper
|
||||
<OS_Wrapper
|
||||
listData={pagination.listData}
|
||||
renderItem={renderItem}
|
||||
keyExtractor={(item: any) => item.id.toString()}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import { BadgeCustom, TextCustom } from "@/components";
|
||||
import { BadgeCustom, OS_Wrapper, TextCustom } from "@/components";
|
||||
import AdminActionIconPlus from "@/components/_ShareComponent/Admin/ActionIconPlus";
|
||||
import AdminBasicBox from "@/components/_ShareComponent/Admin/AdminBasicBox";
|
||||
import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage";
|
||||
import GridTwoView from "@/components/_ShareComponent/GridTwoView";
|
||||
import { GridViewCustomSpan } from "@/components/_ShareComponent/GridViewCustomSpan";
|
||||
import NewWrapper from "@/components/_ShareComponent/NewWrapper";
|
||||
import { PAGINATION_DEFAULT_TAKE } from "@/constants/constans-value";
|
||||
import { createPaginationComponents } from "@/helpers/paginationHelpers";
|
||||
import { usePagination } from "@/hooks/use-pagination";
|
||||
@@ -131,7 +130,7 @@ export function Admin_ScreenEventTypeOfEvent() {
|
||||
});
|
||||
|
||||
return (
|
||||
<NewWrapper
|
||||
<OS_Wrapper
|
||||
listData={pagination.listData}
|
||||
renderItem={renderItem}
|
||||
keyExtractor={(item: any) => item.id?.toString() || `fallback-${item.id}`}
|
||||
|
||||
@@ -346,10 +346,29 @@ import { OS_Wrapper } from "@/components";
|
||||
- ✅ `screens/Admin/User-Access/ScreenUserAccess.tsx` - NewWrapper → OS_Wrapper (list with pagination + search)
|
||||
- ✅ `app/(application)/admin/user-access/[id]/index.tsx` - ViewWrapper → OS_Wrapper (detail with footer button)
|
||||
|
||||
## ⏳ Admin Phase 1: Event Management (Priority: HIGH)
|
||||
- [ ] `screens/Admin/Event/ScreenEventList.tsx`
|
||||
- [ ] `screens/Admin/Event/ScreenEventCreate.tsx` → pakai `enableKeyboardHandling` + `contentPaddingBottom={250}`
|
||||
- [ ] `screens/Admin/Event/ScreenEventEdit.tsx` → pakai `enableKeyboardHandling` + `contentPaddingBottom={250}`
|
||||
## ✅ Admin Phase 1: Event Management - COMPLETED (2026-04-14)
|
||||
|
||||
**Files migrated: 8**
|
||||
|
||||
#### Admin Event Dashboard & List Screens (OS_Wrapper):
|
||||
- ✅ `app/(application)/admin/event/index.tsx` - ViewWrapper → OS_Wrapper (dashboard screen)
|
||||
- ✅ `screens/Admin/Event/ScreenEventStatus.tsx` - NewWrapper → OS_Wrapper (list with search + pagination)
|
||||
- ✅ `screens/Admin/Event/ScreenEventListOfParticipants.tsx` - NewWrapper → OS_Wrapper (participant list with pagination)
|
||||
- ✅ `screens/Admin/Event/ScreenEventDetail.tsx` - NewWrapper → OS_Wrapper (detail screen)
|
||||
|
||||
#### Admin Event Form Screens (OS_Wrapper with enableKeyboardHandling):
|
||||
- ✅ `app/(application)/admin/event/[id]/reject-input.tsx` - ViewWrapper → OS_Wrapper + `enableKeyboardHandling` + `contentPaddingBottom={250}`
|
||||
- ✅ `app/(application)/admin/event/type-create.tsx` - ViewWrapper → OS_Wrapper + `enableKeyboardHandling` + `contentPaddingBottom={250}`
|
||||
- ✅ `app/(application)/admin/event/type-update.tsx` - ViewWrapper → OS_Wrapper + `enableKeyboardHandling` + `contentPaddingBottom={250}`
|
||||
|
||||
#### Admin Event Utility Screen:
|
||||
- ✅ `app/(application)/admin/event/type-of-event.tsx` - NewWrapper → OS_Wrapper (type list screen)
|
||||
|
||||
**Testing Status:**
|
||||
- ✅ TypeScript: No errors
|
||||
- ⏳ Build: Pending
|
||||
- ⏳ iOS Testing: Pending
|
||||
- ⏳ Android Testing: Pending
|
||||
|
||||
## ⏳ Admin Phase 2: Voting Management (Priority: HIGH)
|
||||
- [ ] `screens/Admin/Voting/ScreenVotingList.tsx`
|
||||
@@ -506,7 +525,7 @@ import { OS_Wrapper } from "@/components";
|
||||
### Admin Phases:
|
||||
| Phase | Total Files | Migrated | Testing | Status |
|
||||
|-------|-------------|----------|---------|--------|
|
||||
| Admin Phase 1 (Event) | ~3 | 0 | 0 | ⏳ Pending |
|
||||
| Admin Phase 1 (Event) | 8 | 8 | ✅ No errors | ✅ Complete |
|
||||
| Admin Phase 2 (Voting) | ~3 | 0 | 0 | ⏳ Pending |
|
||||
| Admin Phase 3 (Donation) | ~3 | 0 | 0 | ⏳ Pending |
|
||||
| Admin Phase 4 (Forum) | ~5 | 0 | 0 | ⏳ Pending |
|
||||
@@ -515,14 +534,14 @@ import { OS_Wrapper } from "@/components";
|
||||
| Admin Phase 7 (Investment) | ~3 | 0 | 0 | ⏳ Pending |
|
||||
| Admin Phase 8 (App Info) | ~4 | 0 | 0 | ⏳ Pending |
|
||||
| Admin Phase 9 (User Access) | 2 | 2 | 0 | ✅ Complete |
|
||||
| **Admin Total** | **~31** | **6** | **0** | **~19% Complete** |
|
||||
| **Admin Total** | **~37** | **14** | **0** | **~38% Complete** |
|
||||
|
||||
### Grand Total:
|
||||
| Category | Total Files | Migrated | Status |
|
||||
|----------|-------------|----------|--------|
|
||||
| **User Screens** | ~132 | 126 | ~95% Complete |
|
||||
| **Admin Screens** | ~31 | 6 | ~19% Complete |
|
||||
| **GRAND TOTAL** | **~167** | **132** | **~79% Complete** |
|
||||
| **Admin Screens** | ~37 | 14 | ~38% Complete |
|
||||
| **GRAND TOTAL** | **~169** | **140** | **~83% Complete** |
|
||||
|
||||
## 🔄 Rollback Plan
|
||||
|
||||
@@ -537,6 +556,6 @@ Jika ada issue yang tidak bisa di-fix dalam 1 jam:
|
||||
**Co-authored-by**: Qwen-Coder <qwen-coder@alibabacloud.com>
|
||||
**Created**: 2026-04-06
|
||||
**Last Updated**: 2026-04-14
|
||||
**Status**: User Phase 1-9 Complete ✅ | Admin Phase 6 & 9 Complete ✅ (132 files migrated)
|
||||
**Current**: Admin Phase 6 Complete ✅
|
||||
**Next**: Admin Phase 1-3 (HIGH Priority, ~9 files) OR User Phase 10-11 (~6 files)
|
||||
**Status**: User Phase 1-9 Complete ✅ | Admin Phase 1, 6 & 9 Complete ✅ (140 files migrated)
|
||||
**Current**: Admin Phase 1 Complete ✅
|
||||
**Next**: Admin Phase 2-3 (HIGH Priority, ~6 files) OR User Phase 10-11 (~6 files)
|
||||
|
||||
Reference in New Issue
Block a user