Allowing sap points to go above 100

This commit is contained in:
Khalim Conn-Kowlessar 2024-01-30 11:28:28 +00:00
parent 74b290507a
commit 2f1d012152
2 changed files with 2 additions and 4 deletions

View file

@ -139,8 +139,6 @@ export const columns: ColumnDef<PropertyWithRelations>[] = [
accessorKey: "currentEpc",
header: () => <div className="flex justify-center">Current EPC Rating</div>,
cell: ({ row }) => {
console.log(row.original.currentEpcRating);
return (
<div className="text-gray-700 font-medium flex justify-center">
{<EpcLetterBubble letter={row.original.currentEpcRating || ""} />}

View file

@ -80,8 +80,8 @@ export const serializeBigInt = (_: any, value: any): string | any => {
};
export function sapToEpc(sapPoints: number): string {
if (sapPoints <= 0 || sapPoints > 100) {
throw new Error("SAP points should be between 1 and 100.");
if (sapPoints <= 0) {
throw new Error("SAP points should be above 0.");
}
if (sapPoints >= 92) {