Update web-app to use @evidencija-rezija/shared-code for common types and utilities instead of maintaining duplicate copies. Changes: - Add shared-code dependency to package.json - Update all imports across 35+ files to use @evidencija-rezija/shared-code - Remove duplicate db-types.ts and shareChecksum.ts files This ensures type consistency between web-app and email-worker and reduces maintenance burden. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
24 lines
851 B
TypeScript
24 lines
851 B
TypeScript
import { FC } from "react"
|
|
import { Bill } from "@evidencija-rezija/shared-code"
|
|
import { TicketIcon } from "@heroicons/react/24/outline"
|
|
|
|
export interface BillBadgeProps {
|
|
locationId: string,
|
|
bill: Pick<Bill, 'name' | 'paid' | 'hasAttachment' | 'proofOfPayment'>,
|
|
onClick?: () => void
|
|
};
|
|
|
|
export const BillToggleBadge:FC<BillBadgeProps> = ({ bill: { name, paid, hasAttachment, proofOfPayment }, onClick}) => {
|
|
|
|
const className = `badge badge-lg ${paid?"badge-success":" badge-outline"} ${ !paid && hasAttachment ? "btn-outline btn-success" : "" } cursor-pointer`;
|
|
|
|
return (
|
|
<div className={className} onClick={onClick}>
|
|
{name}
|
|
{
|
|
proofOfPayment?.uploadedAt ?
|
|
<TicketIcon className="h-[1em] w-[1em] inline-block ml-1" /> : null
|
|
}
|
|
</div>
|
|
);
|
|
} |