diff --git a/frontend/src/components/EditEventModal.jsx b/frontend/src/components/EditEventModal.jsx index ca25faa..8ab760b 100644 --- a/frontend/src/components/EditEventModal.jsx +++ b/frontend/src/components/EditEventModal.jsx @@ -5,18 +5,26 @@ import DatePicker from 'react-datepicker'; import 'react-datepicker/dist/react-datepicker.css'; import {Context} from '../services/context'; -export default function EditEventModal({event, eventService, setShowEditModal}) { +export default function EditEventModal({event, eventService, setShowEditModal, isNewEvent}) { const [eventInfo, setEventInfo] = useState(event); const {setBad, setMessage} = useContext(Context); const handleSubmit = async (e) => { e.preventDefault(); - // Call your event service here to update the event - const res = await eventService.updateEvent(event.eventId, eventInfo); + // Handle adding or updating the event + let res; + if (isNewEvent) { + res = await eventService.createEvent(eventInfo); + } else { + res = await eventService.updateEvent(event.eventId, eventInfo); + } + if (res !== undefined) { // Toast with success message setMessage('Event updated successfully'); + // Close modal + setShowEditModal(false); } else { setBad(true); setMessage('Failed to update event'); @@ -34,7 +42,7 @@ export default function EditEventModal({event, eventService, setShowEditModal})
 
-

Edit Event

+

{isNewEvent ? "Add" : "Edit"} Event

diff --git a/frontend/src/components/EditProfileModal.jsx b/frontend/src/components/EditProfileModal.jsx index 721a4a0..920244e 100644 --- a/frontend/src/components/EditProfileModal.jsx +++ b/frontend/src/components/EditProfileModal.jsx @@ -1,12 +1,12 @@ -import React, {useState} from 'react'; +import React, { useState } from 'react'; +import Modal from './Modal'; -import {faCaretDown} from '@fortawesome/free-solid-svg-icons'; -import {faCaretUp} from '@fortawesome/free-solid-svg-icons'; -import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; +import { faCaretDown } from '@fortawesome/free-solid-svg-icons'; +import { faCaretUp } from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; - -export default function EditModal({handleSubmit, setEditModal, vendorData, setVendorData, user, setShowUploadModal}) { +export default function EditModal({ handleSubmit, setEditModal, vendorData, setVendorData, user, setShowUploadModal }) { const [badLocal, setBadLocal] = useState(false); const [validEmail, setValidEmail] = useState(true); const [validWebsite, setValidWebsite] = useState(true); @@ -23,7 +23,7 @@ export default function EditModal({handleSubmit, setEditModal, vendorData, setVe } if (pattern.test(website)) { // The website input matches the pattern - setVendorData({...vendorData, website: website}); + setVendorData({ ...vendorData, website: website }); setBadLocal(false); setValidWebsite(true); } else { @@ -42,7 +42,7 @@ export default function EditModal({handleSubmit, setEditModal, vendorData, setVe return; } if (pattern.test(email)) { - setVendorData({...vendorData, email: email}); + setVendorData({ ...vendorData, email: email }); setBadLocal(false); setValidEmail(true); } else { @@ -72,71 +72,110 @@ export default function EditModal({handleSubmit, setEditModal, vendorData, setVe } } + const inputClassnames = `w-5/6 h-10 border-2 border-grey-1 rounded-md p-2 basis-2/3`; + const labelNames = 'flex flex-row justify-between'; + + const btnClassnames = `basis-1/3 h-20 rounded-md font-semibold text-base py-1 px-1 drop-shadow-xl`; + const activebuttonstyle = `text-white font-semibold py-2 px-1 drop-shadow-xl rounded-md bg-whitegrey`; + const disabledbuttonstyle = `text-white font-semibold py-2 px-1 drop-shadow-xl rounded-md bg-grey-1`; + return ( -
-
- { - if (badLocal) { - e.preventDefault(); - return; - } - e.preventDefault(); // Prevents the default form submission behavior - handleSubmit(); - setEditModal(false); - }} className='flex flex-col'> - - setVendorData({...vendorData, name: e.target.value})}/> - {!validEmail &&
Must be a valid email.
} - - handleEmailChange(e)}/> - {user.isadmin && -
-
Reset Password
-
handleChecked()} className='mx-4' > - -
+ setEditModal(false)}> + { + if (badLocal) { + e.preventDefault(); + return; + } + e.preventDefault(); // Prevents the default form submission behavior + handleSubmit(); + setEditModal(false); + }} className='flex flex-col gap-2'> + + { + !validEmail && +
Must be a valid email.
+ } + + { + user.isadmin && +
+
Reset Password
+
handleChecked()} className='mx-4' > +
- } - {checked && - <> - - setVendorData({...vendorData, password: e.target.value})}/> - - handlePassValid(e)}/> - {!validPass &&
Passwords do not match.
} - - } - - setVendorData({...vendorData, phoneNumber: e.target.value})}/> - {!validWebsite &&
Must be a valid website.
} - - handleWebsiteChange(e)}/> - - setVendorData({...vendorData, instagram: e.target.value})}/> - - setVendorData({...vendorData, facebook: e.target.value})}/> - - setVendorData({...vendorData, twitter: e.target.value})}/> - - setVendorData({...vendorData, youtube: e.target.value})}/> - - setVendorData({...vendorData, pinterest: e.target.value})}/> - - setVendorData({...vendorData, tiktok: e.target.value})}/> -
- - -
- - -
-
+ } + { + checked && + <> + + + { + !validPass && +
Passwords do not match.
+ } + + } + + { + !validWebsite && +
Must be a valid website.
+ } + + + + + + + +
+ + + +
+ + ); } diff --git a/frontend/src/components/Modal.jsx b/frontend/src/components/Modal.jsx index 3115da1..c7736b5 100644 --- a/frontend/src/components/Modal.jsx +++ b/frontend/src/components/Modal.jsx @@ -2,8 +2,8 @@ import React from 'react'; import PropTypes from 'prop-types'; export default function Modal({children, backgroundColor, blurOnClick}) { return (<> -
{}}>
-
+
{}}>
+
{children}
); diff --git a/frontend/src/components/PolicyModal.jsx b/frontend/src/components/PolicyModal.jsx index 6477025..16ba311 100644 --- a/frontend/src/components/PolicyModal.jsx +++ b/frontend/src/components/PolicyModal.jsx @@ -1,178 +1,226 @@ import React from 'react'; -export default function PolicyModal({setPolicyModal}) { - return <> -
-
-
-

-

Mission Statement:

- Portland Indigenous Marketplace supports indigenous artists and - entrepreneurs by providing barrier-free, culturally respectful spaces that - encourage cultural resilience and economic sustainability by promoting - public education through cultural arts -

Introduction:

-

- The nonprofit Portland Indigenous Marketplace and their - Indigenous Marketplace programming together with vendors and event - staff have compiled this Vendor Policy Handbook to better communicate all - rules and expectations from vendors that are part of the Indigenous - Marketplace programming. -

- By following the rules and policies outlined in this Vendor Policy Handbook - you help keep the Indigenous Marketplace community a supportive, viable - and enjoyable environment for the entire community. As an approved - Indigenous Marketplace vendor, you are responsible for informing yourself - and your staff about following all applicable marketplace rules, policies and - regulations set forth in this Vendor Handbook as well as local, tribal, state - and federal policies, rules and guidelines. All vendors are asked to comply - with the rules and policies outlined by the Vendor Policy Committee to - remain a vendor in good standing. - This is a live document and this organization's serving Board, Executive - Director, and the Vendor Policy Committee reserve the right to modify the - policies of the Indigenous Marketplace as circumstances warrant. Vendors - will receive advance warning, and a revised copy of the rules as soon as - changes are incorporated into the rules. - Questions or concerns can be sent to info@indigenousmarketplace.org - or 503-901-3881 - Portland Indigenous Marketplace:Vendor Policy Handbook +import Modal from './Modal'; -

Indigenous Marketplace Vendor Policies:

-

- 1. a. Vendors agree to donate one raffle item to the organization per - marketplace day that they participate in as a vendor. The item - donated should be a true representation of the vendor's talent/booth - with a value of at least $20. Upon review donation could qualify for a - maximum of 2 days raffle donation. - b. In Nov/Dec of each year every approved vendor will be asked to - donate a Silent Auction item with a value of a minimum of $50. - This donation will be needed to participate as an approved - Indigenous Marketplace vendor into the following of each year. -

-

- 2. Vendors agree that all products are made or designed by the Vendor. - Used or flea-market goods, manufactured items, or commercialbrand merchandise are not permitted for sale at the Indigenous - Marketplace events. Buying products from another vendor, - wholesaler, store or other operation and then selling those products - un-altered or not personalized is prohibited at Indigenous - marketplaces events. Vendors may only sell products for which they - have been approved, per their application the Exception Process - Exhibit 3 (upon approval each vendor may have 1 approved item that they did - not make or design if the Vendor Policy Committee finds that the item integrates - into the vendors booth). -

- 3. Attendance tracking begins with the first scheduled market day. - Vendors agree to cancel a market date by notifying staff at least 48 - hours in advance. Notice must be given by calling the general PIM - number 503-901-3881 or directly contacting the appropriate staff - member via phone or email. Vendors are allowed 2 excused absences - per market year. In addition, 2 emergency cancellations are permitted - without proper notice. +export default function PolicyModal({ setPolicyModal }) { + const subheadingClassnames = `text-xl font-bold`; + const bodyClassnames = `text-lg`; -

- 4. Vendors agree to set up by the start time of the Indigenous - marketplace events and stay for the duration of marketplace hours. If - vendor is running late or if a need to leave before the marketplace - ends arises, vendors agree to communicate with staff before initiating - any pack up. In such case during breakdown, the utmost care must be - taken to ensure the safety of our customers and fellow vendors. Staff - reserves the right to ask vendor to cover table until the end of planned - marketplace hours. -

-

- 5. Vendor space at the Indigenous Marketplace events will only be - shared with other approved Indigenous Marketplace vendors. Any - family or friends with the intent to vend will need to complete a - vendor application and be approved before vending. (Family, friends - and staff are welcomed in your space if they are there to support not sell their - own products) -

-

- 6. Vendors agree when using canopies/tents they must have four - grounded and weighted corners. A minimum of 20 pounds of weight - is required to hold down and to secure EACH canopy leg. Weights will - be inspected periodically to ensure proper weights are attached to - your canopies. **Each vendor is responsible for damages incurred - due to fly-aways of their display, canopy or inventory** PIM staff - strongly encourage set ups that can be stabilized when winds pick up. - PIM is not responsible for any personal losses or damages. -

-

- 7. Vendors agree not to drive any motorized vehicle in the marketplace - area during marketplace hours. If late arrivals or early pack ups - occur, you will not be able to drive your vehicle into the marketplace - area to unload or load but carts and equipment may be available for - loading/unloading needs. -

-

- 8. Before leaving the market, all vendors must clean their booth spaces - and ensure that all litter, broken equipment, produce, and other - product debris is removed. -

+ const Section = ({ title, children, config }) => { + return ( +
+

{title}

+
{children}
+
+ ); + } + return <> + setPolicyModal(false)}> +
+

Portland Indigenous Marketplace Vendor Policy Handbook

+

Updated Aug 2024

+
+
+
+

+ Portland Indigenous Marketplace supports indigenous artists and + entrepreneurs by providing barrier-free, culturally respectful spaces that + encourage cultural resilience and economic sustainability by promoting + public education through cultural arts

+
+
+

The nonprofit Portland Indigenous Marketplace and their + Indigenous Marketplace programming together with vendors and event + staff have compiled this Vendor Policy Handbook to better communicate all + rules and expectations from vendors that are part of the Indigenous + Marketplace programming.

+

By following the rules and policies outlined in this Vendor Policy Handbook + you help keep the Indigenous Marketplace community a supportive, viable + and enjoyable environment for the entire community. As an approved + Indigenous Marketplace vendor, you are responsible for informing yourself + and your booth staff/guests/family about following all applicable + marketplace rules, policies and regulations set forth in this Vendor + Handbook as well as local, tribal, state and federal policies, rules and + guidelines. All vendors are asked to comply with the rules and policies + outlined by the Vendor Policy Committee to remain a vendor in good + standing. This is a live document and this organization’s serving Board, + Executive Director, and the Vendor Policy Committee reserve the right to + modify the policies of the Indigenous Marketplace as circumstances + warrant. Vendors will receive advance warning, and a revised copy of the + rules as soon as changes are incorporated into the rules.

+

Questions or concerns can be sent to info@indigenousmarketplace.org or 503-901-3881

+
+
+
+
+

Vendors agree to donate one raffle item to the organization per + marketplace day that they participate in as a vendor. The item + donated should be a true representation of the vendor's talent/booth + with a value of at least $20. Upon review donation could qualify for a + maximum of 2 days raffle donation.

+
+
+

Silent Auction Donation Item due at the end of Feb of each + calendar year, every participating approved vendor will be asked to + donate a Silent Auction item with a value of a minimum of $50. If + a vendor has not participated in an Indigenous Marketplace the + previous calendar year, the annual silent auction item is optional

+
+
+
+

Vendors agree that all products are made or designed by the Vendor. + Used or flea-market goods, manufactured items, or commercial, + brand merchandise are not permitted for sale at the Indigenous + Marketplace events. Buying products from another vendor, + wholesaler, store or other operation and then selling those products + un-altered or not personalized is prohibited at Indigenous + marketplaces events. Vendors may only sell products for which they + have been approved, per their application the Exception Process + Exhibit 1 (upon approval each vendor may have 1 approved item that + they did not make or design if the Vendor Policy Committee finds that + the item integrates into the vendors booth).

+
+

- 9. While imitation is the sincerest form of flattery, please respect your - fellow vendors' ideas and concepts and refrain from copying them. -

-

- 10. Vendors agree to engage in respectful communications with staff, community members, and volunteers. - Complaints concerning policies 1-10 must be submitted by completing the - Indigenous Marketplace Complaint Form in hardcopy (Exhibit 1) or digital - form to PIM staff within 24-48hrs of the marketplace day that the alleged - violation is observed. The complaint will then be given to the Vendor Policy - Committee for review. The complaint must clearly identify the alleged - person of interest, either through vendor name, business name or booth - location on the day of the infraction, plus provide the staff with written - evidence as to the nature of the alleged violation. -

-

What happens when a policy complaint occurs?

-

When a complaint is brought forward by community, vendors, - volunteers or staff the Vendor Policy Committee will review complaint. If - the complaint is found valid the vendor of interest will receive a notice of - the appropriate level of accountability. -

- 1. First infraction. A warning will be issued (exhibit 3) to vendor - in writing/email and recorded in file/history of vendor. -

-

- 2. Second infraction. A face to face or zoom meeting will be - needed with staff and Vendor Policy Committee before - returning to in person events. This infraction will be recorded in - writing/email to the vendor and recorded in file/history of - vendor (exhibit 3). + Attendance tracking begins with the first scheduled market day. + Vendors agree to cancel a market date by notifying staff at least 48 + hours in advance. Notice must be given by calling the general PIM + number 503-901-3881 or directly contacting the appropriate staff + member via phone or email. Vendors are allowed 2 excused absences + per market year. In addition, 2 emergency cancellations are permitted + without proper notice. All absences must be used before a Policy + Complaint is completed, all absences are forgiven at the end of each + calendar year.

+
+

- 3. A plan of separation for the Indigenous Marketplace - programming and the Vendor. For severe infractions including - but not limited to violence and hate the plan of separation may - be permanent. This plan of separation will be shared in - writing/email to the vendor and recorded in file/history of - vendor (exhibit 2). + Vendors agree to set up by the start time of the Indigenous + marketplace events and stay for the duration of marketplace hours. If + vendor is running late or if a need to leave before the marketplace + ends arises, vendors agree to communicate with staff before initiating + any pack up. In such case during breakdown, the utmost care must be + taken to ensure the safety of our customers and fellow vendors. Staff + reserves the right to ask vendor to cover table until the end of planned + marketplace hours.

+
+

- 4. Extreme Exceptions: Staff and the Vendor Policy Committee - hold the right for severe violations that include but not limited - to violence and hate to recommend the plan of separation to be - activated with the first validated infraction with written - reasoning (exhibit 2) of being extreme to be reviewed by the - Board of Directors of the Portland Indigenous Marketplace. - This Extreme Exception will be shared in writing/email to the - vendor and recorded in file/history of vendor (exhibit 2). + Vendor space at the Indigenous Marketplace events will only be + shared with other approved Indigenous Marketplace vendors. Any + family or friends with the intent to vend will need to complete a + vendor application and be approved before vending. (Family, friends + and staff are welcomed in your space if they are there to support not + sell their own products), Everyone in a booth space is responsible to + follow the policies in this handbook.

- Portland Indigenous Marketplace is committed to providing access, equal - opportunity and reasonable accommodation for individuals with - disabilities, medical needs and other barriers in its services, programs, and - activities. To request reasonable accommodations through contact below. - info@indigenousmarketplace.org - or

503-901-3881

- Thank you for being a part of the Indigenous Marketplace community! -

-

-
+ +
+ Vendors agree when using canopies/tents they must have four + grounded and weighted corners. A minimum of 20 pounds of weight + is required to hold down and to secure EACH canopy leg. Weights will + be inspected periodically to ensure proper weights are attached to + your canopies. **Each vendor is responsible for damages incurred + due to fly-aways of their display, canopy or inventory** PIM staff + strongly encourage set ups that can be stabilized when winds pick up. + PIM is not responsible for any personal losses or damages. +
+
+

Vendors agree not to drive any motorized vehicle in the marketplace + area during marketplace hours. If late arrivals or early pack ups + occur, you will not be able to drive your vehicle into the marketplace + area to unload or load but carts and equipment may be available for + loading/unloading needs

+
+
+

Before leaving the market, all vendors must clean their booth spaces + and ensure that all litter, broken equipment, produce, and other + product debris is removed.

+
+
+

While imitation is the sincerest form of flattery, please respect your + fellow vendors’ ideas and concepts and refrain from copying + them. When a Policy #9 complaint is brought forward the committee + asks for photo/video or other proof that will can reviewed to support + any completed complaints.

+
+
+

Vendors and all booth staff/guests/family agree to engage in + respectful communications with each other, staff, community + members, and volunteers

+
+
+

Vendors agree to NOT sell any sacred items at the Indigenous + Marketplace events and partnering events. This includes any items + that are for spiritual use such as: smudge items, palo santo, cedar, + sweet grass, sage, feathers or anything related are not permitted for + sale at the Indigenous Marketplace events.

+
+ +
+

Complaints concerning policies 1-11 must be submitted by completing the + Indigenous Marketplace Complaint Form in hardcopy (Exhibit 3) or digital + form to PIM staff within 24-48hrs of the marketplace day that the alleged + violation is observed. The complaint will then be given to the Vendor Policy + Committee for review. The complaint must clearly identify the alleged + person of interest, either through vendor name, business name or booth + location on the day of the infraction, plus provide the staff with written + evidence as to the nature of the alleged violation.

+
+ +
+

When a complaint is brought forward by community, vendors, + volunteers or staff the Vendor Policy Committee will review complaint. If + the complaint is found valid the vendor of interest will receive a notice of + the appropriate level of accountability.

+
+

First infraction. A warning will be issued (exhibit 3) to vendor + in writing/email and recorded in file/history of vendor.

+
+
+

Second infraction. A face to face or zoom meeting will be + needed with staff and Vendor Policy Committee before + returning to in person events. This infraction will be recorded in + writing/email to the vendor and recorded in file/history of + vendor (exhibit 3).

+
+
+

A plan of separation for the Indigenous Marketplace + programming and the Vendor. For severe infractions including + but not limited to violence and hate the plan of separation may + be permanent. This plan of separation will be shared in + writing/email to the vendor and recorded in file/history of + vendor (exhibit 3).

+
+
+

Extreme Exceptions: Staff and the Vendor Policy Committee + hold the right for severe violations that include but not limited + to violence and hate to recommend the plan of separation to be + activated with the first validated infraction with written + reasoning (exhibit 3) of being extreme to be reviewed by the + Board of Directors of the Portland Indigenous Marketplace. + This Extreme Exception will be shared in writing/email to the + vendor and recorded in file/history of vendor (exhibit 3).

+
+
+
+

Portland Indigenous Marketplace is committed to providing access, equal + opportunity and reasonable accommodation for individuals with + disabilities, medical needs and other barriers in its services, programs, and + activities. To request reasonable accommodations through contact below.

+
+

info@indigenousmarketplace.org

+

or 503-901-3881

+ +
+
+

Information on this page could be outdated. Please contact the organization for updated policies.

-
- ; + + } diff --git a/frontend/src/components/UploadPhotoModal.jsx b/frontend/src/components/UploadPhotoModal.jsx index dbabb58..cbc49af 100644 --- a/frontend/src/components/UploadPhotoModal.jsx +++ b/frontend/src/components/UploadPhotoModal.jsx @@ -1,5 +1,6 @@ import React, {useContext} from 'react'; +import Modal from './Modal'; import {Context} from '../services/context'; export default function UploadPhotoModal({vendorId, vendorService, showUploadModal, setShowUploadModal}) { @@ -30,13 +31,12 @@ export default function UploadPhotoModal({vendorId, vendorService, showUploadMod }; return (<> -
-
-

Upload Profile Picture

+ +

Upload Profile Picture

-
+ ); } diff --git a/frontend/src/components/violationmodal.jsx b/frontend/src/components/violationmodal.jsx index 7558c0c..ba529de 100644 --- a/frontend/src/components/violationmodal.jsx +++ b/frontend/src/components/violationmodal.jsx @@ -1,82 +1,25 @@ -import React, {useState} from 'react'; +import React, { useState } from 'react'; import PropTypes from 'prop-types'; -function ViolationModal({closeModal, vendorId, vendorName, handleSubmit}) { // added vendor object so we can send message to vendor - const [activeButtons, setButtons] = useState([]); - const [violationData, setViolationData] = useState({type: '', description: '', vendor_id: vendorId}); +import Modal from './Modal'; +import Violation from '../objects/Violation'; +export default function ViolationModal({ closeModal, vendorId, vendorName, handleSubmit }) { // added vendor object so we can send message to vendor + const [violationData, setViolationData] = useState(new Violation(-1, -1, '', vendorId)); - // ask if theres a way to disable the header button when the modal opens - - // const handleSubmit = () => { - // console.log(`Posting message(${message}) to ${vendor.name}`); - // console.log('... As long as someone finishes my code'); - // if (activeButtons.length == 0) { - // alert('Must select a violated policy to submit!'); - // return; - // } - // setViolations(); - // closeModal(false); - // }; - - const handleButtonClick = (content) => { - // idea: - // search through active button list - // if button already present, set the buttons to be all those except that button - // otherwise, add button to list - if (activeButtons.includes(content)) { // to remove button that was added - setButtons(activeButtons.filter((value) => value !== content)); - return; - } else if (activeButtons.length == 1) { // only add one button at a time - return; - } - setButtons([...activeButtons, content]); // add button - setViolationData({...violationData, type: content}); - }; // changed the code a little bit, easier to use react state and functions than form - return ( -
handleSubmit(violationData)}> -

Add Violations To: {vendorName}

- -

Select Violated Policies

-
- handleButtonClick(1)} content={1} activebuttons={activeButtons}/> - handleButtonClick(2)} content={2} activebuttons={activeButtons}/> - handleButtonClick(3)} content={3} activebuttons={activeButtons}/> - handleButtonClick(4)} content={4} activebuttons={activeButtons}/> - handleButtonClick(5)} content={5} activebuttons={activeButtons}/> - handleButtonClick(6)} content={6} activebuttons={activeButtons}/> - handleButtonClick(7)} content={7} activebuttons={activeButtons}/> - handleButtonClick(8)} content={8} activebuttons={activeButtons}/> - handleButtonClick(9)} content={9} activebuttons={activeButtons}/> - handleButtonClick(10)} content={10} activebuttons={activeButtons}/> - handleButtonClick(11)} content={11} activebuttons={activeButtons}/> -
+ return closeModal(false)} backgroundColor={`bg-greywhite w-4/5 h-[65vh] overflow-x-clip`}> + handleSubmit(violationData)}> +

{vendorName}

+

Fill out the form once for each violation - do not try to submit multiple violations in one form.

+

Policy Number

+ setViolationData({...violationData, type: e.target.value})}/> +

Violation Description

+
- +
- ); -} - -function PolicyButton({activebuttons, content, onClick}) { - return ( - // used Harley's VendorButtons as inspo - ); -} - -export default ViolationModal; - -ViolationModal.propTypes = { - closeModal: PropTypes.func.isRequired, - vendorId: PropTypes.number.isRequired, - vendorName: PropTypes.string.isRequired, - handleSubmit: PropTypes.func.isRequired, -}; - -PolicyButton.propTypes = { - content: PropTypes.number.isRequired, - onClick: PropTypes.func.isRequired, - activebuttons: PropTypes.array.isRequired, -}; +
+} \ No newline at end of file diff --git a/frontend/src/objects/Violation.js b/frontend/src/objects/Violation.js index 1441b77..16c35f3 100644 --- a/frontend/src/objects/Violation.js +++ b/frontend/src/objects/Violation.js @@ -1,9 +1,9 @@ export default class Violation { - constructor(id, type, description, vendorId) { + constructor(id, type, description, vendor_id) { this.id = id; this.type = type; this.description = description; - this.vendorId = vendorId; + this.vendor_id = vendor_id; } get json() { diff --git a/frontend/src/routes/event.jsx b/frontend/src/routes/event.jsx index bb8fd73..6ff731a 100644 --- a/frontend/src/routes/event.jsx +++ b/frontend/src/routes/event.jsx @@ -142,7 +142,7 @@ export default function Event({eventService, vendorService}) { const googleMapDirectionLink = `https://www.google.com/maps/place/${encodedAddress}`; return (<> - {showEditModal && } + {showEditModal && }
Event Logo diff --git a/frontend/src/routes/events.jsx b/frontend/src/routes/events.jsx index e661b97..829f7a4 100644 --- a/frontend/src/routes/events.jsx +++ b/frontend/src/routes/events.jsx @@ -3,78 +3,18 @@ import PropTypes from 'prop-types'; import {Context} from '../services/context'; import {Link} from 'react-router-dom'; import FooterPad from '../components/footerpad'; -// import moment from 'moment'; - - -import DatePicker from 'react-datepicker'; - -import 'react-datepicker/dist/react-datepicker.css'; - -function EventModal({editEvent, handleSubmit, closeModal, currEvent}) { - const [eventInfo, setEventInfo] = useState({name: '', description: '', location: '', starttime: new Date(), endtime: new Date(), vendorCapacity: 0}); - useEffect(() => { - if (editEvent) { - currEvent.starttime = new Date(currEvent.startDate); - currEvent.endtime = new Date(currEvent.endDate); - console.log('Curr event', currEvent); - setEventInfo(currEvent); - } - }, [editEvent]); - - - return ( -
handleSubmit(eventInfo)}> -
Event Name:
- setEventInfo({...eventInfo, name: e.target.value})} /> -
Description:
-