refactor(iam): align roles pattern and fix eslint - #232
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dimpram101
approved these changes
Jul 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Memperbaiki puluhan ESLint error di modul IAM Access (Role & Role Group) yang muncul setelah penerapan
eslint-local-rules, memigrasi komponen UI ke arsitektur terbaru.Perubahan
ESLint & TypeScript Fixes
index.vuedanmembers.vue.useRoleForm.ts&useRoleGroupForm.ts— memperbaiki penanganan mutations sesuai linter; menyematkanisLoading.value = truesebelum bloktry(clean up), serta menambahkantoast.error(errorMessage)di setiap blokcatch.useRolePermission.ts& Lainnya — memberantas peringatan tipe data dengan membuang inline-casting usang (as any), serta menghapus parameter generic type ganda yang redundan di panggilanuseAsyncData.booleansesuai linter menjadiisChangeGroupModalOpen,isPermissionModalOpen, dsb.Functional Fixes
roles.ts(Types) — membalut tipe dasar respons denganApiResponseSchema(...)agar representasi kembalian tipe secara client-side (di seluruh aplikasi) konsisten mereturn pola{ data: { result: [...] } }.edit.vue— menghapus penggunaan siklusonMountedpada form edit dan mengandalkanwatchber-param{ immediate: true }pada turunan composable detail (Single data fetching).use[Name]List.ts— mengatasi bug caching static bawaan Nuxt dengan menyisipkan ID dinamisuseId()ke dalam properti kunciuseAsyncData. Hal ini memungkinkan daftar tabel di-refresh (fetching) otomatis ketika redirect balik dari halaman create.index.vue— menyingkirkan pendefinisian variabel sisa (query/page) di komponen UI (view) dan memindahkannya seutuhnya ke composable (Separation of Concern).UI/UX
SearchableSelectlawas menjadiSearchSelectyang lebih efisien dan modern (termasuk pada form relasional Role Group).ServerDataTable(V1) keServerDataTableV2. Prop sisa warisan V1 sepertifilter-container="#filterSearch",:with-visibility-toggle, dan@update:searchtelah dibersihkan demi kepatuhan props.RolePermissionModal.vue— melakukan restrukturisasi CSS grid/flex; membungkus sel dan header tombol Revoke dalam div rata tengah (flex justify-center,text-center) sehingga kata "Aksi" sejajar sempurna dengan tombol aksinya.Checklist
npx eslintpadaapp/pages/iam,app/components/iam,app/composables/iam)Tampilan
Closes #231