Merge branch 'main' into production
This commit is contained in:
19
_deploy/new-lite/Dockerfile
Normal file
19
_deploy/new-lite/Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
FROM node:current-alpine
|
||||
|
||||
# Install git and curl
|
||||
RUN apk add --no-cache git curl
|
||||
|
||||
# Set environment variables for repo and branch
|
||||
# These will be overridden by docker-compose.yml
|
||||
ENV REPO=""
|
||||
ENV BRANCH=""
|
||||
|
||||
# Create a directory for the app
|
||||
WORKDIR /app
|
||||
|
||||
# Download the entrypoint script
|
||||
CMD git clone --depth 1 --branch $BRANCH $REPO /tmp/repo && \
|
||||
cp /tmp/repo/_deploy/entrypoint.sh /app/entrypoint.sh && \
|
||||
chmod +x /app/entrypoint.sh && \
|
||||
rm -rf /tmp/repo && \
|
||||
/app/entrypoint.sh
|
@ -62,6 +62,28 @@ const AvCalendar = ({ publisherId, events, selectedDate, cartEvents, lastPublish
|
||||
}, []);
|
||||
//const isAdmin = ProtectedRoute.IsInRole(UserRole.ADMIN);
|
||||
|
||||
//block dates between 1 and 18 august 2024
|
||||
const blockedDates = [
|
||||
new Date(2024, 7, 1),
|
||||
new Date(2024, 7, 2),
|
||||
new Date(2024, 7, 3),
|
||||
new Date(2024, 7, 4),
|
||||
new Date(2024, 7, 5),
|
||||
new Date(2024, 7, 6),
|
||||
new Date(2024, 7, 7),
|
||||
new Date(2024, 7, 8),
|
||||
new Date(2024, 7, 9),
|
||||
new Date(2024, 7, 10),
|
||||
new Date(2024, 7, 11),
|
||||
new Date(2024, 7, 12),
|
||||
new Date(2024, 7, 13),
|
||||
new Date(2024, 7, 14),
|
||||
new Date(2024, 7, 15),
|
||||
new Date(2024, 7, 16),
|
||||
new Date(2024, 7, 17),
|
||||
new Date(2024, 7, 18),
|
||||
];
|
||||
|
||||
const [date, setDate] = useState(new Date());
|
||||
//ToDo: see if we can optimize this
|
||||
const [evts, setEvents] = useState(events); // Existing events
|
||||
@ -243,6 +265,11 @@ const AvCalendar = ({ publisherId, events, selectedDate, cartEvents, lastPublish
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if (blockedDates[0] <= startdate && startdate <= blockedDates[blockedDates.length - 1]) {
|
||||
toast.error(`Не можете да въвеждате предпочитания за ${common.getDateFormattedShort(startdate)}`, { autoClose: 5000 });
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Check if start and end are on the same day
|
||||
if (startdate.toDateString() !== enddate.toDateString()) {
|
||||
@ -539,6 +566,27 @@ const AvCalendar = ({ publisherId, events, selectedDate, cartEvents, lastPublish
|
||||
},
|
||||
// ... other custom components
|
||||
}}
|
||||
dayPropGetter={(date) => {
|
||||
// Highlight the current day
|
||||
// if (date.toDateString() === new Date().toDateString()) {
|
||||
// return {
|
||||
// style: {
|
||||
// // white-500 from Tailwind CSS
|
||||
// backgroundColor: '#f9fafb',
|
||||
// color: 'white'
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
if (blockedDates[0] <= date && date <= blockedDates[blockedDates.length - 1]) {
|
||||
return {
|
||||
style: {
|
||||
// red-100 from Tailwind CSS
|
||||
backgroundColor: '#fee2e2',
|
||||
color: 'white'
|
||||
}
|
||||
};
|
||||
}
|
||||
}}
|
||||
eventPropGetter={(eventStyleGetter)}
|
||||
date={date}
|
||||
showAllEvents={true}
|
||||
|
Reference in New Issue
Block a user