diff --git a/src/components/Helpers/PriceFormatter.jsx b/src/components/Helpers/PriceFormatter.jsx index de417a3..9a1802e 100644 --- a/src/components/Helpers/PriceFormatter.jsx +++ b/src/components/Helpers/PriceFormatter.jsx @@ -1,4 +1,4 @@ -import React from 'react' +import React from "react"; // export const PriceFormatter = (price, currency, currencyName) => { // const supportedCurrencies = ["USD", "EUR", "GBP"]; @@ -17,32 +17,35 @@ import React from 'react' // return `${formatter.format(price)} ${displayCurrencyName}`; // }; - -export const PriceFormatter = (price='00', currency='', currencyName='') => { +export const PriceFormatter = ( + price = "00", + currency = "", + currencyName = "" +) => { // Convert the number to a string -let numStr = String(price); + let numStr = String(price); -// Split the string into integer and decimal parts -let parts = numStr.split('.'); -let integerPart = parts[0]; -let decimalPart = parts[1] || ''; + // Split the string into integer and decimal parts + let parts = numStr.split("."); + let integerPart = parts[0] || ""; + let decimalPart = parts[1] || ""; -// Add thousands separators to the integer part -// let formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ','); -let formattedInteger = integerPart; + // Add thousands separators to the integer part + // let formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ','); + let formattedInteger = integerPart; -// Truncate or pad the decimal part to two decimal points -let formattedDecimal = decimalPart.slice(0, 2).padEnd(2, '0'); + // Truncate or pad the decimal part to two decimal points + let formattedDecimal = decimalPart.slice(0, 2).padEnd(2, "0"); -// Combine the formatted integer and decimal parts -// let formattedNumber = formattedInteger + '.' + formattedDecimal; + // Combine the formatted integer and decimal parts + // let formattedNumber = formattedInteger + '.' + formattedDecimal; -// return formattedNumber; + // return formattedNumber; return ( - - {currency || currencyName || ''} - {formattedInteger} - {formattedDecimal} + + {currency || currencyName || ""} + {formattedInteger || ""} + {formattedDecimal || ""} - ) -} + ); +}; diff --git a/src/components/MyTasks/MyOffersTable.jsx b/src/components/MyTasks/MyOffersTable.jsx index 1c34560..6a2f673 100644 --- a/src/components/MyTasks/MyOffersTable.jsx +++ b/src/components/MyTasks/MyOffersTable.jsx @@ -143,7 +143,10 @@ export default function MyOffersTable({ className, MyActiveOffersList }) { -
-
-

{details.title}

- +
+
+

+ {details.title} +

+ {/* INPUT SECTION */} -
- +
+
- -
- + +
+
- -
- -
- -
- -
- -
- +
-
- +
- -
- - {/* ACTION SECTION */} -
-
- {requestStatus.loading && requestStatus.trigger == 'offer' ? - - : - - } + +
+
- -
- {requestStatus.loading && requestStatus.trigger == 'reject' ? - - : -
+
+ + {/* ACTION SECTION */} +
+
+ {requestStatus.loading && requestStatus.trigger == "offer" ? ( + + ) : ( + - } + )} +
+ +
+ {requestStatus.loading && requestStatus.trigger == "reject" ? ( + + ) : ( + + )}
{/* ERROR DISPLAY AND SUBMIT BUTTON */} - {requestStatus.message != "" && ( - !requestStatus.status ? - (
- {requestStatus.message} -
) - : - requestStatus.status && - (
- {requestStatus.message} -
- ) - )} + {requestStatus.message != "" && + (!requestStatus.status ? ( +
+ {requestStatus.message} +
+ ) : ( + requestStatus.status && ( +
+ {requestStatus.message} +
+ ) + ))} {/* End of error or success display */}
- {/* close button */} + {/* close button */}
+ onClick={onClose} + disabled={requestStatus.loading} + type="button" + className="border-gradient text-18 tracking-wide px-2 py-2 rounded-full" + > + Cancel +
{/* end of close button */} -
- - ) +
+ + ); } -export default OfferJobPopout \ No newline at end of file +export default OfferJobPopout;