diff --git a/src/components/Company/Offers/Manage/CompanyOffersManagementWidget.js b/src/components/Company/Offers/Manage/CompanyOffersManagementWidget.js
index ada3e9ca..9568687e 100644
--- a/src/components/Company/Offers/Manage/CompanyOffersManagementWidget.js
+++ b/src/components/Company/Offers/Manage/CompanyOffersManagementWidget.js
@@ -31,27 +31,29 @@ import CollapsedQuickOfferEdit from "./CollapsedQuickOfferEdit";
const generateRow = ({
title, location, publishDate, publishEndDate, isHidden, isArchived, hiddenReason,
ownerName, getOfferVisibility, setOfferVisibility, offerId, _id, ...args }) => ({
- fields: {
- title: { value: (
- ), align: "left", linkDestination: `/offer/${_id}` },
- publishStartDate: { value: format(parseISO(publishDate), "yyyy-MM-dd") },
- publishEndDate: { value: format(parseISO(publishEndDate), "yyyy-MM-dd") },
- location: { value: location },
- },
- payload: {
- offer: new Offer({
- title, location, publishDate, publishEndDate, isHidden,
- isArchived, hiddenReason, ownerName, _id, ...args,
- }),
- getOfferVisibility: getOfferVisibility,
- setOfferVisibility: setOfferVisibility,
- offerId: offerId,
- },
-});
+ fields: {
+ title: {
+ value: (
+ ), align: "left", linkDestination: `/offer/${_id}`
+ },
+ publishStartDate: { value: format(parseISO(publishDate), "yyyy-MM-dd") },
+ publishEndDate: { value: format(parseISO(publishEndDate), "yyyy-MM-dd") },
+ location: { value: location },
+ },
+ payload: {
+ offer: new Offer({
+ title, location, publishDate, publishEndDate, isHidden,
+ isArchived, hiddenReason, ownerName, _id, ...args,
+ }),
+ getOfferVisibility: getOfferVisibility,
+ setOfferVisibility: setOfferVisibility,
+ offerId: offerId,
+ },
+ });
const sorters = {
title: alphabeticalSorter,
@@ -198,8 +200,7 @@ const CompanyOffersManagementWidget = ({ addSnackbar, isMobile }) => {
return !isMobile ? (
) : (
<>
@@ -207,7 +208,7 @@ const CompanyOffersManagementWidget = ({ addSnackbar, isMobile }) => {
- Actions
+ Actions
@@ -269,8 +270,8 @@ const CompanyOffersManagementWidget = ({ addSnackbar, isMobile }) => {
emptyMessage="No offers here."
RowContent={RowContent}
RowCollapseComponent={RowCollapseComponent}
- handleSelect={() => {}}
- handleSelectAll={() => {}}
+ handleSelect={() => { }}
+ handleSelectAll={() => { }}
isSelectableTable={false}
isLoading={isLoading}
error={error}
diff --git a/src/components/Company/Offers/Manage/QuickOfferEditForm.js b/src/components/Company/Offers/Manage/QuickOfferEditForm.js
index 20c958d3..0bf54824 100644
--- a/src/components/Company/Offers/Manage/QuickOfferEditForm.js
+++ b/src/components/Company/Offers/Manage/QuickOfferEditForm.js
@@ -18,10 +18,13 @@ export const QuickOfferEditForm = ({ offerId, showTitle = false }) => {
dispatch(addSnackbar(notification));
};
- const { publishEndDate } = offers[offerId]["fields"];
+ const { publishStartDate, publishEndDate } = offers[offerId]["fields"];
+
+ console.log("Publish start date is: ", publishStartDate);
const { control, fields, errors } = useOfferForm(EditOfferSchema, {
publishEndDate: publishEndDate.value,
+ publishDate: publishStartDate.value
});
const isObjectEmpty =
@@ -62,6 +65,8 @@ export const QuickOfferEditForm = ({ offerId, showTitle = false }) => {
}
};
+ console.log("Errors are: ", errors);
+
return (