diff --git a/app/lib/actions/locationActions.ts b/app/lib/actions/locationActions.ts index fcf9439..86b5799 100644 --- a/app/lib/actions/locationActions.ts +++ b/app/lib/actions/locationActions.ts @@ -117,8 +117,22 @@ export const fetchAllLocations = withUser(async (user:AuthenticatedUser, year:nu }, { projection: { - // don't include the attachment binary data in the response - "bills.attachment.fileContentsBase64": 0 + "_id": 1, + // "userId": 0, + // "userEmail": 0, + "name": 1, + // "notes": 0, + // "yearMonth": 1, + "yearMonth.year": 1, + "yearMonth.month": 1, + // "bills": 1, + "bills._id": 1, + "bills.name": 1, + "bills.paid": 1, + "bills.payedAmount": 1, + // "bills.attachment": 0, + // "bills.notes": 0, + // "bills.barcodeImage": 1, }, } ) diff --git a/app/lib/auth.ts b/app/lib/auth.ts index 57657a7..501c647 100644 --- a/app/lib/auth.ts +++ b/app/lib/auth.ts @@ -8,15 +8,15 @@ import { defaultLocale } from '../i18n'; export const myAuth = () => { // Ovo koristim u developmentu - // + // const session:Session = { // user: { - // id: "123", - // name: "Test User", + // id: "109754742613069927799", + // name: "Nikola Derežić", // }, // expires: "123", // }; - // + // return(Promise.resolve(session)); return(auth()); diff --git a/app/ui/LocationCard.tsx b/app/ui/LocationCard.tsx index 62647db..98a32d9 100644 --- a/app/ui/LocationCard.tsx +++ b/app/ui/LocationCard.tsx @@ -1,6 +1,6 @@ 'use client'; -import { Cog8ToothIcon, PlusCircleIcon, LinkIcon } from "@heroicons/react/24/outline"; +import { Cog8ToothIcon, PlusCircleIcon, ShareIcon } from "@heroicons/react/24/outline"; import { FC } from "react"; import { BillBadge } from "./BillBadge"; import { BillingLocation } from "../lib/db-types"; @@ -54,7 +54,7 @@ export const LocationCard:FC = ({location: { _id, name, yearM : null } - + ); }; \ No newline at end of file diff --git a/app/ui/ViewBillBadge.tsx b/app/ui/ViewBillBadge.tsx index d0ae494..672a96b 100644 --- a/app/ui/ViewBillBadge.tsx +++ b/app/ui/ViewBillBadge.tsx @@ -14,7 +14,7 @@ export const ViewBillBadge: FC = ({ locationId, bill: { _id: const currentLocale = useLocale(); return ( - + {name} ); diff --git a/app/ui/ViewLocationCard.tsx b/app/ui/ViewLocationCard.tsx index d6e9135..292b533 100644 --- a/app/ui/ViewLocationCard.tsx +++ b/app/ui/ViewLocationCard.tsx @@ -21,7 +21,7 @@ export const ViewLocationCard:FC = ({location: { _id, nam return(
-

{formatYearMonth(yearMonth)} {name}

+

{formatYearMonth(yearMonth)} {name}

{ bills.map(bill => ) @@ -29,7 +29,7 @@ export const ViewLocationCard:FC = ({location: { _id, nam
{ monthlyExpense > 0 ? -

+

{ t("payed-total-label") } ${formatCurrency(monthlyExpense)}

: null diff --git a/docker-compose-debug.yml b/docker-compose-debug.yml index 7da0a5c..8d981ee 100644 --- a/docker-compose-debug.yml +++ b/docker-compose-debug.yml @@ -3,7 +3,7 @@ version: "3.7" services: mongo: - image: mongo:6.0.12 + image: mongo:4.4.27 restart: always ports: - 27017:27017