import moment from "moment/moment";
import { format } from "date-fns-jalali";

export const getAllocatedAndAcceptedRequests = (requests) => {
  return requests
    .filter((item) => item.provinceKillRequestState === "accepted")
    .map((item, i) => {
      return {
        label: `${item.killHouse.name} (${
          item.killHouse.user.fullname
        }) - تاریخ کشتار ${format(
          new Date(moment(new Date(item.reciveDate)).format("YYYY-MM-DD")),
          "yyyy/MM/dd"
        )} `,
        key: item.key,
      };
    });
};
