Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/citizen-pwa/src/hooks/usePublicIncidents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ function isPublicIncidentData(value: unknown): value is Omit<PublicIncident, 'id
!!location &&
typeof location === 'object' &&
typeof (location as Record<string, unknown>).lat === 'number' &&
Number.isFinite((location as Record<string, unknown>).lat as number) &&
Number.isFinite((location as Record<string, unknown>).lat) &&
typeof (location as Record<string, unknown>).lng === 'number' &&
Number.isFinite((location as Record<string, unknown>).lng as number)
Number.isFinite((location as Record<string, unknown>).lng)
)
}

Expand Down
4 changes: 2 additions & 2 deletions apps/citizen-pwa/src/services/draft-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ function getDraftStorage(): DraftStorage {
_draftStorage ??= localforage.createInstance({
name: 'bantayog-drafts',
storeName: 'drafts',
}) as unknown as DraftStorage
})
return _draftStorage
}

function getPhotoStorage(): PhotoStorage {
_photoStorage ??= localforage.createInstance({
name: 'bantayog-photos',
storeName: 'photos',
}) as unknown as PhotoStorage
})
return _photoStorage
}

Expand Down
6 changes: 2 additions & 4 deletions apps/responder-app/src/hooks/useDispatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ export function useDispatch(dispatchId: string | undefined) {
return
}

const parsed = dispatchDocSchema.parse(
normalizeDispatchSnapshot(snap.data() as Record<string, unknown>),
)
const parsed = dispatchDocSchema.parse(normalizeDispatchSnapshot(snap.data()))
setDispatch({
...parsed,
dispatchId: snap.id,
Expand All @@ -106,7 +104,7 @@ export function useDispatch(dispatchId: string | undefined) {
(err) => {
const error = err as { code?: string; message?: string }
console.error('[useDispatch] listener error:', error.code, error.message)
setError(err as Error)
setError(err)
setLoading(false)
},
)
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion functions/lib/__tests__/helpers/rules-harness.d.ts.map

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

17 changes: 11 additions & 6 deletions functions/lib/__tests__/helpers/rules-harness.js

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

2 changes: 1 addition & 1 deletion functions/lib/__tests__/helpers/rules-harness.js.map

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

14 changes: 12 additions & 2 deletions functions/lib/__tests__/helpers/seed-factories.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,23 @@ export declare function seedResponder(env: RulesTestEnvironment, responderId: st
* Seeds a dispatches document using RulesTestEnvironment context.
* Use with env.withSecurityRulesDisabled() — not for Firestore admin SDK use.
*/
export declare function seedDispatchRT(env: RulesTestEnvironment, dispatchId: string, overrides?: Partial<Record<string, unknown> & {
export interface DispatchSeed {
municipalityId?: string;
reportId?: string;
agencyId?: string;
priority?: string;
status?: string;
assignedResponderUids?: string[];
createdAt?: number;
updatedAt?: number;
schemaVersion?: number;
assignedTo?: {
uid?: string;
agencyId?: string;
municipalityId?: string;
};
}>): Promise<void>;
}
export declare function seedDispatchRT(env: RulesTestEnvironment, dispatchId: string, overrides?: Partial<DispatchSeed>): Promise<void>;
import type { Firestore } from 'firebase-admin/firestore';
import type { Database } from 'firebase-admin/database';
interface SeedVerifiedReportOptions {
Expand Down
2 changes: 1 addition & 1 deletion functions/lib/__tests__/helpers/seed-factories.d.ts.map

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

Loading
Loading