feat(miniapp): refine UI and add utility bill management

- Fix collapsible padding and button spacing
- Add subtotal to balance card
- Add utility bill management for admins
- Fix lints and type checks across the monorepo
- Implement rejectPendingHouseholdMember in repository and service
This commit is contained in:
2026-03-13 05:52:34 +04:00
parent 25c4928ca9
commit 94a5904f54
58 changed files with 5400 additions and 7006 deletions

View File

@@ -110,6 +110,19 @@ export interface MiniAppAdminService {
reason: 'not_admin' | 'pending_not_found'
}
>
rejectPendingMember(input: {
householdId: string
actorIsAdmin: boolean
pendingTelegramUserId: string
}): Promise<
| {
status: 'rejected_member'
}
| {
status: 'rejected'
reason: 'not_admin' | 'pending_not_found'
}
>
promoteMemberToAdmin(input: {
householdId: string
actorIsAdmin: boolean
@@ -536,6 +549,31 @@ export function createMiniAppAdminService(
}
},
async rejectPendingMember(input) {
if (!input.actorIsAdmin) {
return {
status: 'rejected',
reason: 'not_admin'
}
}
const success = await repository.rejectPendingHouseholdMember({
householdId: input.householdId,
telegramUserId: input.pendingTelegramUserId
})
if (!success) {
return {
status: 'rejected',
reason: 'pending_not_found'
}
}
return {
status: 'rejected_member'
}
},
async promoteMemberToAdmin(input) {
if (!input.actorIsAdmin) {
return {