stats, hide my schedule menu
This commit is contained in:
@ -15,11 +15,11 @@ const sidemenu = [
|
|||||||
text: "График",
|
text: "График",
|
||||||
url: "/cart/calendar/schedule",
|
url: "/cart/calendar/schedule",
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
id: "myshedule",
|
// id: "myshedule",
|
||||||
text: "Моя График",
|
// text: "Моя График",
|
||||||
url: "/cart/publishers/myschedule",
|
// url: "/cart/publishers/myschedule",
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
id: "locations",
|
id: "locations",
|
||||||
text: "Местоположения",
|
text: "Местоположения",
|
||||||
|
@ -20,7 +20,8 @@ function ContactsPage({ publishers }) {
|
|||||||
<Layout>
|
<Layout>
|
||||||
<ProtectedRoute allowedRoles={[UserRole.ADMIN, UserRole.POWERUSER, UserRole.USER]}>
|
<ProtectedRoute allowedRoles={[UserRole.ADMIN, UserRole.POWERUSER, UserRole.USER]}>
|
||||||
<div className="container mx-auto p-4">
|
<div className="container mx-auto p-4">
|
||||||
<h1 className="text-xl font-semibold mb-4">Статистика</h1>
|
<h1 className="text-xl font-semibold mb-4">Статистика </h1>
|
||||||
|
<h5 className="text-lg font-semibold mb-4">{publishers.length} участника с предпочитания</h5>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Търси по име, имейл или телефон..."
|
placeholder="Търси по име, имейл или телефон..."
|
||||||
@ -73,7 +74,7 @@ export default ContactsPage;
|
|||||||
export const getServerSideProps = async (context) => {
|
export const getServerSideProps = async (context) => {
|
||||||
const dateStr = new Date().toISOString().split('T')[0];
|
const dateStr = new Date().toISOString().split('T')[0];
|
||||||
|
|
||||||
let publishers = await filterPublishers('id,firstName,lastName,isactive,desiredShiftsPerMonth', "", new Date(), true, true, false);
|
let publishers = await filterPublishers('id,firstName,lastName,email,isactive,desiredShiftsPerMonth', "", new Date(), true, true, false);
|
||||||
|
|
||||||
// const axios = await axiosServer(context);
|
// const axios = await axiosServer(context);
|
||||||
// const { data: publishers } = await axios.get(`api/?action=filterPublishers&assignments=true&availabilities=true&date=${dateStr}&select=id,firstName,lastName,isactive,desiredShiftsPerMonth`);
|
// const { data: publishers } = await axios.get(`api/?action=filterPublishers&assignments=true&availabilities=true&date=${dateStr}&select=id,firstName,lastName,isactive,desiredShiftsPerMonth`);
|
||||||
|
Reference in New Issue
Block a user