{"version":3,"sources":["services/ServiceConfig.ts","services/Middleware.ts","services/AuthService.ts","components/UserMenu.tsx","assets/images/wmp-logo.png","components/NavMenu.tsx","components/Footer.tsx","components/Layout.tsx","hooks/useSubscription.ts","pages/Overview/Overview.tsx","hooks/useDebouncedEffect.ts","services/IngredientService.ts","hooks/useListFunctions.ts","pages/Ingredients/Ingredients.tsx","pages/Authentication/Login.tsx","pages/Authentication/Logout.tsx","pages/Ingredients/IngredientInterfaces.ts","components/Alert.tsx","services/FormValidation.ts","components/ModalOkCancel.tsx","pages/Ingredients/EditIngredient.tsx","services/UserService.ts","pages/Users/Users.tsx","pages/Users/UserInterfaces.ts","pages/Users/EditUser.tsx","pages/Recipes/RecipeService.ts","pages/MealPlans/MealPlanService.ts","pages/MealPlans/AddToMealPlanButton.tsx","pages/Recipes/RecipeListItem.tsx","components/Spinner.tsx","hooks/useSessionStorage.ts","pages/Recipes/Recipes.tsx","pages/Recipes/RecipeInterfaces.ts","pages/Recipes/ViewRecipe.tsx","components/GridRowCommandsCell.tsx","pages/Recipes/EditRecipe.tsx","pages/MealPlans/MealPlans.tsx","pages/MealPlans/MealPlanInterfaces.tsx","pages/MealPlans/EditMealPlan.tsx","pages/MealPlans/ShoppingList.tsx","pages/MealPlans/ExportMealPlan.tsx","pages/MealPlans/MealPlansRedirect.tsx","components/SubscriptionDetailsBanner.tsx","pages/Users/EditProfile.tsx","pages/Users/EditPassword.tsx","pages/Tutorials/Tutorials.tsx","pages/Overview/PrivacyPolicy.tsx","pages/Overview/TermsAndConditions.tsx","pages/Authentication/AuthViewModels.ts","pages/Authentication/SignUpForm.tsx","pages/Authentication/SignUp.tsx","hooks/useStripePublicKey.ts","pages/Authentication/PaymentStatusQuery.tsx","pages/Authentication/PaymentStatus.tsx","pages/Users/UpdatePaymentForm.tsx","pages/Users/ManageSubscription.tsx","pages/Users/UpdatePaymentResultChild.tsx","pages/Users/UpdatePaymentResult.tsx","assets/images/section-3-mealplans.png","assets/images/section-3-tags.jpg","assets/images/section-3-recipes.jpg","assets/images/section-5-feature.png","pages/Authentication/Home.tsx","assets/images/section-2-aus.png","assets/images/section-2-chef.png","assets/images/section-2-branded.png","assets/images/section-2-diet.png","App.tsx","index.tsx"],"names":["ServiceConfig","apiUrl","get","path","requestOptions","method","headers","authHeader","url","fetch","then","handleResponse","download","response","blob","execute","commandName","command","Authorization","bearerToken","body","JSON","stringify","replacer","uploadUrl","uploadHeaders","parentType","parentId","text","data","parse","ok","indexOf","status","AuthService","logout","currentUser","currentUserValue","token","key","value","type","_","includes","length","currentUserSubject","BehaviorSubject","localStorage","getItem","currentUsernameSubject","currentRoleSubject","login","username","password","a","error","setItem","decoded","jwt_decode","unique_name","role","next","removeItem","getUserDetails","signUp","model","getPaymentIntent","asObservable","currentUsername","currentUsernameValue","currentRole","currentRoleValue","UserMenu","props","useState","dropdownOpen","setDropdownOpen","AdminMenuItems","header","Icon","mdiShieldCrownOutline","tag","Link","to","mdiFoodAppleOutline","mdiAccountGroup","divider","isOpen","toggle","prevState","className","caret","mdiAccountCircle","auth","mdiTune","mdiCardAccountDetailsStar","mdiFormTextboxPassword","isAdmin","mdiLogout","NavMenu","nav","useNavigate","location","useLocation","collapsed","setCollapsed","toggleNavbar","showSignInButton","authenticated","pathname","NotSignedInNavItems","Button","onClick","SignedInNavItems","mdiGauge","mdiHelpCircleOutline","mdiBookOpenPageVariantOutline","mdiCalendarTextOutline","AuthenticatedContent","navbar","isActiveSubscription","dark","src","logo","alt","Footer","Layout","useSubscription","useEffect","Overview","href","useDebouncedEffect","effect","deps","delay","firstCallMade","handler","setTimeout","clearTimeout","IngredientService","keywords","onlyCustom","toString","id","useListFunctions","rows","setRows","loading","setLoading","setFirstCallMade","skip","take","page","setPage","searchText","setSearchText","pageChange","event","gridPageChange","searchTextChange","Ingredients","list","setOnlyCustom","navigate","runQuery","results","ButtonGroup","e","mdiPlus","Input","onChange","placeholder","Checkbox","label","Grid","slice","pageable","total","onPageChange","onRowClick","dataItem","window","open","field","title","width","Login","setUsername","setPassword","lastError","setLastError","submit","preventDefault","handleSuccess","SignInButton","disabled","onSubmit","FieldWrapper","name","target","color","Logout","IngredientInitialState","category","shortName","publicFoodKey","classificationId","undefined","energy","energyCalories","protein","fat","sugars","carbohydrates","calcium","copper","iodine","iron","magnesium","potassium","selenium","sodium","zinc","retinol","thiamin","riboflavin","niacin","pantothenicAcid","pyridoxine","biotin","cobalamin","folateNatural","vitaminC","cholecalciferol","vitaminE","fattyAcidsTotalSaturated","fattyAcidsTotalMonounsaturated","fattyAcidsTotalPolyunsaturated","defaultAlertState","success","message","Alert","forwardRef","ref","useImperativeHandle","showSuccess","setAlertState","alertState","showError","closeAlert","NotificationGroup","style","right","bottom","alignItems","flexWrap","Fade","Notification","icon","closable","onClose","notEmpty","FormValidation","numberOrNull","isNaN","parseFloat","numberZeroOrGreater","numberGreaterThanZero","tagsValid","values","i","match","validPassword","toLowerCase","toUpperCase","test","validUserName","validPhoneNumber","validEmail","ModalOkCancel","visible","setVisible","showModal","hideModal","okText","cancel","cancelText","description","onOkClick","mdiCheck","mdiCancel","metrics","categories","EditIngredient","useParams","view","setView","alertRef","useRef","deleteModalRef","result","handleSaveResponse","current","Title","showDeleteModal","handleDeleteResponse","closeItem","MetricField","fieldRenderProps","validationMessage","visited","others","Field","component","validator","Error","Form","initialValues","formData","render","formRenderProps","FormElement","hidden","mdiDelete","mdiClose","DropDownList","map","metric","UserService","Users","cell","expiry","expiryString","Date","toLocaleString","booleanField","archived","UserInitialState","userName","email","phoneNumber","firstName","lastName","companyName","imageId","imageUri","confirmPassword","stripeSetupIntentId","stripeCustomerId","stripeSubscriptionId","EditProfileInitialState","EditPasswordInitialState","oldPassword","newPassword","EditUser","roleOptions","setRoleOptions","archiveItem","handleResponseAndReload","restoreItem","successMessage","handleResponseAndClose","saveLabel","Buttons","mdiRestore","mdiArchive","FieldsForExistingUser","ImageSelector","lastImage","setLastImage","getImageIdFromUri","uri","fileName","split","pop","substring","lastIndexOf","Upload","batch","multiple","saveUrl","defaultFiles","onStatusChange","saveHeaders","restrictions","allowedExtensions","maxFileSize","console","log","RecipeService","tags","excludeTags","maxTime","join","MealPlanService","AddToMealPlanButton","mealPlanSelection","setMealPlanSelection","mealPlan","setMealPlan","selectedCells","setSelectedCells","anchor","popupVisible","setPopupVisible","firstOpen","setFirstOpen","buttonLabel","buttonIcon","mealPlanOptions","setMealPlanOptions","allowSubmit","loadMealPlanOptions","currentMealPlanInResults","find","r","mealPlanId","size","smallButton","Popup","show","popupAlign","horizontal","vertical","popupClass","textField","dataItemKey","row","cells","recipes","add","cellId","temp","concat","filter","c","toggleCheckbox","recipeId","cellIds","onCopyComplete","RecipeListItemImage","viewRecipe","item","mdiImage","RecipeListItem","isArchived","time","servings","Spinner","useSessionStorage","defaultValue","stored","sessionStorage","getSessionStorageOrDefault","setValue","Recipes","allTagOptions","setAllTagOptions","tagOptions","setTagOptions","excludeTagOptions","setExcludeTagOptions","setTags","setExcludeTags","setMaxTime","recipeScroll","setRecipeScroll","displayedRowsCount","setDisplayedRowsCount","rowCount","setRowCount","displayedRows","setDisplayedRows","contentDiv","document","querySelector","addEventListener","scrollTop","passive","displayCount","scrollPosition","splice","setScroll","finally","position","elements","getElementsByClassName","first","mdiFilterOffOutline","MultiSelect","filterable","onFilterChange","filterBy","Label","Slider","Math","floor","min","max","ListView","onScroll","t","nativeEvent","scrollHeight","clientHeight","moreData","RecipeInitialState","externalId","notes","keyNotes","preparationTime","cookingTime","instructions","ingredients","EditRecipeInitialState","NutritionSummaryInitialState","ViewRecipe","sliderValue","setSliderValue","displayServings","setDisplayServings","exportingPdf","setExportingPdf","calculateNutrition","minSlider","notesExpanded","setNotesExpanded","toggleNotes","nutrition","setNutrition","setChartData","recipe","reducer","ingredient","reduce","RecipeIngredients","groupBy","recipeIngredients","ri","Category","categoryProps","heading","showHeading","colSpan","RecipeIngredientItem","recipeIngredient","displayName","friendlyName","servingsAdjustment","amount","num","m","Number","abs","toPrecision","round","sign","roundTo2DecimalPlaces","mls","millilitres","grams","gramsDisplay","toFixed","amountDisplay","fraction","Fraction","toFraction","roundedFraction","unit","measurementUnit","MeasurementDisplay","displayAsLiquid","mdiCheckboxBlankOutline","optional","RecipeInstructionItem","index","instruction","RecipeImage","IngredientsCard","ServesAndTimesCard","slider","ceil","recalculateServings","mdiBlender","mdiStove","DirectionsCard","NutritionCard","NotesCard","po","KeyNotesCard","MacrosCard","PdfExportingIndicator","FileSaver","saveAs","mdiFilePdfBox","mdiPencil","GridRowCommandsCell","onRemove","EditRecipe","ingredientOptions","setIngredientOptions","tagSuggestions","setTagSuggestions","forEach","updateTagSuggestions","firstPhrase","replace","old","handleResponseAndGoToList","ParentFieldContext","createContext","calculateMils","TagSuggestions","currentTags","valueGetter","calculateGrams","volumeToWeightRatio","prepareForSave","order","onTagsFilterChange","TextCell","fieldArrayName","useContext","dataIndex","AmountCell","NumericTextBox","calcMils","MilsCell","format","GramsCell","CheckboxCell","MeasureDropDownCell","calc","IngredientDropDownCell","ingredientOptionsText","options","setOptions","parentItem","IngredientsGrid","onAdd","useCallback","onPush","inEdit","toBeDeleted","GridColumn","InstructionsGrid","buttonRenderProps","allowCustom","Provider","FieldArray","TextArea","MealPlans","canCreateMore","EditMealPlanInitialState","numberOfDays","columnLabels","macroSummaries","shoppingListItems","EditShoppingListInitialState","items","EditMealPlanExportOptionsInitialState","introduction","FormGridContext","EditMealPlan","formRef","numberOfDaysOptions","week","setWeek","showWeek1","showWeek2","openShoppingList","openExportOptions","RowDetailCell","RecipeAddedToCellDisplay","gridCellProps","rowIndex","cellIndex","recipeIndex","onReplace","recipeDisplay","isLeftover","leftover","contentRef","timeoutRef","onBlurTimeout","onDeleteClick","change","backgroundImage","onOpen","focus","tabIndex","onFocus","onBlur","mdiContentCopy","isEmpty","modified","MealPlanCell","hiddenCell","orderedCellRecipes","sortBy","cr","cellRecipe","MealPlanCellsArrayGridCell","MealPlanGrid","excludeNutrition","mealPlanRowId","hideAddbutton","parentField","scrollable","NutritionTable","WeekButtons","summary","DayOfWeekLabels","mdiCart","AutoSaver","isSubmittedRef","valid","touched","ShoppingList","IngredientItemCell","ShoppingListGrid","mdiArrowLeft","ExportMealPlan","editorRef","exportPdf","EditorUtils","getHtml","state","CoverCheckboxCell","onChangeCover","RecipeCell","ImageDisplayCell","RecipeGrid","chosenIndex","RichTextEditor","Undo","EditorTools","Redo","FontSize","Bold","FormatBlock","Italic","Underline","Strikethrough","OrderedList","UnorderedList","Indent","Outdent","AlignLeft","AlignCenter","AlignRight","Unlink","Editor","defaultEditMode","tools","MealPlansRedirect","SubscriptionDetailsBanner","toLocaleDateString","showDanger","EditProfile","EditPassword","Tutorials","mdiYoutube","PrivacyPolicy","start","TermsAndConditions","SignUpViewModelInitialState","setupIntent","modality","modalityOther","SignUpForm","modalityOptions","stripe","useStripe","useElements","stripeError","setStripeError","handleSubmit","isUserNameTaken","isEmailTaken","returnUrl","origin","confirmSetup","confirmParams","return_url","exists","InputWithValidation","RegisterButton","RadioGroup","layout","SignUp","stripePromise","loadStripe","clientSecret","setClientSecret","stripeOptions","PaymentStatusQuery","signUpComplete","setSignUpComplete","setMessage","retrieveSetupIntent","createAccount","URLSearchParams","search","handleFailure","PaymentStatus","UpdatePaymentForm","UpdateButton","ManageSubscription","UpdatePaymentResultChild","isError","setIsError","updated","setUpdated","updatePaymentMethod","setupIntentId","UpdatePaymentResult","Home","section3tags","section3mealplans","section3recipes","section5feature","App","unauthenticatedUser","setAuth","subscribe","details","publicPages","p","element","ReactDOM","getElementById"],"mappings":"uSAAqBA,E,kCAAAA,EACZC,OAAiB,G,aCIbC,EAAM,SAACC,GAClB,IAAMC,EAAiB,CAAEC,OAAQ,MAAOC,QAASC,KAC3CC,EAAc,UAAGR,EAAcC,QAAWE,EAChD,OAAOM,MAAMD,EAAKJ,GAAgBM,KAAKC,IAI5BC,EAAW,SAACT,GACvB,IAAMC,EAAiB,CAAEC,OAAQ,MAAOC,QAASC,KAC3CC,EAAc,UAAGR,EAAcC,QAAWE,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H1DC,IAAS/f,OACP,cAAC,IAAD,UACE,cAAC,GAAD,MAEF2J,SAASqW,eAAe,W","file":"static/js/main.ccc1b518.chunk.js","sourcesContent":["export default class ServiceConfig {\r\n static apiUrl: string = '';\r\n}","import _ from \"lodash\";\r\nimport ServiceConfig from 'services/ServiceConfig';\r\nimport { AuthService } from 'services/AuthService';\r\n\r\n// GET - Query\r\nexport const get = (path: string) => {\r\n const requestOptions = { method: 'GET', headers: authHeader() };\r\n const url: string = `${ServiceConfig.apiUrl}` + path;\r\n return fetch(url, requestOptions).then(handleResponse);\r\n}\r\n\r\n// GET - File Download\r\nexport const download = (path: string) => {\r\n const requestOptions = { method: 'GET', headers: authHeader() };\r\n const url: string = `${ServiceConfig.apiUrl}` + path;\r\n return fetch(url, requestOptions).then((response) => { return response.blob(); });\r\n}\r\n\r\n// POST - Command Executor\r\nexport const execute = (commandName: string, command) => {\r\n const headers = {\r\n Authorization: bearerToken(),\r\n 'Content-Type': 'application/json',\r\n 'Command-Name': commandName,\r\n }\r\n\r\n const body = JSON.stringify(command, replacer); \r\n const requestOptions = { method: 'POST', headers: headers, body: body };\r\n const url: string = `${ServiceConfig.apiUrl}` + `/commands/execute`;\r\n return fetch(url, requestOptions).then(handleResponse);\r\n}\r\n\r\n// File Upload Component\r\nexport const uploadUrl = `${ServiceConfig.apiUrl}` + `/commands/upload`;\r\nexport const uploadHeaders = (commandName: string, parentType: string, parentId: string) => {\r\n return {\r\n Authorization: bearerToken(),\r\n 'Content-Type': 'application/json',\r\n 'Command-Name': commandName,\r\n 'Parent-Type': parentType,\r\n 'Parent-Id': parentId,\r\n }\r\n}\r\n\r\nexport const post = (path: string, content) => {\r\n const headers = {\r\n Authorization: bearerToken(),\r\n 'Content-Type': 'application/json',\r\n }\r\n\r\n const body = JSON.stringify(content, replacer); \r\n const requestOptions = { method: 'POST', headers: headers, body: body };\r\n const url: string = ServiceConfig.apiUrl + path;\r\n return fetch(url, requestOptions).then(handleResponse);\r\n}\r\n\r\nexport function handleResponse(response: Response) {\r\n\r\n return response.text().then(text => {\r\n const data = text && JSON.parse(text);\r\n if (!response.ok) {\r\n if ([401, 403].indexOf(response.status) !== -1) {\r\n // auto logout if 401 Unauthorized or 403 Forbidden response returned from api\r\n AuthService.logout();\r\n }\r\n\r\n // // The old way to do this. Now we just return the error.\r\n // const error = (data && data.message) || response.statusText;\r\n // return Promise.reject(error);\r\n }\r\n\r\n return data;\r\n });\r\n}\r\n\r\nexport function authHeader() {\r\n // return authorization header with jwt token\r\n const currentUser = AuthService.currentUserValue;\r\n if (currentUser && currentUser.token) {\r\n return { Authorization: `Bearer ${currentUser.token}` };\r\n } else {\r\n return {};\r\n }\r\n }\r\n\r\nexport function bearerToken() {\r\n // return jwt token\r\n const currentUser = AuthService.currentUserValue;\r\n if (currentUser && currentUser.token) {\r\n return `Bearer ${currentUser.token}`;\r\n } else {\r\n return undefined;\r\n }\r\n}\r\n\r\n// Replacer to change values when creating Json objects for APIs\r\nexport const replacer = (key, value) => {\r\n\r\n if (value === null){\r\n return null;\r\n }\r\n\r\n if (!!value && value.type == 'doc'){\r\n return;\r\n }\r\n\r\n // Return empty number strings as null\r\n if (value === ''){\r\n return null;\r\n }\r\n\r\n if (key === 'displayAsLiquid' || key === 'optional'){\r\n return value == 1 ? true : false;\r\n }\r\n\r\n if (key === 'externalId'){\r\n return value;\r\n }\r\n\r\n const listTypes = [ 'ingredients', 'instructions', 'tags', 'rows', 'cells', 'recipes' ];\r\n\r\n if ((_.includes(listTypes, key)) && !value.length){\r\n return [];\r\n }\r\n\r\n return value;\r\n}","import { BehaviorSubject } from 'rxjs';\r\nimport ServiceConfig from 'services/ServiceConfig';\r\nimport jwt_decode from 'jwt-decode';\r\nimport { IJwtClaims } from 'common/Interfaces';\r\nimport { ISignUpViewModel } from 'pages/Authentication/AuthViewModels';\r\nimport { get } from './Middleware';\r\n\r\nconst currentUserSubject = new BehaviorSubject(JSON.parse(localStorage.getItem('currentUser') as string));\r\nconst currentUsernameSubject = new BehaviorSubject(localStorage.getItem('currentUsername') as string);\r\nconst currentRoleSubject = new BehaviorSubject(localStorage.getItem('currentRole') as string);\r\n\r\nexport const login = async (username: string, password: string) => {\r\n const requestOptions = {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/json' },\r\n body: JSON.stringify({ username, password })\r\n };\r\n\r\n const response = await fetch(`${ServiceConfig.apiUrl}/account/token`, requestOptions);\r\n if (response.status != 200) {\r\n const error = await response.text();\r\n return error;\r\n }\r\n\r\n const text = await response.text();\r\n const token = JSON.parse(text);\r\n // store user details and jwt token in local storage to keep user logged in between page refreshes\r\n localStorage.setItem('currentUser', JSON.stringify(token));\r\n\r\n var decoded: IJwtClaims = jwt_decode(token.token);\r\n localStorage.setItem('currentUsername', decoded.unique_name);\r\n localStorage.setItem('currentRole', decoded.role);\r\n\r\n currentUserSubject.next(token);\r\n\r\n return 'success';\r\n}\r\n\r\nexport const getUserDetails = (token: string) => {\r\n const decoded: IJwtClaims = jwt_decode(token);\r\n return decoded;\r\n}\r\n\r\nexport const logout = () => {\r\n // remove user from local storage to log user out\r\n localStorage.removeItem('currentUser');\r\n localStorage.removeItem('currentUsername');\r\n localStorage.removeItem('currentRole');\r\n currentUserSubject.next(null);\r\n}\r\n\r\nexport const signUp = (model: ISignUpViewModel) => {\r\n\r\n const requestOptions = {\r\n method: 'POST',\r\n headers: { 'Content-Type': 'application/json' },\r\n body: JSON.stringify(model),\r\n };\r\n\r\n return fetch(ServiceConfig.apiUrl + '/account/signUp', requestOptions)\r\n .then(handleResponse);\r\n}\r\n\r\nexport const getPaymentIntent = () => {\r\n return get('/account/paymentIntent');\r\n}\r\n\r\nexport function handleResponse(response: Response) {\r\n return response.text().then(text => {\r\n const data = text && JSON.parse(text);\r\n return data;\r\n });\r\n}\r\n\r\nexport const AuthService = {\r\n login,\r\n logout,\r\n getUserDetails,\r\n signUp,\r\n getPaymentIntent,\r\n currentUser: currentUserSubject.asObservable(),\r\n get currentUserValue() { return currentUserSubject.value },\r\n currentUsername: currentUsernameSubject.asObservable(),\r\n get currentUsernameValue() { return currentUsernameSubject.value },\r\n currentRole: currentRoleSubject.asObservable(),\r\n get currentRoleValue() { return currentRoleSubject.value },\r\n};","import { useState } from 'react';\r\nimport { Dropdown, DropdownItem, DropdownMenu, DropdownToggle, NavItem } from 'reactstrap'\r\nimport { Icon } from '@mdi/react';\r\nimport { mdiAccountCircle, mdiTune, mdiShieldCrownOutline, mdiFoodAppleOutline, mdiLogout, mdiAccountGroup, mdiFormTextboxPassword, mdiEmail, mdiCardAccountDetailsStar } from '@mdi/js';\r\nimport { Link } from \"react-router-dom\";\r\nimport { IUserAuth } from 'common/Interfaces';\r\n\r\nexport const UserMenu = (props: { auth: IUserAuth }) => {\r\n\r\n const [dropdownOpen, setDropdownOpen] = useState(false);\r\n\r\n const toggle = () => setDropdownOpen(prevState => !prevState);\r\n\r\n const sendEmail = (e) => {\r\n window.location.href = 'mailto:support@wholisticmealplans.com.au';\r\n e.preventDefault();\r\n }\r\n\r\n const AdminMenuItems = () => {\r\n return (\r\n
\r\n \r\n Administration\r\n \r\n {/* \r\n Recipes\r\n */}\r\n \r\n Ingredients\r\n \r\n \r\n Users\r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n return (\r\n \r\n \r\n {props.auth.username}\r\n \r\n \r\n Edit Profile\r\n \r\n \r\n Manage Subscription\r\n \r\n \r\n Change Password\r\n \r\n \r\n {/* \r\n Contact Us\r\n */}\r\n \r\n {(props.auth.isAdmin) ? : <>} \r\n Sign Out\r\n \r\n \r\n \r\n );\r\n}","export default __webpack_public_path__ + \"static/media/wmp-logo.4c644c20.png\";","import { useState } from 'react';\r\nimport { Collapse, Container, Navbar, NavbarBrand, NavbarToggler, NavItem, NavLink } from 'reactstrap';\r\nimport { Link, useLocation, useNavigate, } from 'react-router-dom';\r\nimport { Button } from '@progress/kendo-react-buttons';\r\nimport { UserMenu } from 'components/UserMenu';\r\nimport { Icon } from '@mdi/react';\r\nimport { mdiGauge, mdiBookOpenPageVariantOutline, mdiCalendarTextOutline, mdiHelpCircleOutline } from '@mdi/js';\r\nimport logo from '../assets/images/wmp-logo.png';\r\nimport { IUserAuth } from 'common/Interfaces';\r\n\r\nexport const NavMenu = (props: { auth: IUserAuth }) => {\r\n\r\n // Navigation\r\n const nav = useNavigate();\r\n\r\n // Location\r\n const location = useLocation();\r\n\r\n const [collapsed, setCollapsed] = useState(false);\r\n\r\n const toggleNavbar = () => {\r\n setCollapsed(!collapsed);\r\n }\r\n\r\n const showSignInButton = (!props.auth || !props.auth.authenticated) && location.pathname != '/Login';\r\n\r\n const NotSignedInNavItems = () => (\r\n
\r\n Already a member? \r\n \r\n
\r\n );\r\n\r\n const SignedInNavItems = () => (\r\n <>\r\n \r\n Overview\r\n \r\n \r\n Tutorials\r\n \r\n \r\n Recipes\r\n \r\n \r\n Meal Plans\r\n \r\n \r\n );\r\n\r\n const AuthenticatedContent = () => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \"Wholistic\r\n \r\n {showSignInButton && }\r\n {!!props.auth.authenticated && }\r\n \r\n \r\n
\r\n );\r\n}\r\n","import { Link } from 'react-router-dom';\r\nimport { Container } from 'reactstrap';\r\n\r\nexport const Footer = () => {\r\n return (\r\n \r\n );\r\n}","import { Container } from 'reactstrap';\r\nimport { NavMenu } from 'components/NavMenu';\r\nimport { Footer } from 'components/Footer';\r\nimport { Outlet } from 'react-router-dom';\r\nimport { IUserAuth } from 'common/Interfaces';\r\n\r\nexport const Layout = (props: { auth: IUserAuth }) => {\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n );\r\n}","import { IUserAuth } from \"common/Interfaces\";\r\nimport { useEffect } from \"react\";\r\nimport { useNavigate } from \"react-router-dom\";\r\n\r\nexport const useSubscription = (auth: IUserAuth) => {\r\n\r\n const nav = useNavigate();\r\n\r\n useEffect(() => {\r\n if (!!auth.authenticated && !auth.isActiveSubscription) {\r\n nav('/ManageSubscription');\r\n }\r\n }, [auth]); \r\n}","import { useEffect } from \"react\";\r\nimport { IUserAuth } from \"common/Interfaces\";\r\nimport { useSubscription } from \"hooks/useSubscription\";\r\n\r\nexport const Overview = (props: { auth: IUserAuth }) => {\r\n\r\n // Check Subscription\r\n useSubscription(props.auth);\r\n\r\n return (\r\n
\r\n
\r\n

Welcome!

\r\n

\r\n
\r\n \r\n

Founder - Danyel Waters

\r\n
\r\n\r\n

We are so excited to have you here at Wholistic Meal Plans!

\r\n

Wholistic Meal Plans was born from the frustration experienced by our founder, Clinical Nutritionist - Danyel Waters, at the amount of time it took to develop and deliver nourishing, nutrient dense meal plans to patients with complex food intolerances or preferences.

\r\n

Wholistic Meal Plans is the only Australian-based, practitioner exclusive meal planning program helping Nutritionists, Dieticians, Naturopaths, Health Coaches and Personal Trainers, deliver customised meal plans for even the most complex clients.

\r\n

This recipe database is full of nutritionally dense, intolerance friendly meals that have been developed & adapted by our talented in-house chefs and Nutritionists. From Anti-candida to low histamine, we've created hundreds of recipes for over 25 commonly diagnosed food intolerances, providing meal options for a range of breakfasts, lunches, sides, dinners, salads, snacks, desserts and beverages.

\r\n

How does it work? Simply filter your intolerance(s), exclude any ingredients you may not like, find your recipes, and add the recipe to your clients meal plan. For example, you have a client who is gluten and dairy intolerant who is also histamine intolerant and doesn't like capsicum? Simple. Enter those details into the search field and only the meals that exclude those parameters will show. Allowing you to design a nutritionally balanced meal plan that takes all the guess work out of the equation. All meals have major macros per serving calculated as well as vitamins and minerals levels listed.

\r\n

Once your meal plan is complete, it can be exported to a wonderful PDF booklet that is customised with your Business Logo.

\r\n

Every single recipe listed in the Wholistic Meal Plan database has been cooked in our kitchen and the end result of your client's cooking experience will look and taste exactly how we made it. Making it easy and simple to follow for your client, creating greater adherence to treatment plans. We aim to become a Health Practitioner's best resource and an additional income for you as you add on customised Meal Plans to your services.

\r\n

We currently have over 560 recipes and are adding to these every month based on your feedback.

\r\n

If you have any questions or feedback you'd like to send us as you think of it, please reach out to us at support@wholisticmealplans.com.au

\r\n

We look forward to working with you!

\r\n \r\n

\r\n
\r\n
\r\n );\r\n }","/* https://stackoverflow.com/questions/54666401/how-to-use-throttle-or-debounce-with-react-hook */\r\n\r\nimport { useEffect } from \"react\";\r\n\r\nexport const useDebouncedEffect = (effect, deps, delay, firstCallMade: boolean) => {\r\n useEffect(() => {\r\n\r\n // If first call, then don't delay\r\n if (!firstCallMade) {\r\n delay = 0;\r\n }\r\n\r\n const handler = setTimeout(() => effect(), delay);\r\n\r\n return () => clearTimeout(handler);\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [...deps || [], delay]);\r\n}","import { get, execute } from 'services/Middleware';\r\nimport { ICreateIngredientCommand, IDeleteIngredientCommand, IUpdateIngredientCommand } from 'pages/Ingredients/IngredientCommands';\r\n\r\n/* Queries */\r\n\r\nexport const search = (keywords: string, onlyCustom: boolean) => {\r\n const path = `/ingredients/list?keywords=${keywords.toString()}&onlyCustom=${onlyCustom}`;\r\n return get(path);\r\n}\r\n\r\nexport const getById = (id: string) => {\r\n const path = `/ingredients/get?id=${id.toString()}`;\r\n return get(path);\r\n}\r\n\r\nexport const getSelectItems = (keywords: string) => {\r\n const path = `/ingredients/getSelectItems?keywords=${keywords.toString()}`;\r\n return get(path);\r\n}\r\n\r\n/* Commands */\r\n\r\nexport const create = (command: ICreateIngredientCommand) => {\r\n return execute('CreateIngredient', command);\r\n}\r\n\r\nexport const update = (command: IUpdateIngredientCommand) => {\r\n return execute('UpdateIngredient', command);\r\n}\r\n\r\nexport const del = (command: IDeleteIngredientCommand) => {\r\n return execute('DeleteIngredient', command);\r\n}\r\n\r\nexport const IngredientService = {\r\n search,\r\n getById,\r\n getSelectItems,\r\n create,\r\n update,\r\n del,\r\n}","import { useState } from 'react';\r\nimport { GridPageChangeEvent } from '@progress/kendo-react-grid';\r\nimport { InputChangeEvent } from \"@progress/kendo-react-inputs\";\r\nimport { PageChangeEvent } from \"@progress/kendo-react-data-tools\";\r\nimport { PageState } from 'common/Interfaces';\r\n\r\n\r\n\r\nexport const useListFunctions = () => {\r\n\r\n // Data\r\n const [rows, setRows] = useState([]);\r\n const [loading, setLoading] = useState(false);\r\n const [firstCallMade, setFirstCallMade] = useState(false);\r\n\r\n // Pagination\r\n const initialDataState: PageState = { skip: 0, take: 10 };\r\n const [page, setPage] = useState(initialDataState);\r\n const pageChange = (event: PageChangeEvent) => {\r\n setPage({ skip: event.skip, take: event.take })\r\n };\r\n const gridPageChange = (event: GridPageChangeEvent) => {\r\n setPage(event.page);\r\n };\r\n\r\n // Search\r\n const [searchText, setSearchText] = useState('');\r\n const searchTextChange = (event: InputChangeEvent) => {\r\n setSearchText(event.value);\r\n }\r\n\r\n return {\r\n rows,\r\n setRows,\r\n loading,\r\n setLoading,\r\n firstCallMade,\r\n setFirstCallMade,\r\n page,\r\n setPage,\r\n pageChange,\r\n gridPageChange,\r\n searchText,\r\n setSearchText,\r\n searchTextChange,\r\n }\r\n}\r\n\r\n","import { useDebouncedEffect } from 'hooks/useDebouncedEffect';\r\nimport { Grid, GridColumn as Column } from '@progress/kendo-react-grid';\r\nimport { Input, Checkbox } from \"@progress/kendo-react-inputs\";\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport { IngredientService } from 'services/IngredientService';\r\nimport { useNavigate } from 'react-router-dom';\r\nimport { mdiPlus } from '@mdi/js'; \r\nimport { Icon } from '@mdi/react';\r\nimport { useListFunctions } from 'hooks/useListFunctions';\r\nimport { useState } from 'react';\r\nimport { IUserAuth } from 'common/Interfaces';\r\n\r\nexport const Ingredients = (props: { auth: IUserAuth }) => {\r\n\r\n const list = useListFunctions();\r\n const [onlyCustom, setOnlyCustom] = useState(false);\r\n\r\n // Navigation\r\n const navigate = useNavigate();\r\n const addIngredient = () => navigate('/Admin/Ingredients/Edit');\r\n const editIngredient = (id: string) => navigate('/Admin/Ingredients/Edit/' + id);\r\n\r\n const editInNewTab = (id: string) => {\r\n window.open('/Admin/Ingredients/Edit/' + id, '_blank');\r\n }\r\n\r\n useDebouncedEffect(() => {\r\n runQuery(list.searchText);\r\n }, [list.searchText, onlyCustom], 1000, list.firstCallMade);\r\n\r\n const runQuery = (text) => {\r\n list.setFirstCallMade(true);\r\n list.setLoading(true);\r\n list.setRows([]);\r\n\r\n IngredientService.search(text, onlyCustom).then(results => list.setRows(results));\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

Ingredients

\r\n
\r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n setOnlyCustom(e.value)} label='Exclude Food Standards' />\r\n
\r\n
\r\n editInNewTab(e.dataItem.id)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}","import { SyntheticEvent, useEffect, useState } from 'react';\r\nimport { useNavigate } from 'react-router';\r\nimport { Alert } from 'reactstrap';\r\nimport { Button } from '@progress/kendo-react-buttons';\r\nimport { AuthService } from 'services/AuthService';\r\nimport { FieldWrapper } from '@progress/kendo-react-form';\r\nimport { Input } from \"@progress/kendo-react-inputs\";\r\n\r\nexport const Login = () => {\r\n const navigate = useNavigate();\r\n const [username, setUsername] = useState('');\r\n const [password, setPassword] = useState('');\r\n const [lastError, setLastError] = useState('');\r\n const [loading, setLoading] = useState(false);\r\n \r\n const submit = async (e: SyntheticEvent) => {\r\n e.preventDefault();\r\n setLoading(true);\r\n const response = await AuthService.login(username, password);\r\n if (response == 'success'){\r\n handleSuccess();\r\n } else {\r\n handleFailure(response);\r\n }\r\n setLoading(false);\r\n }\r\n\r\n function handleSuccess(){\r\n setLastError('');\r\n navigate('/Overview');\r\n }\r\n\r\n function handleFailure(error: string){\r\n setLastError(error);\r\n }\r\n \r\n useEffect(() => {\r\n if (!!AuthService.currentUserValue){\r\n handleSuccess();\r\n }\r\n }, []);\r\n\r\n const SignInButton = () => {\r\n if (loading) {\r\n return \r\n } else {\r\n return \r\n }\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n \r\n
\r\n

Existing User

\r\n
\r\n \r\n setUsername(e.target.value.toString())} />\r\n \r\n \r\n setPassword(e.target.value.toString())} />\r\n \r\n
\r\n \r\n {lastError}\r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n}","import React, { useEffect } from 'react';\r\nimport { AuthService } from 'services/AuthService';\r\n\r\nexport const Logout = () => {\r\n\r\n useEffect(() => {\r\n AuthService.logout();\r\n }, []);\r\n\r\n return (\r\n
\r\n

Signing you out...

\r\n
\r\n );\r\n}","export interface IIngredient {\r\n id: string;\r\n name: string;\r\n category: string;\r\n shortName: string;\r\n publicFoodKey: string;\r\n classificationId: number | undefined;\r\n energy: number | undefined;\r\n energyCalories: number | undefined;\r\n protein: number | undefined;\r\n fat: number | undefined;\r\n sugars: number | undefined;\r\n carbohydrates: number | undefined;\r\n calcium: number | undefined;\r\n copper: number | undefined;\r\n iodine: number | undefined;\r\n iron: number | undefined;\r\n magnesium: number | undefined;\r\n potassium: number | undefined;\r\n selenium: number | undefined;\r\n sodium: number | undefined;\r\n zinc: number | undefined;\r\n retinol: number | undefined;\r\n thiamin: number | undefined;\r\n riboflavin: number | undefined;\r\n niacin: number | undefined;\r\n pantothenicAcid: number | undefined;\r\n pyridoxine: number | undefined;\r\n biotin: number | undefined;\r\n cobalamin: number | undefined;\r\n folateNatural: number | undefined;\r\n vitaminC: number | undefined;\r\n cholecalciferol: number | undefined;\r\n vitaminE: number | undefined;\r\n fattyAcidsTotalSaturated: number | undefined;\r\n fattyAcidsTotalMonounsaturated: number | undefined;\r\n fattyAcidsTotalPolyunsaturated: number | undefined;\r\n}\r\n\r\nexport const IngredientInitialState: IIngredient = {\r\n id: '',\r\n name: '',\r\n category: '',\r\n shortName: '',\r\n publicFoodKey: ',',\r\n classificationId: undefined,\r\n energy: undefined,\r\n energyCalories: undefined,\r\n protein: undefined,\r\n fat: undefined,\r\n sugars: undefined,\r\n carbohydrates: undefined,\r\n calcium: undefined,\r\n copper: undefined,\r\n iodine: undefined,\r\n iron: undefined,\r\n magnesium: undefined,\r\n potassium: undefined,\r\n selenium: undefined,\r\n sodium: undefined,\r\n zinc: undefined,\r\n retinol: undefined,\r\n thiamin: undefined,\r\n riboflavin: undefined,\r\n niacin: undefined,\r\n pantothenicAcid: undefined,\r\n pyridoxine: undefined,\r\n biotin: undefined,\r\n cobalamin: undefined,\r\n folateNatural: undefined,\r\n vitaminC: undefined,\r\n cholecalciferol: undefined,\r\n vitaminE: undefined,\r\n fattyAcidsTotalSaturated: undefined,\r\n fattyAcidsTotalMonounsaturated: undefined,\r\n fattyAcidsTotalPolyunsaturated: undefined,\r\n}","import { useState, forwardRef, useImperativeHandle } from 'react';\r\nimport { Notification, NotificationGroup } from \"@progress/kendo-react-notification\";\r\nimport { Fade } from \"@progress/kendo-react-animation\";\r\n\r\nexport interface IAlertState {\r\n success: boolean;\r\n error: boolean;\r\n message: string;\r\n}\r\n\r\nexport const defaultAlertState: IAlertState = {\r\n success: false,\r\n error: false,\r\n message: '',\r\n}\r\n\r\nexport const Alert = forwardRef((props, ref) => {\r\n \r\n // Functions to be called by parent\r\n useImperativeHandle(ref, () => ({\r\n showSuccess(message?: string) {\r\n if (!message) {\r\n message = \"Changes saved.\";\r\n }\r\n setAlertState({...alertState, success: true, message: message});\r\n },\r\n showError(message?: string) {\r\n if (!message) {\r\n message = \"Error. Your changes were not saved.\";\r\n }\r\n setAlertState({...alertState, error: true, message: message});\r\n }\r\n }));\r\n\r\n const [alertState, setAlertState] = useState(defaultAlertState);\r\n const { success, error, message } = alertState;\r\n\r\n const closeAlert = () => setAlertState({...alertState, success: false, error: false, message: ''});\r\n\r\n return (\r\n \r\n \r\n {success && (\r\n \r\n {message}\r\n \r\n )}\r\n \r\n \r\n {error && (\r\n \r\n {message}\r\n \r\n )}\r\n \r\n \r\n );\r\n});","export const notEmpty = (value: string) => {\r\n if (value == undefined || value == null || value == '') {\r\n return 'Field is required.';\r\n }\r\n}\r\n\r\nexport const numberOrNull = (value: string) => {\r\n \r\n if (value == undefined || value == null || value == '') return '';\r\n \r\n if (isNaN(parseFloat(value))) return 'Not a valid number.';\r\n\r\n return '';\r\n}\r\n\r\nexport const numberZeroOrGreater = (value: string) => {\r\n if (value == undefined || value == null) return 'Field is required.';\r\n\r\n if (isNaN(parseFloat(value))) return 'Not a valid number.';\r\n\r\n if (parseFloat(value) < 0) return 'Value must be a positive number.';\r\n\r\n return '';\r\n}\r\n\r\nexport const numberGreaterThanZero = (value: string) => {\r\n if (value == undefined || value == null) return 'Field is required.';\r\n\r\n if (isNaN(parseFloat(value))) return 'Not a valid number.';\r\n\r\n if (parseFloat(value) < 1) return 'Value must be a positive number.';\r\n\r\n return '';\r\n}\r\n\r\nexport const tagsValid = (values: string[]) => {\r\n\r\n for (let i = 0; i < values.length; i++){\r\n\r\n const tag = values[i];\r\n\r\n if (tag.length > 32) {\r\n return `\"${tag}\" is too long. Tags must 32 characters or less.`;\r\n }\r\n\r\n if (!tag.match(/^[A-Za-z0-9]+$/)) {\r\n return `\"${tag}\" is not valid. Tags may only contain alphabets and numbers.`;\r\n }\r\n }\r\n\r\n return '';\r\n}\r\n\r\nexport const validPassword = (value: string) => {\r\n\r\n const requiredLength = 8;\r\n\r\n if (value == undefined || value == null) {\r\n return 'Password is required.';\r\n }\r\n \r\n if (value.length < requiredLength) {\r\n return `Password needs to be at least ${requiredLength} characters.`;\r\n }\r\n\r\n if (value.toLowerCase() === value) {\r\n return 'Password must have atleast one uppercase character.';\r\n }\r\n\r\n if (value.toUpperCase() === value) {\r\n return 'Password must have atleast one lowercase character.';\r\n }\r\n\r\n if (!/\\d/.test(value)) {\r\n return 'Password must have atleast one numeric character.';\r\n }\r\n \r\n return '';\r\n}\r\n\r\nexport const validUserName = (value: string) => {\r\n notEmpty(value);\r\n\r\n const alphaNumericRegex = /^[A-Za-z0-9]+$/;\r\n\r\n const minLength = 5;\r\n const maxLength = 20;\r\n\r\n if (value.length < minLength) {\r\n return `Username needs to be between ${minLength} and ${maxLength} characters.`;\r\n }\r\n\r\n if (value.indexOf(' ') !== -1) {\r\n return `Username cannot contains spaces.`;\r\n }\r\n\r\n if (!alphaNumericRegex.test(value)) {\r\n return `Username can only contains alphabets and numbers.`;\r\n }\r\n}\r\n\r\nexport const validPhoneNumber = (value: string) => {\r\n notEmpty(value);\r\n\r\n // Taken from https://uibakery.io/regex-library/phone-number\r\n const regex = /^\\+?\\d{1,4}?[-.\\s]?\\(?\\d{1,3}?\\)?[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,4}[-.\\s]?\\d{1,9}$/;\r\n if (!regex.test(value)){\r\n return `Phone number is not valid.`;\r\n }\r\n}\r\n\r\nexport const validEmail = (value: string) => {\r\n notEmpty(value);\r\n\r\n // Taken from https://uibakery.io/regex-library/email\r\n const regex = /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;\r\n if (!regex.test(value)){\r\n return `Email address is not valid.`;\r\n }\r\n}\r\n\r\nexport const FormValidation = {\r\n notEmpty,\r\n numberOrNull,\r\n numberZeroOrGreater,\r\n numberGreaterThanZero,\r\n tagsValid,\r\n validPassword,\r\n validUserName,\r\n validPhoneNumber,\r\n validEmail,\r\n}","import { forwardRef, useImperativeHandle, useState } from 'react';\r\nimport { Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';\r\nimport { Button } from \"@progress/kendo-react-buttons\";\r\nimport Icon from \"@mdi/react\";\r\nimport { mdiCheck, mdiCancel } from \"@mdi/js\";\r\n\r\ninterface IModalOkCancelProps {\r\n title: string;\r\n description: string;\r\n okText: string;\r\n cancelText: string;\r\n onOkClick: () => void;\r\n}\r\n\r\nexport const ModalOkCancel = forwardRef((props: IModalOkCancelProps, ref) => {\r\n\r\n const [visible, setVisible] = useState(false);\r\n\r\n const toggle = () => setVisible(!visible);\r\n\r\n // Functions to be called by parent\r\n useImperativeHandle(ref, () => ({\r\n showModal() {\r\n setVisible(true);\r\n },\r\n hideModal() {\r\n setVisible(false);\r\n }\r\n }));\r\n\r\n const ok = props.okText || 'Ok';\r\n const cancel = props.cancelText || 'Cancel';\r\n \r\n return (\r\n \r\n {props.title}\r\n {props.description}\r\n \r\n \r\n \r\n \r\n \r\n );\r\n});","import { IApiResponse, IUserAuth } from 'common/Interfaces';\r\nimport { IIngredient, IngredientInitialState } from 'pages/Ingredients/IngredientInterfaces';\r\nimport { IDeleteIngredientCommand } from 'pages/Ingredients/IngredientCommands';\r\nimport { Alert } from 'components/Alert';\r\nimport { Input } from \"@progress/kendo-react-inputs\";\r\nimport { DropDownList } from '@progress/kendo-react-dropdowns';\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport { Form, Field, FieldWrapper, FormElement, FieldRenderProps, FormRenderProps, } from \"@progress/kendo-react-form\";\r\nimport { Error } from \"@progress/kendo-react-labels\";\r\nimport { ChangeEvent, useEffect, useRef, useState } from 'react';\r\nimport { useNavigate, useParams } from 'react-router-dom';\r\nimport { IngredientService } from 'services/IngredientService';\r\nimport { FormValidation } from 'services/FormValidation';\r\nimport { mdiCheck, mdiDelete, mdiClose } from '@mdi/js'; \r\nimport { Icon } from '@mdi/react';\r\nimport { ModalOkCancel } from 'components/ModalOkCancel';\r\n\r\ninterface IMetricField {\r\n name: string,\r\n label: string,\r\n}\r\n\r\nconst metrics: IMetricField[] = [\r\n { name: 'volumeToWeightRatio', label: 'Volume to Weight Ratio (g/cup)'},\r\n { name: 'energy', label: 'Energy (kJ)'},\r\n { name: 'protein', label: 'Protein (g)'},\r\n { name: 'fat', label: 'Fat (g)'},\r\n { name: 'sugars', label: 'Sugars (g)'},\r\n { name: 'carbohydrates', label: 'Carbohydrates (g)'},\r\n { name: 'calcium', label: 'Calcium'},\r\n { name: 'copper', label: 'Copper' },\r\n { name: 'iodine', label: 'Iodine' },\r\n { name: 'iron', label: 'Iron' },\r\n { name: 'magnesium', label: 'Magnesium' },\r\n { name: 'potassium', label: 'Potassium' },\r\n { name: 'selenium', label: 'Selenium' },\r\n { name: 'sodium', label: 'Sodium' },\r\n { name: 'zinc', label: 'Zinc' },\r\n { name: 'retinol', label: 'Retinol' },\r\n { name: 'thiamin', label: 'Thiamin' },\r\n { name: 'riboflavin', label: 'Riboflavin' },\r\n { name: 'niacin', label: 'Niacin' },\r\n { name: 'pantothenicAcid', label: 'Patothenic Acid' },\r\n { name: 'pyridoxine', label: 'Pyridoxine' },\r\n { name: 'biotin', label: 'Biotin' },\r\n { name: 'cobalamin', label: 'Cobalimin' },\r\n { name: 'folateNatural', label: 'Folate Natural' },\r\n { name: 'vitaminC', label: 'Vitamin C' },\r\n { name: 'cholecalciferol', label: 'Cholecalciferol' },\r\n { name: 'vitaminE', label: 'Vitamin E' },\r\n { name: 'fattyAcidsTotalSaturated', label: 'Fatty Acids - Total Saturated' },\r\n { name: 'fattyAcidsTotalMonounsaturated', label: 'Fatty Acids - Total Monounsaturated' },\r\n { name: 'fattyAcidsTotalPolyunsaturated', label: 'Fatty Acids - Total Polyunsaturated' },\r\n];\r\n\r\nconst categories = [\r\n 'Fruits',\r\n 'Vegetables',\r\n 'Bread, dairy, and eggs',\r\n 'Fish, poultry, and meat',\r\n 'Boxed and canned',\r\n 'Grains and dry goods',\r\n 'Condiments and oils',\r\n 'Seeds, nuts, and spices',\r\n 'Frozen',\r\n 'Cold',\r\n 'Other',\r\n];\r\n\r\nexport const EditIngredient = (props: { auth: IUserAuth }) => {\r\n\r\n // Setup View\r\n const { id } = useParams();\r\n const nav = useNavigate();\r\n const [view, setView] = useState(IngredientInitialState);\r\n\r\n // Alerts\r\n const alertRef = useRef(null);\r\n\r\n // Delete Modal\r\n const deleteModalRef = useRef(null);\r\n\r\n // Load Data\r\n useEffect(() => {\r\n if (!!id){\r\n IngredientService.getById(id).then(result => setView(result));\r\n }\r\n }, []);\r\n\r\n // Actions\r\n const saveChanges = (formData: IIngredient) => {\r\n if (!view.id){\r\n IngredientService.create(formData).then(result => handleSaveResponse(result));\r\n } else {\r\n IngredientService.update(formData).then(result => handleSaveResponse(result));\r\n }\r\n }\r\n\r\n const handleSaveResponse = (data: IApiResponse) => {\r\n if (data.success){\r\n alertRef.current.showSuccess();\r\n }\r\n else {\r\n alertRef.current.showError(data.Title);\r\n }\r\n };\r\n\r\n const showDeleteModal = () => {\r\n deleteModalRef.current.showModal();\r\n }\r\n\r\n const confirmDeleteItem = () => {\r\n let command: IDeleteIngredientCommand = { id: view.id };\r\n IngredientService.del(command).then(result => handleDeleteResponse(result));\r\n }\r\n\r\n const handleDeleteResponse = (data: IApiResponse) => {\r\n if (data.success){\r\n closeItem();\r\n }\r\n else {\r\n alertRef.current.showError(data.Title);\r\n }\r\n };\r\n\r\n const closeItem = () => {\r\n nav('/Admin/Ingredients');\r\n };\r\n\r\n const MetricField = (fieldRenderProps: FieldRenderProps, props: IMetricField) => {\r\n const { validationMessage, visited, ...others } = fieldRenderProps;\r\n return (\r\n \r\n \r\n {visited && validationMessage && {validationMessage}}\r\n \r\n );\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
(\r\n \r\n
\r\n
\r\n

Edit Ingredient

\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {metrics.map((metric) => (\r\n \r\n ))}\r\n \r\n
\r\n )} />\r\n \r\n\r\n \r\n
\r\n
\r\n );\r\n}","import { get, execute } from 'services/Middleware';\r\nimport { ICreateUserCommand, IUpdateUserCommand, IArchiveUserCommand, IRestoreUserCommand, IDeleteUserCommand, IUpdateProfileCommand, IUpdatePasswordCommand, IUpdatePaymentMethodCommand } from 'pages/Users/UserCommands';\r\n\r\n/* Queries */\r\n\r\nexport const search = (keywords: string) => {\r\n const path = `/users/list?keywords=${keywords.toString()}`;\r\n return get(path);\r\n}\r\n\r\nexport const getById = (id: string) => {\r\n const path = `/users/get?id=${id.toString()}`;\r\n return get(path);\r\n}\r\n\r\nexport const getRoleOptions = () => {\r\n const path = `/users/getRoleOptions`;\r\n return get(path);\r\n}\r\n\r\nexport const getProfileForEdit = () => {\r\n const path = `/users/getProfileForEdit`;\r\n return get(path);\r\n}\r\n\r\nexport const getUpdateSetupIntent = () => {\r\n return get('/users/getUpdateSetupIntent');\r\n}\r\n\r\n/* Commands */\r\n\r\nexport const create = (command: ICreateUserCommand) => {\r\n return execute('CreateUser', command);\r\n}\r\n\r\nexport const update = (command: IUpdateUserCommand) => {\r\n return execute('UpdateUser', command);\r\n}\r\n\r\nexport const archive = (command: IArchiveUserCommand) => {\r\n return execute('ArchiveUser', command);\r\n}\r\n\r\nexport const restore = (command: IRestoreUserCommand) => {\r\n return execute('RestoreUser', command);\r\n}\r\n\r\nexport const del = (command: IDeleteUserCommand) => {\r\n return execute('DeleteUser', command);\r\n}\r\n\r\nexport const updateProfile = (command: IUpdateProfileCommand) => {\r\n return execute('UpdateProfile', command);\r\n}\r\n\r\nexport const updatePassword = (command: IUpdatePasswordCommand) => {\r\n return execute('UpdatePassword', command);\r\n}\r\n\r\nexport const updatePaymentMethod = (command: IUpdatePaymentMethodCommand) => {\r\n return execute('UpdatePaymentMethod', command);\r\n}\r\n\r\nexport const UserService = {\r\n search,\r\n getById,\r\n getRoleOptions,\r\n getProfileForEdit,\r\n getUpdateSetupIntent,\r\n create,\r\n update,\r\n archive,\r\n restore,\r\n del,\r\n updateProfile,\r\n updatePassword,\r\n updatePaymentMethod,\r\n}","import { useEffect, useState } from 'react';\r\nimport { useDebouncedEffect } from 'hooks/useDebouncedEffect';\r\nimport { Grid, GridCellProps, GridColumn as Column } from '@progress/kendo-react-grid';\r\nimport { Input } from \"@progress/kendo-react-inputs\";\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport { UserService } from 'services/UserService';\r\nimport { useNavigate } from 'react-router-dom';\r\nimport { mdiPlus } from '@mdi/js'; \r\nimport { Icon } from '@mdi/react';\r\nimport { useListFunctions } from 'hooks/useListFunctions';\r\nimport { IUserAuth } from 'common/Interfaces';\r\n\r\nexport const Users = (props: { auth: IUserAuth }) => {\r\n\r\n const list = useListFunctions();\r\n\r\n // Navigation\r\n const navigate = useNavigate();\r\n const addUser = () => navigate('/Admin/Users/Edit');\r\n const editUser = (id:string) => navigate('/Admin/Users/Edit/' + id);\r\n\r\n useDebouncedEffect(() => {\r\n runQuery(list.searchText);\r\n }, [list.searchText], 1000, list.firstCallMade);\r\n\r\n const runQuery = (text) => {\r\n list.setFirstCallMade(true);\r\n list.setLoading(true);\r\n list.setRows([]);\r\n\r\n UserService.search(text).then(results => list.setRows(results));\r\n };\r\n\r\n const ExpiryCell = (props: GridCellProps) => {\r\n\r\n if (!props.dataItem.expiry) return -;\r\n\r\n var expiry = new Date(props.dataItem.expiry);\r\n var expiryString = expiry.toLocaleString();\r\n return {expiryString};\r\n }\r\n\r\n const ArchivedCell = (props: GridCellProps, booleanField: boolean) => {\r\n return (props.dataItem.archived) ? Yes : -\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

Users

\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n editUser(e.dataItem.id)}>\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n}","export interface IUser {\r\n id: string;\r\n userName: string;\r\n email: string;\r\n phoneNumber: string;\r\n firstName: string;\r\n lastName: string;\r\n companyName: string;\r\n role: string;\r\n archived: boolean;\r\n imageId: string;\r\n imageUri: string;\r\n password: string;\r\n confirmPassword: string;\r\n expiry: string | null;\r\n stripeSetupIntentId: string;\r\n stripeCustomerId: string;\r\n stripeSubscriptionId: string;\r\n}\r\n\r\nexport const UserInitialState: IUser = {\r\n id: '',\r\n userName: '',\r\n email: '',\r\n phoneNumber: '',\r\n firstName: '',\r\n lastName: '',\r\n companyName: '',\r\n role: '',\r\n archived: false,\r\n imageId: '',\r\n imageUri: '',\r\n password: '',\r\n confirmPassword: '',\r\n expiry: null,\r\n stripeSetupIntentId: '',\r\n stripeCustomerId: '',\r\n stripeSubscriptionId: '',\r\n}\r\n\r\nexport interface IEditProfile {\r\n id: string;\r\n email: string;\r\n phoneNumber: string;\r\n firstName: string;\r\n lastName: string;\r\n companyName: string;\r\n imageId: string;\r\n imageUri: string;\r\n expiry: string | null;\r\n}\r\n\r\nexport const EditProfileInitialState: IEditProfile = {\r\n id: '',\r\n email: '',\r\n phoneNumber: '',\r\n firstName: '',\r\n lastName: '',\r\n companyName: '',\r\n imageId: '',\r\n imageUri: '',\r\n expiry: '',\r\n}\r\n\r\nexport interface IEditPassword {\r\n oldPassword: string;\r\n newPassword: string;\r\n confirmPassword: string;\r\n}\r\n\r\nexport const EditPasswordInitialState: IEditPassword = {\r\n oldPassword: '',\r\n newPassword: '',\r\n confirmPassword: '',\r\n}","import { IApiResponse, IUserAuth } from 'common/Interfaces';\r\nimport { IUser, UserInitialState } from 'pages/Users/UserInterfaces';\r\nimport { ChangeEvent, useEffect, useRef, useState } from 'react';\r\nimport { useNavigate, useParams } from 'react-router-dom';\r\nimport { UserService } from 'services/UserService';\r\nimport { Alert } from 'components/Alert';\r\nimport { Input, Checkbox } from \"@progress/kendo-react-inputs\";\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport { DropDownList, DropDownListChangeEvent } from '@progress/kendo-react-dropdowns';\r\nimport { Form, Field, FieldWrapper, FormElement, FormRenderProps, FieldRenderProps, } from \"@progress/kendo-react-form\";\r\nimport { Error } from \"@progress/kendo-react-labels\";\r\nimport { FormValidation } from 'services/FormValidation';\r\nimport { mdiCheck, mdiArchive, mdiRestore, mdiDelete, mdiClose } from '@mdi/js'; \r\nimport { Icon } from '@mdi/react';\r\nimport { IArchiveUserCommand, IDeleteUserCommand, IRestoreUserCommand } from 'pages/Users/UserCommands';\r\nimport { IImageSelectorProps } from 'pages/Recipes/RecipeInterfaces';\r\nimport { Upload, UploadOnStatusChangeEvent } from '@progress/kendo-react-upload';\r\nimport { Card, CardBody, CardFooter, Label } from 'reactstrap';\r\nimport { uploadHeaders, uploadUrl } from 'services/Middleware';\r\nimport { ModalOkCancel } from 'components/ModalOkCancel';\r\n\r\nexport const EditUser = (props: { auth: IUserAuth }) => {\r\n\r\n // Setup View\r\n const { id } = useParams();\r\n const nav = useNavigate();\r\n const [view, setView] = useState(UserInitialState);\r\n\r\n // DropDownLists\r\n const [roleOptions, setRoleOptions] = useState([]);\r\n\r\n // Alerts\r\n const alertRef = useRef(null);\r\n\r\n // Delete Modal\r\n const deleteModalRef = useRef(null);\r\n\r\n // Load Data\r\n useEffect(() => {\r\n\r\n UserService.getRoleOptions().then(result => setRoleOptions(result));\r\n\r\n if (!!id){\r\n UserService.getById(id).then(result => setView(result));\r\n }\r\n \r\n }, []);\r\n\r\n // Actions\r\n const saveChanges = (formData: IUser) => {\r\n \r\n if (!!formData.expiry) {\r\n console.log(formData.expiry);\r\n }\r\n\r\n if (!view.id){\r\n UserService.create(formData).then(result => handleResponseAndClose(result));\r\n } else {\r\n UserService.update(formData).then(result => handleResponseAndReload(result));\r\n }\r\n }\r\n\r\n const archiveItem = () => {\r\n let command: IArchiveUserCommand = { id: view.id };\r\n UserService.archive(command).then(result => handleResponseAndReload(result, 'User archived.'));\r\n }\r\n\r\n const restoreItem = () => {\r\n let command: IRestoreUserCommand = { id: view.id };\r\n UserService.restore(command).then(result => handleResponseAndReload(result, 'User restored.'));\r\n }\r\n\r\n const showDeleteModal = () => {\r\n deleteModalRef.current.showModal();\r\n }\r\n\r\n const confirmDeleteItem = () => {\r\n let command: IDeleteUserCommand = { id: view.id };\r\n UserService.del(command).then(result => handleResponseAndClose(result));\r\n }\r\n\r\n const handleResponseAndReload = (data: IApiResponse, successMessage?: string) => {\r\n if (!data.success){\r\n alertRef.current.showError(data.Title);\r\n return;\r\n }\r\n\r\n alertRef.current.showSuccess(successMessage);\r\n UserService.getById(id).then(result => setView(result));\r\n };\r\n\r\n const handleResponseAndClose = (data: IApiResponse) => {\r\n if (!data.success){\r\n alertRef.current.showError(data.Title);\r\n return;\r\n }\r\n closeItem();\r\n };\r\n\r\n const closeItem = () => {\r\n nav(-1);\r\n };\r\n\r\n const title = (!!view.id)\r\n ? (view.archived) ? `${view.userName} (Archived)` : `${view.userName}`\r\n : 'Create User';\r\n\r\n const saveLabel = (!!view.id) ? 'Save Changes' : 'Create';\r\n\r\n const Buttons = () => {\r\n if (view.archived) {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n\r\n const FieldsForExistingUser = (props) => {\r\n if (!view.id) {\r\n return (\r\n <>\r\n );\r\n }\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n const ImageSelector = (props: IImageSelectorProps) => {\r\n\r\n const [lastImage, setLastImage] = useState(view.imageUri);\r\n\r\n const onUploadCompleted = (e: UploadOnStatusChangeEvent) => {\r\n if (e.response && e.response.status == 200){\r\n\r\n // The title field has the imageUri\r\n const result = e.response.response.title;\r\n setLastImage(result);\r\n props.formRenderProps.onChange('imageId', { value: getImageIdFromUri(result)});\r\n }\r\n }\r\n\r\n const getImageIdFromUri = (uri: string) => {\r\n const fileName = uri.split('/').pop();\r\n return fileName.substring(0, fileName.lastIndexOf('.'));\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n {lastImage && }\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n return (\r\n
\r\n
\r\n (\r\n \r\n
\r\n
\r\n

{title}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n )} />\r\n \r\n \r\n
\r\n
\r\n );\r\n}","import { get, execute, download } from 'services/Middleware';\r\nimport { ICreateRecipeCommand, IUpdateRecipeCommand, IArchiveRecipeCommand, IRestoreRecipeCommand, IDeleteRecipeCommand } from 'pages/Recipes/RecipeCommands';\r\n\r\n/* Queries */\r\n\r\nexport const search = (keywords: string, tags: string[], excludeTags: string[], maxTime: number | null) => {\r\n let path = `/recipes/list?keywords=${keywords.toString()}`;\r\n if (tags.length) path += `&tags=${tags.join(',')}`;\r\n if (excludeTags.length) path += `&excludeTags=${excludeTags.join(',')}`;\r\n if (!!maxTime) path += `&maxTime=${maxTime}`;\r\n return get(path);\r\n}\r\n\r\nexport const getById = (id: string) => {\r\n const path = `/recipes/get?id=${id.toString()}`;\r\n return get(path);\r\n}\r\n\r\nexport const getForEdit = (id: string) => {\r\n const path = `/recipes/getForEdit?id=${id.toString()}`;\r\n return get(path);\r\n}\r\n\r\nexport const getTags = () => {\r\n const path = `/recipes/getTags`;\r\n return get(path);\r\n}\r\n\r\nexport const exportPdf = (id: string) => {\r\n const path = `/recipes/exportPdf?id=${id.toString()}`;\r\n return download(path);\r\n}\r\n\r\n/* Commands */\r\n\r\nexport const create = (command: ICreateRecipeCommand) => {\r\n return execute('CreateRecipe', command);\r\n}\r\n\r\nexport const update = (command: IUpdateRecipeCommand) => {\r\n return execute('UpdateRecipe', command);\r\n}\r\n\r\nexport const archive = (command: IArchiveRecipeCommand) => {\r\n return execute('ArchiveRecipe', command);\r\n}\r\n\r\nexport const restore = (command: IRestoreRecipeCommand) => {\r\n return execute('RestoreRecipe', command);\r\n}\r\n\r\nexport const del = (command: IDeleteRecipeCommand) => {\r\n return execute('DeleteRecipe', command);\r\n}\r\n\r\nexport const RecipeService = {\r\n search,\r\n getById,\r\n getForEdit,\r\n getTags,\r\n exportPdf,\r\n create,\r\n update,\r\n archive,\r\n restore,\r\n del,\r\n}","import { get, download, execute } from 'services/Middleware';\r\nimport { IAddRecipeToMealPlanCommand, IArchiveMealPlanCommand, ICreateMealPlanCommand, IDeleteMealPlanCommand, IRestoreMealPlanCommand, IUpdateExportOptionsCommand, IUpdateMealPlanCommand, IUpdateShoppingListCommand } from './MealPlanCommands';\r\n\r\n/* Queries */\r\n\r\nexport const search = (keywords: string) => {\r\n let path = `/mealplans/list?keywords=${keywords.toString()}`;\r\n return get(path);\r\n}\r\n\r\nexport const getById = (id: string) => {\r\n const path = `/mealplans/get?id=${id.toString()}`;\r\n return get(path);\r\n}\r\n\r\nexport const getRecipeCellDisplay = (id: string) => {\r\n const path = `/mealplans/recipeCellDisplay?id=${id.toString()}`;\r\n return get(path);\r\n}\r\n\r\nexport const getShoppingList = (id: string) => {\r\n const path = `/mealplans/getShoppingList?id=${id.toString()}`;\r\n return get(path);\r\n}\r\n\r\nexport const getExportOptions = (id: string) => {\r\n const path = `/mealplans/getExportOptions?id=${id.toString()}`;\r\n return get(path);\r\n}\r\n\r\nexport const getLastEditedId = () => {\r\n const path = `/mealplans/getLastEditedMealPlanId`;\r\n return get(path);\r\n}\r\n\r\nexport const exportPdf = (id: string) => {\r\n const path = `/mealplans/exportPdf?id=${id.toString()}`;\r\n return download(path);\r\n}\r\n\r\n/* Commands */\r\n\r\nexport const create = (command: ICreateMealPlanCommand) => {\r\n return execute('CreateMealPlan', command);\r\n}\r\n\r\nexport const update = (command: IUpdateMealPlanCommand) => {\r\n return execute('UpdateMealPlan', command);\r\n}\r\n\r\nexport const archive = (command: IArchiveMealPlanCommand) => {\r\n return execute('ArchiveMealPlan', command);\r\n}\r\n\r\nexport const restore = (command: IRestoreMealPlanCommand) => {\r\n return execute('RestoreMealPlan', command);\r\n}\r\n\r\nexport const del = (command: IDeleteMealPlanCommand) => {\r\n return execute('DeleteMealPlan', command);\r\n}\r\n\r\nexport const addRecipe = (command: IAddRecipeToMealPlanCommand) => {\r\n return execute('AddRecipeToMealPlan', command);\r\n}\r\n\r\nexport const updateShoppingList = (command: IUpdateShoppingListCommand) => {\r\n return execute('UpdateShoppingList', command);\r\n}\r\n\r\nexport const updateExportOptions = (command: IUpdateExportOptionsCommand) => {\r\n return execute('UpdateExportOptions', command);\r\n}\r\n\r\nexport const MealPlanService = {\r\n search,\r\n getById,\r\n getRecipeCellDisplay,\r\n getShoppingList,\r\n getExportOptions,\r\n getLastEditedId,\r\n exportPdf,\r\n create,\r\n update,\r\n archive,\r\n restore,\r\n del,\r\n addRecipe,\r\n updateShoppingList,\r\n updateExportOptions,\r\n}","import { useEffect, useRef, useState } from \"react\";\r\nimport _ from \"lodash\";\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport { DropDownList, DropDownListChangeEvent } from \"@progress/kendo-react-dropdowns\";\r\nimport { Checkbox } from \"@progress/kendo-react-inputs\";\r\nimport { Align, Popup } from \"@progress/kendo-react-popup\";\r\nimport Icon from \"@mdi/react\";\r\nimport { mdiCheck, mdiClose, mdiPlus } from \"@mdi/js\";\r\nimport { Card, CardBody, CardFooter } from \"reactstrap\";\r\nimport { MealPlanService } from \"./MealPlanService\";\r\nimport { IEditMealPlan, IMealPlanSelectOption } from \"./MealPlanInterfaces\";\r\nimport { on } from \"events\";\r\n\r\nexport interface AddToMealPlanButtonProps {\r\n recipeId: string;\r\n mealPlanId?: string;\r\n buttonLabel?: string;\r\n buttonIcon?: string;\r\n smallButton?: boolean;\r\n onCopyComplete?: any;\r\n disabled?: boolean;\r\n}\r\n\r\nexport const AddToMealPlanButton = (props: AddToMealPlanButtonProps) => {\r\n\r\n const [mealPlanSelection, setMealPlanSelection] = useState(null);\r\n const [mealPlan, setMealPlan] = useState(null);\r\n \r\n const [selectedCells, setSelectedCells] = useState([]);\r\n\r\n const anchor = useRef();\r\n const [popupVisible, setPopupVisible] = useState(false);\r\n const [firstOpen, setFirstOpen] = useState(true);\r\n\r\n const buttonLabel = props.buttonLabel ?? 'Meal Plan';\r\n const buttonIcon = props.buttonIcon ?? mdiPlus;\r\n\r\n const togglePopup = () => {\r\n setPopupVisible(!popupVisible);\r\n setSelectedCells([]);\r\n\r\n if (firstOpen || !mealPlanOptions.length) {\r\n loadMealPlanOptions();\r\n setFirstOpen(false);\r\n }\r\n }\r\n\r\n const [mealPlanOptions, setMealPlanOptions] = useState([]);\r\n\r\n const allowSubmit = !!mealPlanSelection && !!mealPlanSelection.id && selectedCells.length > 0;\r\n\r\n useEffect(() => {\r\n if (!!mealPlanSelection){\r\n MealPlanService.getById(mealPlanSelection.id).then(result => {\r\n if (!!result) {\r\n setMealPlan(result);\r\n }\r\n });\r\n }\r\n }, [mealPlanSelection]);\r\n\r\n const loadMealPlanOptions = () => {\r\n MealPlanService.search('').then(results => {\r\n setMealPlanOptions(results);\r\n if (!!results && results.length > 0){\r\n\r\n const currentMealPlanInResults = _.find(results, r => r.id == props.mealPlanId);\r\n if (!!currentMealPlanInResults){\r\n setMealPlanSelection(currentMealPlanInResults);\r\n }\r\n else {\r\n setMealPlanSelection(results[0]);\r\n }\r\n }\r\n });\r\n }\r\n\r\n const handleMealPlanChange = (event: DropDownListChangeEvent) => {\r\n setMealPlanSelection(event.target.value);\r\n }\r\n\r\n const onCloseClick = () => {\r\n setPopupVisible(false);\r\n }\r\n\r\n const add = () => {\r\n MealPlanService.addRecipe({\r\n recipeId: props.recipeId,\r\n mealPlanId: mealPlanSelection.id,\r\n cellIds: selectedCells,\r\n }).then(ok => {\r\n if (!!props.onCopyComplete){\r\n props.onCopyComplete(); \r\n }\r\n if (!!mealPlanSelection){\r\n MealPlanService.getById(mealPlanSelection.id).then(result => {\r\n if (!!result) {\r\n setMealPlan(result);\r\n }\r\n });\r\n }\r\n setPopupVisible(false);\r\n })\r\n }\r\n\r\n const toggleCheckbox = (add, cellId: string) => {\r\n if (add) {\r\n var temp = selectedCells.concat(cellId);\r\n setSelectedCells(temp);\r\n } else {\r\n var temp = selectedCells.filter(c => c != cellId);\r\n setSelectedCells(temp);\r\n }\r\n }\r\n\r\n const anchorAlign: Align = {\r\n horizontal: 'center',\r\n vertical: 'top',\r\n }\r\n\r\n return (\r\n\r\n <>\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n 0}\r\n value={mealPlanSelection} onChange={handleMealPlanChange} />\r\n {!!mealPlan &&\r\n \r\n {mealPlan.rows.map((row) => \r\n \r\n \r\n {row.cells.map((cell) => \r\n \r\n )}\r\n \r\n )}\r\n
\r\n {row.name}\r\n \r\n toggleCheckbox(e.target.value, cell.id)} hidden={cell.recipes.length >= 3} />\r\n
}\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n\r\n
\r\n
\r\n \r\n );\r\n}","import { mdiImage } from \"@mdi/js\";\r\nimport Icon from \"@mdi/react\";\r\nimport { ListViewItemProps } from \"@progress/kendo-react-listview\";\r\nimport { AddToMealPlanButton } from \"pages/MealPlans/AddToMealPlanButton\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport { Card, CardBody, CardFooter, CardHeader, CardImg } from \"reactstrap\";\r\nimport { IRecipeListItem } from \"./RecipeInterfaces\";\r\n\r\nexport const RecipeListItemImage = (props: { item: IRecipeListItem }) => {\r\n\r\n // Navigation\r\n const navigate = useNavigate();\r\n const viewRecipe = (id: string) => navigate('/Recipes/View/' + id);\r\n\r\n if (props.item.imageUri == null) {\r\n return (\r\n viewRecipe(props.item.id)}>\r\n \r\n \r\n );\r\n }\r\n\r\n return viewRecipe(props.item.id)} />;\r\n}\r\n\r\nexport const RecipeListItem = (props: ListViewItemProps) => {\r\n\r\n // Navigation\r\n const navigate = useNavigate();\r\n const viewRecipe = (id: string) => navigate('/Recipes/View/' + id);\r\n\r\n let item: IRecipeListItem = props.dataItem;\r\n\r\n return (\r\n \r\n viewRecipe(props.dataItem.id)}>\r\n {item.name}{item.isArchived &&  (Archived)}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n {item.time} minutes\r\n \r\n
\r\n
\r\n \r\n {item.servings} servings\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n );\r\n}","export const Spinner = (props: { loading: boolean }) => {\r\n return (\r\n \r\n )\r\n}","import { useState, useEffect } from 'react';\r\n\r\nfunction getSessionStorageOrDefault(key, defaultValue) {\r\n const stored = sessionStorage.getItem(key);\r\n if (!stored) {\r\n return defaultValue;\r\n }\r\n return JSON.parse(stored);\r\n}\r\n\r\nexport function useSessionStorage(key, defaultValue) {\r\n const [value, setValue] = useState(\r\n getSessionStorageOrDefault(key, defaultValue)\r\n );\r\n\r\n useEffect(() => {\r\n sessionStorage.setItem(key, JSON.stringify(value));\r\n }, [key, value]);\r\n\r\n return [value, setValue];\r\n}","import { useDebouncedEffect } from 'hooks/useDebouncedEffect';\r\nimport { ListView, ListViewEvent } from '@progress/kendo-react-listview';\r\nimport { Input, InputChangeEvent, Slider } from \"@progress/kendo-react-inputs\";\r\nimport { MultiSelectFilterChangeEvent, MultiSelect } from \"@progress/kendo-react-dropdowns\";\r\nimport { filterBy, FilterDescriptor } from \"@progress/kendo-data-query\";\r\nimport { Label } from \"@progress/kendo-react-labels\";\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport { useNavigate } from 'react-router-dom';\r\nimport { mdiPlus, mdiFilterOffOutline } from '@mdi/js'; \r\nimport { Icon } from '@mdi/react';\r\nimport _ from \"lodash\";\r\nimport { useListFunctions } from 'hooks/useListFunctions';\r\nimport { RecipeService } from 'pages/Recipes/RecipeService';\r\nimport { useEffect, useState } from 'react';\r\nimport { RecipeListItem } from './RecipeListItem';\r\nimport { Spinner } from 'components/Spinner';\r\nimport { useSessionStorage } from 'hooks/useSessionStorage';\r\nimport { IUserAuth } from 'common/Interfaces';\r\nimport { useSubscription } from 'hooks/useSubscription';\r\n\r\nexport const Recipes = (props: { auth: IUserAuth }) => {\r\n const list = useListFunctions();\r\n\r\n // Navigation\r\n const navigate = useNavigate();\r\n const addRecipe = () => navigate('/Recipes/Edit');\r\n\r\n const [allTagOptions, setAllTagOptions] = useState([]);\r\n const [tagOptions, setTagOptions] = useState(allTagOptions);\r\n const [excludeTagOptions, setExcludeTagOptions] = useState(allTagOptions);\r\n\r\n const [searchText, setSearchText] = useSessionStorage('searchText', '');\r\n const [tags, setTags] = useSessionStorage('includeTags', []);\r\n const [excludeTags, setExcludeTags] = useSessionStorage('excludeTags', []);\r\n const [maxTime, setMaxTime] = useSessionStorage('maxTime', 120);\r\n\r\n // Remember scroll position\r\n const [recipeScroll, setRecipeScroll] = useSessionStorage('recipeScroll', 0);\r\n // Remember how many items are displayed on screen (required for remember scroll position)\r\n const [displayedRowsCount, setDisplayedRowsCount] = useSessionStorage('displayedRowsCount', 12);\r\n\r\n const [rowCount, setRowCount] = useState(0);\r\n\r\n // Infinite scrolling requires a separate set of rows to list.rows\r\n const [displayedRows, setDisplayedRows] = useState([]);\r\n\r\n // Check Subscription\r\n useSubscription(props.auth);\r\n\r\n // On Page Load\r\n useEffect(() => {\r\n RecipeService.getTags().then(results => {\r\n setAllTagOptions(results);\r\n setTagOptions(results);\r\n setExcludeTagOptions(results);\r\n });\r\n\r\n // Event listener to track scroll position\r\n const contentDiv = document.querySelector('.k-listview-content');\r\n contentDiv.addEventListener('scroll', event => {\r\n setRecipeScroll(contentDiv.scrollTop);\r\n }, { passive: true });\r\n\r\n }, []);\r\n\r\n // 1 Second Delay\r\n useDebouncedEffect(() => {\r\n runQuery();\r\n }, [searchText, tags, excludeTags, maxTime], 1000, list.firstCallMade);\r\n\r\n const runQuery = () => {\r\n\r\n // Items to display - Start with 12\r\n let displayCount = displayedRowsCount >= 12 ? displayedRowsCount : 12; \r\n let scrollPosition = recipeScroll;\r\n\r\n if (list.firstCallMade) {\r\n setDisplayedRowsCount(12);\r\n setRecipeScroll(0);\r\n displayCount = 12;\r\n scrollPosition = 0;\r\n }\r\n\r\n list.setLoading(true);\r\n list.setFirstCallMade(true);\r\n list.setRows([]);\r\n\r\n const filteredMaxTime = maxTime == 120 ? null : maxTime;\r\n\r\n RecipeService.search(searchText, tags, excludeTags, filteredMaxTime).then(results => {\r\n \r\n // All items\r\n list.setRows(results);\r\n setRowCount(results.length);\r\n\r\n setDisplayedRows(results.splice(0, displayCount));\r\n setScroll(scrollPosition);\r\n\r\n }).finally(() => list.setLoading(false));\r\n };\r\n\r\n const searchTextChange = (event: InputChangeEvent) => {\r\n setSearchText(event.value);\r\n }\r\n\r\n // Tagging\r\n const filterTagsData = (filter: FilterDescriptor) => {\r\n return filterBy(allTagOptions.slice(), filter);\r\n }\r\n\r\n const onTagsFilterChange = (event: MultiSelectFilterChangeEvent) => {\r\n setTagOptions(filterTagsData(event.filter));\r\n }\r\n\r\n const onTagsChange = (e) => setTags(e.value);\r\n\r\n const filterExcludeTagsData = (filter: FilterDescriptor) => {\r\n return filterBy(allTagOptions.slice(), filter);\r\n }\r\n\r\n const onExcludeTagsFilterChange = (event: MultiSelectFilterChangeEvent) => {\r\n setExcludeTagOptions(filterExcludeTagsData(event.filter));\r\n }\r\n\r\n const onExcludeTagsChange = (e) => setExcludeTags(e.value);\r\n\r\n const resetFilters = () => {\r\n setSearchText('');\r\n setTags([]);\r\n setExcludeTags([]);\r\n setMaxTime(120);\r\n setRecipeScroll(0);\r\n setDisplayedRowsCount(12);\r\n }\r\n\r\n // Infinite Scrolling\r\n const scrollHandler = (event: ListViewEvent) => {\r\n const t = event.nativeEvent.target;\r\n \r\n if (t.scrollTop + 10 >= t.scrollHeight - t.clientHeight) {\r\n const moreData = list.rows.splice(0, 3);\r\n if (moreData.length > 0) {\r\n setDisplayedRows(displayedRows.concat(moreData));\r\n setDisplayedRowsCount(displayedRows.length);\r\n }\r\n } \r\n };\r\n\r\n const setScroll = (position: number) => {\r\n const elements = document.getElementsByClassName(\"k-listview-content\");\r\n if (!!elements && elements.length) {\r\n const content = _.first(elements);\r\n content.scrollTop = position;\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

Recipes

\r\n
\r\n
\r\n {rowCount} Results Found\r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n setMaxTime(Math.floor(e.value / 10) * 10)} min={10} max={120} value={maxTime} />\r\n
\r\n
\r\n \r\n \r\n
\r\n );\r\n}","import { FormRenderProps } from '@progress/kendo-react-form';\r\nimport { IIngredient } from 'pages/Ingredients/IngredientInterfaces';\r\n\r\nexport interface IRecipe {\r\n id: string,\r\n name: string,\r\n externalId: string,\r\n notes: string,\r\n keyNotes: string,\r\n servings: number,\r\n preparationTime: number,\r\n cookingTime: number,\r\n instructions: string[],\r\n tags: string[],\r\n ingredients: IRecipeIngredient[],\r\n imageUri: string,\r\n archived: boolean,\r\n}\r\n\r\nexport interface IEditRecipe {\r\n id: string,\r\n name: string,\r\n externalId: string,\r\n notes: string,\r\n keyNotes: string,\r\n servings: number,\r\n preparationTime: number,\r\n cookingTime: number,\r\n instructions: string[],\r\n tags: string[],\r\n ingredients: IEditRecipeIngredient[],\r\n imageId: string,\r\n imageUri: string,\r\n archived: boolean,\r\n}\r\n\r\nexport interface IRecipeListItem {\r\n id: string, \r\n name: string,\r\n externalId: string,\r\n time: number,\r\n servings: number,\r\n imageUri: string,\r\n tags: string[],\r\n isArchived: boolean,\r\n}\r\n\r\nexport interface IRecipeIngredient {\r\n id: string,\r\n friendlyName: string,\r\n category: string,\r\n measurementUnit: string,\r\n amount: number,\r\n grams: number | undefined,\r\n millilitres: number | undefined,\r\n ingredient: IIngredient,\r\n displayAsLiquid: boolean,\r\n optional: boolean,\r\n}\r\n\r\nexport interface IRecipeIngredientCategory {\r\n category: string,\r\n recipeIngredients: IRecipeIngredient[];\r\n}\r\n\r\nexport interface IEditRecipeInstruction {\r\n text: string;\r\n}\r\n\r\nexport const EditRecipeInstructionInitialState: IEditRecipeInstruction = {\r\n text: '',\r\n}\r\n\r\nexport interface IEditRecipeIngredient {\r\n id: string,\r\n friendlyName: string,\r\n category: string,\r\n measurementUnit: string,\r\n amount: number,\r\n grams: number | undefined,\r\n millilitres: number | undefined,\r\n ingredient: string,\r\n volumeToWeightRatio: number,\r\n inEdit: boolean,\r\n optional: boolean,\r\n order: number,\r\n}\r\n\r\nexport const EditRecipeIngredientInitialState: IEditRecipeIngredient = {\r\n id: '',\r\n friendlyName: '',\r\n category: '',\r\n measurementUnit: 'Unit',\r\n amount: 0,\r\n grams: 0,\r\n millilitres: 0,\r\n ingredient: '',\r\n volumeToWeightRatio: 0,\r\n inEdit: true,\r\n optional: false,\r\n order: 0,\r\n}\r\n\r\nexport const RecipeInitialState: IRecipe = {\r\n id: '',\r\n name: '',\r\n externalId: '',\r\n notes: '',\r\n keyNotes: '',\r\n servings: undefined,\r\n preparationTime: undefined,\r\n cookingTime: undefined,\r\n instructions: [],\r\n tags: [],\r\n ingredients: [],\r\n imageUri: '',\r\n archived: false,\r\n}\r\n\r\nexport const EditRecipeInitialState: IEditRecipe = {\r\n id: '',\r\n name: '',\r\n externalId: '',\r\n notes: '',\r\n keyNotes: '',\r\n servings: undefined,\r\n preparationTime: undefined,\r\n cookingTime: undefined,\r\n instructions: [],\r\n tags: [],\r\n ingredients: [],\r\n imageId: '',\r\n imageUri: '',\r\n archived: false,\r\n}\r\n\r\nexport interface IRecipeIngredientProps {\r\n recipeIngredient: IRecipeIngredient,\r\n}\r\n\r\nexport interface IRecipeIngredientCategoryProps {\r\n recipeIngredients: IRecipeIngredient[],\r\n}\r\n\r\nexport interface IRecipeInstructionProps {\r\n instruction: string;\r\n index: number;\r\n}\r\n\r\nexport interface IImageSelectorProps {\r\n formRenderProps: FormRenderProps,\r\n}\r\n\r\nexport interface INutritionSummary {\r\n energy: number | undefined;\r\n protein: number | undefined;\r\n fat: number | undefined;\r\n sugars: number | undefined;\r\n carbohydrates: number | undefined;\r\n calcium: number | undefined;\r\n copper: number | undefined;\r\n iodine: number | undefined;\r\n iron: number | undefined;\r\n magnesium: number | undefined;\r\n potassium: number | undefined;\r\n selenium: number | undefined;\r\n sodium: number | undefined;\r\n zinc: number | undefined;\r\n retinol: number | undefined;\r\n thiamin: number | undefined;\r\n riboflavin: number | undefined;\r\n niacin: number | undefined;\r\n pantothenicAcid: number | undefined;\r\n pyridoxine: number | undefined;\r\n biotin: number | undefined;\r\n cobalamin: number | undefined;\r\n folateNatural: number | undefined;\r\n vitaminC: number | undefined;\r\n cholecalciferol: number | undefined;\r\n vitaminE: number | undefined;\r\n fattyAcidsTotalSaturated: number | undefined;\r\n fattyAcidsTotalMonounsaturated: number | undefined;\r\n fattyAcidsTotalPolyunsaturated: number | undefined;\r\n}\r\n\r\nexport const NutritionSummaryInitialState: INutritionSummary = {\r\n energy: undefined,\r\n protein: undefined,\r\n fat: undefined,\r\n sugars: undefined,\r\n carbohydrates: undefined,\r\n calcium: undefined,\r\n copper: undefined,\r\n iodine: undefined,\r\n iron: undefined,\r\n magnesium: undefined,\r\n potassium: undefined,\r\n selenium: undefined,\r\n sodium: undefined,\r\n zinc: undefined,\r\n retinol: undefined,\r\n thiamin: undefined,\r\n riboflavin: undefined,\r\n niacin: undefined,\r\n pantothenicAcid: undefined,\r\n pyridoxine: undefined,\r\n biotin: undefined,\r\n cobalamin: undefined,\r\n folateNatural: undefined,\r\n vitaminC: undefined,\r\n cholecalciferol: undefined,\r\n vitaminE: undefined,\r\n fattyAcidsTotalSaturated: undefined,\r\n fattyAcidsTotalMonounsaturated: undefined,\r\n fattyAcidsTotalPolyunsaturated: undefined,\r\n}\r\n\r\nexport interface ITagsFilterProps {\r\n label: string,\r\n allTagOptions: [],\r\n}","import { useNavigate, useParams } from 'react-router-dom';\r\nimport _ from \"lodash\";\r\nimport { IRecipe, IRecipeIngredientProps, IRecipeIngredientCategoryProps, RecipeInitialState, INutritionSummary, NutritionSummaryInitialState, IRecipeInstructionProps } from 'pages/Recipes/RecipeInterfaces';\r\nimport { RecipeService } from 'pages/Recipes/RecipeService';\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport { Slider } from '@progress/kendo-react-inputs';\r\nimport { Chart, ChartLegend, ChartSeries, ChartSeriesItem, ChartSeriesLabels } from \"@progress/kendo-react-charts\";\r\nimport { Card, CardHeader, CardBody, Collapse, Alert as ReactstrapAlert } from 'reactstrap';\r\nimport { useEffect, useState } from 'react';\r\nimport { mdiBlender, mdiCheckboxBlankOutline, mdiClose, mdiFilePdfBox, mdiPencil, mdiStove } from '@mdi/js';\r\nimport { Icon } from '@mdi/react';\r\nimport Fraction from 'fraction.js';\r\nimport FileSaver from 'file-saver';\r\nimport { AddToMealPlanButton } from 'pages/MealPlans/AddToMealPlanButton';\r\nimport { Spinner } from 'components/Spinner';\r\nimport { IUserAuth } from 'common/Interfaces';\r\nimport { useSubscription } from 'hooks/useSubscription';\r\n\r\nexport const ViewRecipe = (props: { auth: IUserAuth }) => {\r\n\r\n // Setup View\r\n const { id } = useParams();\r\n const nav = useNavigate();\r\n const [view, setView] = useState(RecipeInitialState);\r\n const [sliderValue, setSliderValue] = useState(2);\r\n const [displayServings, setDisplayServings] = useState(1);\r\n const [loading, setLoading] = useState(true);\r\n const [exportingPdf, setExportingPdf] = useState(false);\r\n\r\n // Check Subscription\r\n useSubscription(props.auth);\r\n\r\n // Load Data\r\n useEffect(() => {\r\n RecipeService.getById(id).then(result => {\r\n setView(result);\r\n setDisplayServings(result.servings);\r\n calculateNutrition(result);\r\n }).finally(() => setLoading(false));\r\n }, []);\r\n\r\n const closeItem = () => {\r\n nav('/Recipes');\r\n };\r\n\r\n const editItem = () => {\r\n nav('/Recipes/Edit/' + view.id);\r\n }\r\n\r\n const exportPdf = () => {\r\n setExportingPdf(true);\r\n RecipeService.exportPdf(id).then(result => {\r\n FileSaver.saveAs(result, 'Recipe Export - ' + view.name + '.pdf');\r\n }).finally(() => setExportingPdf(false));\r\n }\r\n\r\n const minSlider = view.servings == 1 ? 2 : 1;\r\n\r\n const recalculateServings = (slider: number) => {\r\n setSliderValue(Math.floor(slider / 1));\r\n\r\n switch (sliderValue){\r\n case 1: setDisplayServings(Math.ceil(view.servings / 2)); break;\r\n case 3: setDisplayServings(view.servings * 2); break;\r\n default: setDisplayServings(view.servings); break;\r\n }\r\n }\r\n\r\n // Notes\r\n const [notesExpanded, setNotesExpanded] = useState(true);\r\n const toggleNotes = () => {\r\n setNotesExpanded(!notesExpanded);\r\n }\r\n\r\n const [nutrition, setNutrition] = useState(NutritionSummaryInitialState);\r\n const [chartData, setChartData] = useState([]);\r\n const calculateNutrition = (recipe: IRecipe) => {\r\n\r\n if (!recipe.ingredients.length) {\r\n return;\r\n }\r\n\r\n // Sum all values\r\n const reducer = (total, current) => total + current;\r\n\r\n const ingredients = recipe.ingredients.map(i => i.ingredient);\r\n\r\n const result: INutritionSummary = {\r\n energy: ingredients.map(i => i.energyCalories).reduce(reducer),\r\n protein: ingredients.map(i => i.protein).reduce(reducer),\r\n fat: ingredients.map(i => i.fat).reduce(reducer),\r\n sugars: ingredients.map(i => i.sugars).reduce(reducer),\r\n carbohydrates: ingredients.map(i => i.carbohydrates).reduce(reducer),\r\n calcium: ingredients.map(i => i.calcium).reduce(reducer),\r\n copper: ingredients.map(i => i.copper).reduce(reducer),\r\n iodine: ingredients.map(i => i.iodine).reduce(reducer),\r\n iron: ingredients.map(i => i.iron).reduce(reducer),\r\n magnesium: ingredients.map(i => i.magnesium).reduce(reducer),\r\n potassium: ingredients.map(i => i.potassium).reduce(reducer),\r\n selenium: ingredients.map(i => i.selenium).reduce(reducer),\r\n sodium: ingredients.map(i => i.sodium).reduce(reducer),\r\n zinc: ingredients.map(i => i.zinc).reduce(reducer),\r\n retinol: ingredients.map(i => i.retinol).reduce(reducer),\r\n thiamin: ingredients.map(i => i.thiamin).reduce(reducer),\r\n riboflavin: ingredients.map(i => i.riboflavin).reduce(reducer),\r\n niacin: ingredients.map(i => i.niacin).reduce(reducer),\r\n pantothenicAcid: ingredients.map(i => i.pantothenicAcid).reduce(reducer),\r\n pyridoxine: ingredients.map(i => i.pyridoxine).reduce(reducer),\r\n biotin: ingredients.map(i => i.biotin).reduce(reducer),\r\n cobalamin: ingredients.map(i => i.cobalamin).reduce(reducer),\r\n folateNatural: ingredients.map(i => i.folateNatural).reduce(reducer),\r\n vitaminC: ingredients.map(i => i.vitaminC).reduce(reducer),\r\n cholecalciferol: ingredients.map(i => i.cholecalciferol).reduce(reducer),\r\n vitaminE: ingredients.map(i => i.vitaminE).reduce(reducer),\r\n fattyAcidsTotalSaturated: ingredients.map(i => i.fattyAcidsTotalSaturated).reduce(reducer),\r\n fattyAcidsTotalMonounsaturated: ingredients.map(i => i.fattyAcidsTotalMonounsaturated).reduce(reducer),\r\n fattyAcidsTotalPolyunsaturated: ingredients.map(i => i.fattyAcidsTotalPolyunsaturated).reduce(reducer),\r\n };\r\n setNutrition(result);\r\n setChartData([\r\n { \"macro\": \"Protein\", \"proportion\": result.protein },\r\n { \"macro\": \"Carbs\", \"proportion\": result.carbohydrates },\r\n { \"macro\": \"Fat\", \"proportion\": result.fat },\r\n ]);\r\n }\r\n\r\n const labelContent = (e) => e.category + '\\n' + e.dataItem.proportion + 'g';\r\n\r\n const donutCenter = () => (\r\n

Energy
{nutrition.energy}kJ

\r\n );\r\n\r\n const chartSeriesColours: string[] = [\"#76796e\",\"#2A2B27\",\"#B9BBB4\"];\r\n\r\n const RecipeIngredients = (props: IRecipeIngredientCategoryProps) => {\r\n\r\n const categories = _.map(_.groupBy(props.recipeIngredients, ri => ri.category), ri => ri);\r\n\r\n const Category = (categoryProps: IRecipeIngredientCategoryProps) => {\r\n\r\n const heading = categoryProps.recipeIngredients[0].category;\r\n const showHeading = !!heading;\r\n return (\r\n <>\r\n {showHeading && {heading}}\r\n {categoryProps.recipeIngredients.map((i) => )}\r\n \r\n )\r\n }\r\n \r\n return (\r\n \r\n {categories.map((c) => )}\r\n
\r\n )\r\n }\r\n\r\n const RecipeIngredientItem = (props: IRecipeIngredientProps) => {\r\n\r\n const ri = props.recipeIngredient;\r\n\r\n const displayName = !!ri.friendlyName\r\n ? ri.friendlyName\r\n : !!ri.ingredient.shortName ?\r\n ri.ingredient.shortName\r\n : ri.ingredient.name;\r\n\r\n const roundTo2DecimalPlaces = (num: number) => {\r\n var m = Number((Math.abs(num) * 100).toPrecision(15));\r\n return Math.round(m) / 100 * Math.sign(num);\r\n }\r\n\r\n // Ratio for custom servings\r\n const servingsAdjustment = displayServings / view.servings;\r\n let amount = roundTo2DecimalPlaces(ri.amount * servingsAdjustment);\r\n const mls = Math.round(ri.millilitres * servingsAdjustment);\r\n\r\n const grams = (ri.grams * servingsAdjustment);\r\n let gramsDisplay = (grams % 1 != 0 && grams < 2) ? grams.toFixed(2) : grams.toFixed(0);\r\n\r\n let amountDisplay = '';\r\n if (!!amount){\r\n ////==========================================\r\n //// This section might need to be added back!\r\n ////==========================================\r\n // if ((amount % 1).toFixed(2) == '0.33') {\r\n // let wholeNumber = Math.floor(amount);\r\n // amountDisplay = (!!wholeNumber ? wholeNumber + ' ' : '') + new Fraction(1, 3).toFraction(true);\r\n // }\r\n // else if ((amount % 1).toFixed(2) == '0.66' || (amount % 1).toFixed(2) == '0.67') {\r\n // let wholeNumber = Math.floor(amount);\r\n // amountDisplay = (!!wholeNumber ? wholeNumber + ' ' : '') + new Fraction(2, 3).toFraction(true);\r\n // }\r\n // else if (amount % 1 != 0) {\r\n // if (displayServings != view.servings){\r\n // amountDisplay = new Fraction(amount.toFixed(1)).toFraction(true);\r\n // } else {\r\n // amountDisplay = new Fraction(amount).toFraction(true);\r\n // }\r\n // }\r\n // else {\r\n // amountDisplay = amount.toString();\r\n // }\r\n\r\n let fraction = amount % 1;\r\n if (fraction == 0) {\r\n amountDisplay = amount.toString();\r\n } else {\r\n if (displayServings == view.servings){\r\n amountDisplay = new Fraction(amount).toFraction(true);\r\n } else {\r\n const roundedFraction = (1 > fraction && fraction >= 0.875 ) ? 0.875\r\n : (0.875 > fraction && fraction >= 0.75) ? 0.75\r\n : (0.75 > fraction && fraction >= 0.625) ? 0.625\r\n : (0.625 > fraction && fraction >= 0.5) ? 0.5\r\n : (0.5 > fraction && fraction >= 0.375) ? 0.375\r\n : (0.375 > fraction && fraction >= 0.25) ? 0.25\r\n : (0.25 > fraction && fraction >= 0.001) ? 0.125\r\n : 0;\r\n amountDisplay = new Fraction(Math.floor(amount) + roundedFraction).toFraction(true);\r\n }\r\n }\r\n }\r\n\r\n let unit = '';\r\n switch(ri.measurementUnit) {\r\n case 'Cup': unit = 'cup'; break;\r\n case 'Litre': unit = amount > 1 ? 'litres' : 'litre'; break;\r\n case 'Tablespoon': unit = 'tbsp'; break;\r\n case 'Teaspoon': unit = 'tsp'; break;\r\n default: break;\r\n }\r\n\r\n const MeasurementDisplay = () => {\r\n return ri.displayAsLiquid && !!ri.millilitres\r\n ? ({mls} ml)\r\n : ({gramsDisplay} g)\r\n }\r\n\r\n return (\r\n \r\n \r\n {amountDisplay} {unit} {displayName} {ri.optional && - Optional}\r\n \r\n );\r\n }\r\n\r\n const RecipeInstructionItem = (props: IRecipeInstructionProps) => {\r\n return (\r\n \r\n {props.index + 1}\r\n {props.instruction}\r\n \r\n );\r\n }\r\n\r\n const RecipeImage = () => {\r\n\r\n if (view.imageUri == null){\r\n return <>;\r\n }\r\n else\r\n {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n\r\n const IngredientsCard = () => {\r\n return (\r\n \r\n \r\n Ingredients\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n const ServesAndTimesCard = () => {\r\n return (\r\n \r\n \r\n
\r\n
\r\n
Serves: {displayServings}
\r\n
\r\n
\r\n recalculateServings(e.value)} />\r\n
\r\n
\r\n
\r\n
\r\n
Prep Time:
\r\n
\r\n
\r\n
{view.preparationTime} mins
\r\n
\r\n
\r\n
\r\n
\r\n
Cook Time:
\r\n
\r\n
\r\n
{view.cookingTime} mins
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n const DirectionsCard = () => {\r\n return (\r\n \r\n \r\n Directions\r\n \r\n \r\n \r\n \r\n {view.instructions.map((i, index) => )}\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n const NutritionCard = () => {\r\n return (\r\n \r\n );\r\n }\r\n\r\n const NotesCard = () => {\r\n return (\r\n \r\n );\r\n }\r\n\r\n const KeyNotesCard = () => {\r\n return (\r\n \r\n );\r\n }\r\n\r\n const DonutCard = () => {\r\n return (\r\n \r\n \r\n Macros (per serve)\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const MacrosCard = () => {\r\n return (\r\n \r\n \r\n Macros (per serve)\r\n \r\n \r\n
\r\n
\r\n
Energy: {nutrition.energy} cal
\r\n
Carbs: {nutrition.carbohydrates} g
\r\n
Protein: {nutrition.protein} g
\r\n
Fat: {nutrition.fat} g
\r\n
\r\n
\r\n
\r\n
\r\n )\r\n }\r\n\r\n const PdfExportingIndicator = () => {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n )\r\n}","import { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport Icon from '@mdi/react';\r\nimport { mdiDelete } from '@mdi/js';\r\nimport { GridCellProps } from \"@progress/kendo-react-grid\";\r\n\r\nexport const GridRowCommandsCell = (onRemove) => (props: GridCellProps) => {\r\n\r\n const deleteItem = () => {\r\n onRemove(props);\r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n}","import { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';\r\nimport { useNavigate, useParams } from 'react-router-dom';\r\nimport _ from \"lodash\";\r\nimport { uploadUrl, uploadHeaders } from 'services/Middleware';\r\nimport { Form, Field, FieldArray, FieldWrapper, FormElement, FormRenderProps, FieldArrayRenderProps, FieldRenderProps } from \"@progress/kendo-react-form\";\r\nimport { Input, Checkbox, NumericTextBox, TextArea } from \"@progress/kendo-react-inputs\";\r\nimport { Grid, GridCellProps, GridColumn } from '@progress/kendo-react-grid';\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport { DropDownList, DropDownListFilterChangeEvent, MultiSelect, MultiSelectFilterChangeEvent } from \"@progress/kendo-react-dropdowns\";\r\nimport { CompositeFilterDescriptor, filterBy, FilterDescriptor } from \"@progress/kendo-data-query\";\r\nimport { Alert } from 'components/Alert';\r\nimport { GridRowCommandsCell } from 'components/GridRowCommandsCell';\r\nimport { IApiResponse, IButtonGroupRenderProps, IUserAuth } from 'common/Interfaces';\r\nimport { IEditRecipe, EditRecipeInitialState, IEditRecipeIngredient, IImageSelectorProps } from 'pages/Recipes/RecipeInterfaces';\r\nimport { IArchiveRecipeCommand, IRestoreRecipeCommand, IDeleteRecipeCommand } from 'pages/Recipes/RecipeCommands';\r\nimport { RecipeService } from 'pages/Recipes/RecipeService';\r\nimport { FormValidation } from 'services/FormValidation';\r\nimport Icon from '@mdi/react';\r\nimport { mdiCheck, mdiArchive, mdiRestore, mdiDelete, mdiClose, mdiPlus } from '@mdi/js';\r\nimport { IngredientService } from 'services/IngredientService';\r\nimport { Upload, UploadOnStatusChangeEvent } from '@progress/kendo-react-upload';\r\nimport { Badge, Card, CardBody, CardFooter, Label } from 'reactstrap';\r\nimport { Spinner } from 'components/Spinner';\r\nimport { ModalOkCancel } from 'components/ModalOkCancel';\r\n\r\nexport const EditRecipe = (props: { auth: IUserAuth }) => {\r\n \r\n // Setup View\r\n const { id } = useParams();\r\n const nav = useNavigate();\r\n const [view, setView] = useState(EditRecipeInitialState);\r\n const [ingredientOptions, setIngredientOptions] = useState([]);\r\n const [allTagOptions, setAllTagOptions] = useState([]);\r\n const [tagOptions, setTagOptions] = useState([]);\r\n const [tagSuggestions, setTagSuggestions] = useState([]);\r\n const [loading, setLoading] = useState(false);\r\n\r\n // Alerts\r\n const alertRef = useRef(null);\r\n\r\n // Delete Modal\r\n const deleteModalRef = useRef(null);\r\n\r\n // Load Data\r\n useEffect(() => {\r\n if (!!id){\r\n setLoading(true);\r\n RecipeService.getForEdit(id).then(result => {\r\n setView(result);\r\n\r\n if (!!result.ingredients){\r\n const names = result.ingredients.map(i => i.ingredient);\r\n names.forEach(i => updateTagSuggestions(i));\r\n }\r\n }).finally(() => setLoading(false));\r\n }\r\n \r\n IngredientService.getSelectItems('').then(results => {\r\n setIngredientOptions(results);\r\n });\r\n\r\n RecipeService.getTags().then(results => {\r\n setAllTagOptions(results);\r\n setTagOptions(results);\r\n })\r\n }, []);\r\n\r\n // Tag Suggestions\r\n const updateTagSuggestions = (item: string) => {\r\n if (!!item){\r\n const firstPhrase = item.split(',')[0].replace(/[\\W_]+/g, \"\").toLowerCase();\r\n if (!_.includes(tagSuggestions, firstPhrase)){\r\n setTagSuggestions(old => [...old, firstPhrase]);\r\n }\r\n }\r\n }\r\n\r\n // Actions\r\n const saveChanges = (formData: IEditRecipe) => {\r\n \r\n formData = prepareForSave(formData);\r\n\r\n if (!view.id) {\r\n RecipeService.create(formData).then(result => handleResponseAndClose(result));\r\n } else {\r\n RecipeService.update(formData).then(result => handleResponseAndReload(result));\r\n }\r\n }\r\n\r\n const archiveItem = () => {\r\n let command: IArchiveRecipeCommand = { id: view.id };\r\n RecipeService.archive(command).then(result => handleResponseAndReload(result, 'Recipe archived.'));\r\n }\r\n\r\n const restoreItem = () => {\r\n let command: IRestoreRecipeCommand = { id: view.id };\r\n RecipeService.restore(command).then(result => handleResponseAndReload(result, 'Recipe restored.'));\r\n }\r\n\r\n const showDeleteModal = () => {\r\n deleteModalRef.current.showModal();\r\n }\r\n\r\n const confirmDeleteItem = () => {\r\n let command: IDeleteRecipeCommand = { id: view.id };\r\n RecipeService.del(command).then(result => handleResponseAndGoToList(result));\r\n }\r\n\r\n const handleResponseAndReload = (data: IApiResponse, successMessage?: string) => {\r\n if (!data.success){\r\n alertRef.current.showError(data.Title);\r\n return;\r\n }\r\n\r\n alertRef.current.showSuccess(successMessage);\r\n RecipeService.getForEdit(view.id).then(result => setView(result));\r\n IngredientService.getSelectItems('').then(results => setIngredientOptions(results));\r\n };\r\n\r\n const handleResponseAndClose = (data: IApiResponse) => {\r\n if (!data.success){\r\n alertRef.current.showError(data.Title);\r\n return;\r\n }\r\n closeItem();\r\n };\r\n\r\n const handleResponseAndGoToList = (data: IApiResponse) => {\r\n if (!data.success){\r\n alertRef.current.showError(data.Title);\r\n return;\r\n }\r\n nav('/Recipes');\r\n };\r\n\r\n const closeItem = () => {\r\n if (!!id){\r\n nav(`/Recipes/View/${id}`)\r\n } else {\r\n nav('/Recipes');\r\n }\r\n };\r\n\r\n const title = (!!view.id)\r\n ? (view.archived) ? `${view.name} (Archived)` : `${view.name}`\r\n : 'Create Recipe';\r\n\r\n const saveLabel = (!!view.id) ? 'Save Changes' : 'Create';\r\n\r\n const ParentFieldContext = createContext('');\r\n\r\n const calculateMils = (amount: number, measurementUnit: string) => {\r\n\r\n switch(measurementUnit) {\r\n case \"Cup\": return Math.round(amount * 240);\r\n case \"Litre\": return Math.round(amount * 1000);\r\n case \"Tablespoon\": return Math.round(amount * 20);\r\n case \"Teaspoon\": return Math.round(amount * 5);\r\n default: return 0;\r\n }\r\n }\r\n\r\n const TagSuggestions = (props: { formRenderProps: FormRenderProps }) => {\r\n\r\n const onClick = (e: { item: string }) => {\r\n const currentTags: string[] = props.formRenderProps.valueGetter(\"tags\");\r\n props.formRenderProps.onChange(\"tags\", { value: currentTags.concat(e.item)});\r\n }\r\n\r\n return (\r\n
\r\n {tagSuggestions.map((item, index) => onClick({item})}>+ {item} )}\r\n
\r\n );\r\n }\r\n\r\n const calculateGrams = (dataItem: IEditRecipeIngredient) => {\r\n if (!!dataItem.millilitres && !!dataItem.volumeToWeightRatio){\r\n return Math.round((dataItem.millilitres * dataItem.volumeToWeightRatio) / 240);\r\n }\r\n return 0;\r\n }\r\n\r\n // Adjust the model before saving\r\n const prepareForSave = (formData: IEditRecipe) => {\r\n\r\n formData.ingredients.forEach((i, index) => {\r\n i.order = index;\r\n });\r\n\r\n return formData;\r\n }\r\n\r\n const filterTagsData = (filter: FilterDescriptor) => {\r\n return filterBy(allTagOptions.slice(), filter);\r\n }\r\n\r\n const onTagsFilterChange = (event: MultiSelectFilterChangeEvent) => {\r\n setTagOptions(filterTagsData(event.filter));\r\n }\r\n\r\n const TextCell = (props) => {\r\n const fieldArrayName = useContext(ParentFieldContext);\r\n \r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const AmountCell = (props: GridCellProps) => {\r\n\r\n const onChange = (e) => {\r\n if (props.dataItem.measurementUnit != 'Unit'){\r\n const calcMils = calculateMils(props.dataItem.amount, props.dataItem.measurementUnit)\r\n if (!!calcMils) {\r\n props.dataItem.millilitres = calcMils;\r\n props.dataItem.grams = calculateGrams(props.dataItem);\r\n }\r\n }\r\n }\r\n \r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const MilsCell = (props: GridCellProps) => {\r\n\r\n const onChange = (e) => {\r\n props.dataItem.grams = calculateGrams(props.dataItem);\r\n }\r\n \r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const GramsCell = (props) => {\r\n \r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const CheckboxCell = (props) => {\r\n \r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const MeasureDropDownCell = (props) => {\r\n\r\n const options = ['Unit', 'Cup', 'Litre', 'Tablespoon', 'Teaspoon']\r\n\r\n const onChange = (e) => {\r\n if (props.dataItem.measurementUnit != 'Unit'){\r\n const calc = calculateMils(props.dataItem.amount, props.dataItem.measurementUnit)\r\n if (calc != 0) {\r\n props.dataItem.millilitres = calc;\r\n props.dataItem.grams = calculateGrams(props.dataItem);\r\n }\r\n }\r\n }\r\n \r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const IngredientDropDownCell = (props: GridCellProps) => {\r\n\r\n const fieldArrayName = useContext(ParentFieldContext);\r\n const ingredientOptionsText = ingredientOptions.map(i => i.text);\r\n const [options, setOptions] = useState(ingredientOptionsText);\r\n\r\n const filterData = (filter: FilterDescriptor | CompositeFilterDescriptor) => {\r\n return filterBy(ingredientOptionsText.slice(), filter);\r\n }\r\n \r\n const filterChange = (event: DropDownListFilterChangeEvent) => {\r\n setOptions(filterData(event.filter));\r\n }\r\n\r\n const onChange = (e) => {\r\n const parentItem = _.find(ingredientOptions, i => i.text == props.dataItem.ingredient);\r\n if (!!parentItem){\r\n props.dataItem.volumeToWeightRatio = parentItem.volumeToWeightRatio;\r\n props.dataItem.grams = calculateGrams(props.dataItem);\r\n }\r\n updateTagSuggestions(e.value);\r\n }\r\n \r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const IngredientsGrid = (props: FieldArrayRenderProps) => {\r\n const { validationMessage, visited, name } = props;\r\n\r\n const generateNewRow = () => {\r\n return {\r\n id: '',\r\n friendlyName: '',\r\n measurementUnit: 'Unit',\r\n amount: 0,\r\n grams: 0,\r\n millilitres: 0,\r\n ingredient: '',\r\n volumeToWeightRatio: 0,\r\n inEdit: true,\r\n toBeDeleted: false,\r\n }\r\n }\r\n \r\n const onAdd = useCallback(e => {\r\n e.preventDefault();\r\n props.onPush({ value: generateNewRow() });\r\n }, [props.onPush]);\r\n\r\n const onRemove = useCallback(e => {\r\n props.onRemove({ index: e.dataIndex });\r\n }, [props.onRemove]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n const InstructionsGrid = (props: FieldArrayRenderProps) => {\r\n const { validationMessage, visited, name } = props;\r\n\r\n const generateNewRow = () => {\r\n return { text: '' };\r\n };\r\n \r\n const onAdd = useCallback(e => {\r\n e.preventDefault();\r\n props.onPush({ value: generateNewRow() });\r\n }, [props.onPush]);\r\n\r\n const onRemove = useCallback(e => {\r\n props.onRemove({ index: e.dataIndex });\r\n }, [props.onRemove]);\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n const ImageSelector = (props: IImageSelectorProps) => {\r\n\r\n const [lastImage, setLastImage] = useState(view.imageUri);\r\n\r\n const onUploadCompleted = (e: UploadOnStatusChangeEvent) => {\r\n if (e.response && e.response.status == 200){\r\n\r\n // The title field has the imageUri\r\n const result = e.response.response.title;\r\n setLastImage(result);\r\n props.formRenderProps.onChange('imageId', { value: getImageIdFromUri(result)});\r\n }\r\n }\r\n\r\n const getImageIdFromUri = (uri: string) => {\r\n const fileName = uri.split('/').pop();\r\n return fileName.substring(0, fileName.lastIndexOf('.'));\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n const Buttons = (buttonRenderProps: IButtonGroupRenderProps) => {\r\n if (view.archived) {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n (\r\n \r\n
\r\n
\r\n

{title}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n )} />\r\n \r\n\r\n \r\n
\r\n \r\n
\r\n );\r\n}\r\n","import { useEffect } from \"react\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport { Grid, GridColumn as Column } from '@progress/kendo-react-grid';\r\nimport { useDebouncedEffect } from \"hooks/useDebouncedEffect\";\r\nimport { useListFunctions } from \"hooks/useListFunctions\";\r\nimport { MealPlanService } from \"./MealPlanService\";\r\nimport { mdiInformation, mdiPlus } from \"@mdi/js\";\r\nimport Icon from \"@mdi/react\";\r\nimport { IUserAuth } from \"common/Interfaces\";\r\n\r\n\r\nexport const MealPlans = (props: { auth: IUserAuth }) => {\r\n\r\n const list = useListFunctions();\r\n\r\n // Navigation\r\n const navigate = useNavigate();\r\n const addMealPlan = () => navigate('/MealPlans/Edit');\r\n const editMealPlan = (id: string) => navigate('/MealPlans/Edit/' + id);\r\n\r\n const onLoad = useEffect(() => {\r\n runQuery();\r\n }, []);\r\n\r\n // Search\r\n useDebouncedEffect(() => {\r\n runQuery();\r\n }, [list.searchText], 1000, list.firstCallMade);\r\n\r\n const runQuery = () => {\r\n list.setFirstCallMade(true);\r\n list.setLoading(true);\r\n list.setRows([]);\r\n\r\n MealPlanService.search(list.searchText).then(results => list.setRows(results));\r\n };\r\n\r\n // Meal Plan Limits\r\n const maxAllowed = 100;\r\n const canCreateMore = maxAllowed > list.rows.length;\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

Meal Plans

\r\n
\r\n
\r\n
{list.rows.length} meal plan{list.rows.length == 1 ? '' : 's'} created out of {maxAllowed} available
\r\n \r\n \r\n \r\n
\r\n
\r\n editMealPlan(e.dataItem.id)}>\r\n \r\n \r\n
\r\n );\r\n}","export interface IEditMealPlan {\r\n id: string,\r\n name: string,\r\n numberOfDays: number,\r\n rows: IEditMealPlanRow[],\r\n columnLabels: IColumnLabel[],\r\n archived: boolean,\r\n macroSummaries: IMacroSummary[],\r\n shoppingListItems: IShoppingListItem[],\r\n}\r\n\r\nexport interface IColumnLabel {\r\n order: number,\r\n label: string,\r\n}\r\n\r\nexport interface IEditMealPlanRow {\r\n id: string,\r\n name: string,\r\n index: number,\r\n excludeNutrition: boolean,\r\n cells: IEditMealPlanCell[],\r\n}\r\n\r\nexport interface IEditMealPlanCell {\r\n id: string,\r\n mealPlanRowId: string,\r\n index: number,\r\n recipes: IEditMealPlanCellRecipe[],\r\n}\r\n\r\nexport interface IEditMealPlanCellRecipe {\r\n id: string,\r\n mealPlanCellId: string,\r\n recipeId: string,\r\n servings: number,\r\n index: number,\r\n leftover: boolean,\r\n condiment: boolean,\r\n recipeDisplay: IRecipeDisplay,\r\n}\r\n\r\nexport interface IRecipeDisplay {\r\n id: string,\r\n name: string,\r\n imageUri: string,\r\n energy: number,\r\n protein: number,\r\n fat: number,\r\n carbohydrates: number,\r\n sugars: number,\r\n}\r\n\r\nexport interface IMacroSummary {\r\n order: number,\r\n energy: number,\r\n protein: number,\r\n fat: number,\r\n carbohydrates: number,\r\n sugars: number,\r\n}\r\n\r\nexport interface IEditShoppingList {\r\n mealPlanId: string,\r\n items: IShoppingListItem[],\r\n}\r\n\r\nexport interface IShoppingListItem {\r\n ingredientId: string,\r\n name: string,\r\n recipe: string,\r\n amount: string,\r\n category: string,\r\n optional: boolean,\r\n}\r\n\r\nexport interface IEditMealPlanExportOptions {\r\n mealPlanId: string,\r\n introduction: string,\r\n imageUri: string,\r\n recipes: IEditMealPlanExportRecipe[]\r\n}\r\n\r\nexport interface IEditMealPlanExportRecipe {\r\n cellRecipeId: string,\r\n recipeId: string,\r\n name: string,\r\n dayOfWeek: string,\r\n row: string,\r\n exclude: boolean,\r\n}\r\n\r\nexport interface IMealPlanSelectOption {\r\n id: string,\r\n ownedBy: string,\r\n name: string,\r\n}\r\n\r\nexport const EditMealPlanInitialState : IEditMealPlan = {\r\n id: \"\",\r\n name: \"\",\r\n numberOfDays: 7,\r\n rows: [],\r\n columnLabels: [],\r\n archived: false,\r\n macroSummaries: [],\r\n shoppingListItems: [],\r\n}\r\n\r\nexport const EditShoppingListInitialState : IEditShoppingList = {\r\n mealPlanId: '',\r\n items: [],\r\n}\r\n\r\nexport const EditMealPlanExportOptionsInitialState : IEditMealPlanExportOptions = {\r\n mealPlanId: '',\r\n introduction: '',\r\n imageUri: '',\r\n recipes: [],\r\n}","import { createContext, useCallback, useContext, useEffect, useRef, useState } from \"react\";\r\nimport { useNavigate, useParams } from \"react-router-dom\";\r\nimport FileSaver from 'file-saver';\r\nimport _ from \"lodash\";\r\nimport { Field, FieldArray, FieldArrayProps, FieldArrayRenderProps, FieldWrapper, Form, FormElement, FormRenderProps } from \"@progress/kendo-react-form\";\r\nimport { Grid, GridCellProps, GridColumn } from '@progress/kendo-react-grid';\r\nimport { Input, Checkbox, NumericTextBox } from \"@progress/kendo-react-inputs\";\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport { DropDownList } from '@progress/kendo-react-dropdowns';\r\nimport { EditMealPlanInitialState, IEditMealPlan, IEditMealPlanCell, IMacroSummary, IShoppingListItem } from \"./MealPlanInterfaces\";\r\nimport { MealPlanService } from \"./MealPlanService\";\r\nimport { FormValidation } from \"services/FormValidation\";\r\nimport { Alert } from 'components/Alert';\r\nimport { useListFunctions } from \"hooks/useListFunctions\";\r\nimport { Card, CardBody, CardFooter, CardHeader, Dropdown, Label, Table } from \"reactstrap\";\r\nimport { IApiResponse, IButtonGroupRenderProps, IUserAuth } from \"common/Interfaces\";\r\nimport Icon from \"@mdi/react\";\r\nimport { mdiArchive, mdiCart, mdiCheck, mdiCheckboxBlankOutline, mdiClose, mdiContentCopy, mdiCross, mdiDelete, mdiFilePdfBox, mdiPlus, mdiRestore } from \"@mdi/js\";\r\nimport { IArchiveMealPlanCommand, IDeleteMealPlanCommand, IRestoreMealPlanCommand } from \"./MealPlanCommands\";\r\nimport { Popup } from \"@progress/kendo-react-popup\";\r\nimport { AddToMealPlanButton } from \"./AddToMealPlanButton\";\r\nimport { ModalOkCancel } from \"components/ModalOkCancel\";\r\nimport { Spinner } from \"components/Spinner\";\r\n\r\nexport const FormGridContext = createContext<{\r\n onReplace: (dataItem: any, dataIndex: number) => void;\r\n parentField: string;\r\n }>({} as any);\r\n\r\nexport const EditMealPlan = (props: { auth: IUserAuth }) => {\r\n\r\n const formRef = useRef(null);\r\n\r\n const list = useListFunctions();\r\n\r\n // Setup View\r\n const { id } = useParams();\r\n const nav = useNavigate();\r\n const [view, setView] = useState(EditMealPlanInitialState);\r\n const [columns, setColumns] = useState(7);\r\n const [loading, setLoading] = useState(false);\r\n\r\n const numberOfDaysOptions = [7, 14];\r\n\r\n const [week, setWeek] = useState(1);\r\n const showWeek1 = week == 1;\r\n const showWeek2 = week == 2;\r\n \r\n // Alerts\r\n const alertRef = useRef(null);\r\n\r\n // Delete Modal\r\n const deleteModalRef = useRef(null);\r\n\r\n // Load Data\r\n useEffect(() => {\r\n if (!!id){\r\n setLoading(true);\r\n MealPlanService.getById(id).then(result => {\r\n setView(result);\r\n }).finally(() => setLoading(false));\r\n }\r\n }, []);\r\n\r\n // Actions\r\n const saveChanges = (formData: IEditMealPlan) => {\r\n \r\n formData = prepareForSave(formData);\r\n\r\n if (!view.id) {\r\n MealPlanService.create(formData).then(result => handleResponseAndClose(result));\r\n } else {\r\n MealPlanService.update(formData).then(result => handleResponseAndReload(result));\r\n }\r\n }\r\n\r\n const exportPdf = () => {\r\n MealPlanService.exportPdf(id).then(result => {\r\n FileSaver.saveAs(result, 'MealPlan.pdf');\r\n });\r\n }\r\n\r\n const openShoppingList = () => {\r\n nav('/MealPlans/ShoppingList/' + view.id);\r\n }\r\n\r\n const openExportOptions = () => {\r\n nav('/MealPlans/Export/' + view.id);\r\n }\r\n\r\n const archiveItem = () => {\r\n let command: IArchiveMealPlanCommand = { id: view.id };\r\n MealPlanService.archive(command).then(result => handleResponseAndReload(result, 'Meal plan archived.'));\r\n }\r\n\r\n const restoreItem = () => {\r\n let command: IRestoreMealPlanCommand = { id: view.id };\r\n MealPlanService.restore(command).then(result => handleResponseAndReload(result, 'Meal plan restored.'));\r\n }\r\n\r\n const showDeleteModal = () => {\r\n deleteModalRef.current.showModal();\r\n }\r\n\r\n const confirmDeleteItem = () => {\r\n let command: IDeleteMealPlanCommand = { id: view.id };\r\n MealPlanService.del(command).then(result => handleResponseAndClose(result));\r\n }\r\n\r\n const handleResponseAndReload = (data: IApiResponse, successMessage?: string) => {\r\n if (!data.success){\r\n alertRef.current.showError(data.Title);\r\n return;\r\n }\r\n\r\n alertRef.current.showSuccess(successMessage);\r\n MealPlanService.getById(view.id).then(result => setView(result));\r\n };\r\n\r\n const handleResponseAndClose = (data: IApiResponse) => {\r\n if (!data.success){\r\n alertRef.current.showError(data.Title);\r\n return;\r\n }\r\n closeItem();\r\n };\r\n\r\n const closeItem = () => {\r\n nav('/MealPlans/List');\r\n };\r\n\r\n // Adjust the model before saving\r\n const prepareForSave = (formData: IEditMealPlan) => {\r\n\r\n formData.rows.forEach((i, index) => {\r\n i.index = index;\r\n });\r\n\r\n return formData;\r\n }\r\n\r\n const title = (!!id)\r\n ? (view.archived) ? `${view.name} (Archived)` : `${view.name}`\r\n : 'Create Meal Plan';\r\n\r\n const saveLabel = (!!view.id) ? 'Save Changes' : 'Create';\r\n\r\n const RowDetailCell = (props: GridCellProps) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const GridRowCommandsCell = (onRemove) => (props: GridCellProps) => {\r\n\r\n const deleteRow = () => {\r\n onRemove(props);\r\n }\r\n \r\n return (\r\n \r\n
\r\n \r\n
\r\n \r\n );\r\n }\r\n\r\n \r\n // Recipe Display\r\n const RecipeAddedToCellDisplay = (props: {\r\n gridCellProps: GridCellProps,\r\n rowIndex: number,\r\n cellIndex: number,\r\n recipeIndex: number,\r\n }) => {\r\n \r\n const { gridCellProps, rowIndex, cellIndex, recipeIndex } = props;\r\n\r\n const { onReplace } = useContext(FormGridContext);\r\n \r\n const anchor = useRef();\r\n const [popupVisible, setPopupVisible] = useState(false);\r\n const togglePopup = () => setPopupVisible(!popupVisible);\r\n \r\n let recipe = props.gridCellProps.dataItem.cells[cellIndex].recipes[recipeIndex].recipeDisplay;\r\n let isLeftover = props.gridCellProps.dataItem.cells[cellIndex].recipes[recipeIndex].leftover;\r\n\r\n // Close pop up on click outside\r\n const contentRef = useRef();\r\n const timeoutRef = useRef();\r\n\r\n const onOpen = () => contentRef.current.focus();\r\n const onFocus = () => clearTimeout(timeoutRef.current);\r\n const onBlurTimeout = () => setPopupVisible(false);\r\n\r\n const onBlur = () => {\r\n clearTimeout(timeoutRef.current);\r\n timeoutRef.current = setTimeout(onBlurTimeout, 200);\r\n }\r\n\r\n // Close button\r\n const onCloseClick = () => {\r\n setPopupVisible(false);\r\n }\r\n\r\n const onCopyComplete = () => {\r\n MealPlanService.getById(id).then(result => {\r\n setView(result);\r\n });\r\n }\r\n\r\n const onDeleteClick = useCallback((e) => {\r\n e.preventDefault();\r\n setPopupVisible(false);\r\n\r\n // Change the row item\r\n let change = gridCellProps.dataItem;\r\n change.cells[cellIndex].recipes.splice(recipeIndex, 1);\r\n\r\n // Replace existing row with new one\r\n onReplace(change, gridCellProps.dataIndex);\r\n\r\n }, [gridCellProps.dataItem, onReplace]);\r\n\r\n if (!recipe) {\r\n return (\r\n <>\r\n );\r\n }\r\n\r\n return (\r\n <>\r\n
\r\n
{recipe.name}
\r\n
\r\n \r\n
\r\n \r\n \r\n {recipe.name}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n Servings\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n \r\n )\r\n }\r\n\r\n // Meal Plan Cell\r\n const MealPlanCell = (props: {\r\n gridCellProps: GridCellProps,\r\n dataItem: any,\r\n rowIndex: number,\r\n cellIndex: number,\r\n }) => {\r\n\r\n const hiddenCell = (props.cellIndex >= 7 && showWeek1) || (props.cellIndex < 7 && showWeek2);\r\n\r\n const cell: IEditMealPlanCell = props.gridCellProps.dataItem.cells[props.cellIndex];\r\n const orderedCellRecipes = _.sortBy(cell.recipes, cr => cr.index);\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n // Meal Plan Cells Container\r\n const MealPlanCellsArrayGridCell = (props: GridCellProps) => {\r\n\r\n const row = props.dataItem;\r\n\r\n // If row saved, show cells\r\n if (!!props.dataItem.id){\r\n return (\r\n \r\n
\r\n {row.cells.map((cell, index) => )}\r\n
\r\n \r\n );\r\n }\r\n // If not saved, show a message\r\n else {\r\n return (\r\n \r\n
\r\n Save changes to add meals to this row.\r\n
\r\n \r\n );\r\n }\r\n }\r\n\r\n const MealPlanGrid = (props: FieldArrayRenderProps) => {\r\n const { validationMessage, visited, name, formRenderProps } = props;\r\n\r\n const generateNewRow = () => {\r\n return {\r\n id: \"\",\r\n name: \"\",\r\n index: 0,\r\n excludeNutrition: false,\r\n cells: [\r\n { id: \"\", mealPlanRowId: \"\", index: 0, recipes: [] },\r\n { id: \"\", mealPlanRowId: \"\", index: 1, recipes: [] },\r\n { id: \"\", mealPlanRowId: \"\", index: 2, recipes: [] },\r\n { id: \"\", mealPlanRowId: \"\", index: 3, recipes: [] },\r\n { id: \"\", mealPlanRowId: \"\", index: 4, recipes: [] },\r\n { id: \"\", mealPlanRowId: \"\", index: 5, recipes: [] },\r\n { id: \"\", mealPlanRowId: \"\", index: 6, recipes: [] },\r\n ],\r\n }\r\n }\r\n \r\n // Add row at bottom\r\n const onAdd = useCallback(e => {\r\n e.preventDefault();\r\n props.onPush({ value: generateNewRow() });\r\n }, [props.onPush]);\r\n\r\n // Remove row\r\n const onRemove = useCallback(e => {\r\n props.onRemove({ index: e.dataIndex });\r\n }, [props.onRemove]);\r\n\r\n // Update a row in the grid\r\n const onReplace = useCallback((dataItem, dataIndex) => {\r\n props.onReplace({ value: dataItem, index: dataIndex});\r\n }, [props.onReplace]);\r\n\r\n const hideAddbutton = !!view && !!view.rows && view.rows.length >= 7;\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n const NutritionTable = () => {\r\n return (\r\n
\r\n
\r\n \r\n {view.macroSummaries.map((summary: IMacroSummary, index) => (\r\n \r\n ))}\r\n
\r\n
\r\n );\r\n }\r\n\r\n const DayOfWeekLabels = (props: FieldArrayRenderProps) => {\r\n\r\n const { value } = props;\r\n\r\n return (\r\n
\r\n
\r\n {value.map((label, index) => \r\n
\r\n
\r\n )\r\n }\r\n\r\n const ShoppingList = () => {\r\n\r\n const categories = _.map(_.groupBy(view.shoppingListItems, li => li.category), li => li);\r\n\r\n const Category = (categoryProps: { items: IShoppingListItem[] }) => {\r\n const heading = categoryProps.items[0].category;\r\n const showHeading = !!heading;\r\n\r\n return (\r\n <>\r\n {showHeading && {heading}}\r\n {categoryProps.items.map((i) => \r\n \r\n {i.amount} {i.name} {i.optional && - Optional}\r\n {i.recipe}\r\n )}\r\n \r\n )\r\n }\r\n\r\n return (\r\n \r\n Shopping List\r\n \r\n \r\n {categories.map((c) => )}\r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n\r\n const WeekButtons = () => {\r\n return (\r\n
\r\n \r\n
\r\n )\r\n }\r\n\r\n const Buttons = (buttonRenderProps: IButtonGroupRenderProps) => {\r\n if (view.archived) {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n \r\n \r\n \r\n {/* */}\r\n \r\n \r\n \r\n );\r\n }\r\n }\r\n\r\n const AutoSaver = (formRenderProps) => {\r\n const isSubmittedRef = useRef(false);\r\n\r\n useEffect(() => {\r\n const {valid, touched, onSubmit} = formRenderProps;\r\n\r\n if (!!view.id && valid && touched && !isSubmittedRef.current){\r\n isSubmittedRef.current = true;\r\n onSubmit();\r\n }\r\n });\r\n return (\r\n <>\r\n );\r\n }\r\n\r\n return (\r\n
\r\n
\r\n (\r\n \r\n \r\n
\r\n
\r\n

{title}

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n {!id && \r\n \r\n \r\n \r\n }\r\n
\r\n
\r\n {view.id && (\r\n <>\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n )}\r\n
\r\n )} />\r\n \r\n\r\n \r\n\r\n
\r\n \r\n
\r\n );\r\n}","import { Field, FieldArray, FieldArrayRenderProps, FieldWrapper, Form, FormElement, FormRenderProps } from \"@progress/kendo-react-form\";\r\nimport { Grid, GridCellProps, GridColumn } from '@progress/kendo-react-grid';\r\nimport { Input, Checkbox, NumericTextBox } from \"@progress/kendo-react-inputs\";\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport { MealPlanService } from \"./MealPlanService\";\r\nimport { Alert } from 'components/Alert';\r\nimport Icon from \"@mdi/react\";\r\nimport { mdiArchive, mdiArrowLeft, mdiCheck, mdiCheckboxBlankOutline, mdiClose, mdiCross, mdiDelete, mdiFilePdfBox, mdiPlus, mdiRestore } from \"@mdi/js\";\r\nimport { IArchiveMealPlanCommand, IDeleteMealPlanCommand, IRestoreMealPlanCommand, IUpdateShoppingListCommand } from \"./MealPlanCommands\";\r\nimport { IApiResponse, IButtonGroupRenderProps, IUserAuth } from \"common/Interfaces\";\r\nimport { useNavigate, useParams } from \"react-router-dom\";\r\nimport { createContext, useEffect, useRef, useState } from \"react\";\r\nimport { EditShoppingListInitialState, IEditShoppingList } from \"./MealPlanInterfaces\";\r\n\r\nexport const FormGridContext = createContext<{\r\n parentField: string;\r\n }>({} as any);\r\n\r\nexport const ShoppingList = (props: { auth: IUserAuth }) => {\r\n\r\n // Setup View\r\n const { id } = useParams();\r\n const nav = useNavigate();\r\n const [view, setView] = useState(EditShoppingListInitialState);\r\n\r\n // Alerts\r\n const alertRef = useRef(null);\r\n\r\n // Load Data\r\n useEffect(() => {\r\n if (!!id){\r\n MealPlanService.getShoppingList(id).then(result => {\r\n setView(result);\r\n });\r\n }\r\n }, []);\r\n\r\n // Actions\r\n const saveChanges = (formData: IUpdateShoppingListCommand) => {\r\n MealPlanService.updateShoppingList(formData).then(result => handleResponseAndReload(result));\r\n }\r\n\r\n const closeItem = () => {\r\n nav('/MealPlans/Edit/' + id);\r\n }\r\n\r\n const handleResponseAndReload = (data: IApiResponse, successMessage?: string) => {\r\n if (!data.success){\r\n alertRef.current.showError(data.Title);\r\n return;\r\n }\r\n\r\n alertRef.current.showSuccess(successMessage);\r\n MealPlanService.getShoppingList(id).then(result => setView(result));\r\n };\r\n\r\n const CheckboxCell = (props: GridCellProps) => {\r\n \r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const IngredientItemCell = (props: GridCellProps) => {\r\n\r\n const i = props.dataItem;\r\n\r\n return (\r\n {i.amountDisplay} {i.name} {i.optional && - Optional}\r\n )\r\n }\r\n\r\n const ShoppingListGrid = (props: FieldArrayRenderProps) => {\r\n const { validationMessage, visited, name, formRenderProps } = props;\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const Buttons = (buttonRenderProps: IButtonGroupRenderProps) => {\r\n return (\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n return (\r\n
\r\n
\r\n (\r\n \r\n
\r\n
\r\n

Shopping List

\r\n
\r\n
\r\n \r\n
\r\n
\r\n {view.mealPlanId && (\r\n \r\n \r\n \r\n )}\r\n
\r\n )} />\r\n \r\n
\r\n
\r\n );\r\n}","import { Field, FieldArray, FieldArrayRenderProps, FieldRenderProps, FieldWrapper, Form, FormElement, FormRenderProps } from \"@progress/kendo-react-form\";\r\nimport { Grid, GridCellProps, GridColumn } from '@progress/kendo-react-grid';\r\nimport { Input, Checkbox, NumericTextBox } from \"@progress/kendo-react-inputs\";\r\nimport { Editor, EditorTools, EditorUtils } from '@progress/kendo-react-editor';\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport FileSaver from 'file-saver';\r\nimport { MealPlanService } from \"./MealPlanService\";\r\nimport { Alert } from 'components/Alert';\r\nimport { useListFunctions } from \"hooks/useListFunctions\";\r\nimport { Card, CardBody, CardFooter, CardHeader, Label, Table, Alert as ReactstrapAlert } from \"reactstrap\";\r\nimport Icon from \"@mdi/react\";\r\nimport { mdiArchive, mdiArrowLeft, mdiCheck, mdiCheckboxBlankOutline, mdiClose, mdiCross, mdiDelete, mdiFilePdfBox, mdiPlus, mdiRestore } from \"@mdi/js\";\r\nimport { IArchiveMealPlanCommand, IDeleteMealPlanCommand, IRestoreMealPlanCommand, IUpdateExportOptionsCommand, IUpdateShoppingListCommand } from \"./MealPlanCommands\";\r\nimport { IApiResponse, IButtonGroupRenderProps, IUserAuth } from \"common/Interfaces\";\r\nimport { useNavigate, useParams } from \"react-router-dom\";\r\nimport { createContext, useCallback, useContext, useEffect, useRef, useState } from \"react\";\r\nimport { EditMealPlanExportOptionsInitialState, IEditMealPlanExportOptions } from \"./MealPlanInterfaces\";\r\n\r\nexport const FormGridContext = createContext<{\r\n onChangeCover: (chosenIndex: number) => void;\r\n parentField: string;\r\n }>({} as any);\r\n\r\nexport const ExportMealPlan = (props: { auth: IUserAuth }) => {\r\n\r\n const editorRef = useRef();\r\n \r\n // Setup View\r\n const { id } = useParams();\r\n const nav = useNavigate();\r\n const [view, setView] = useState(EditMealPlanExportOptionsInitialState);\r\n const [exportingPdf, setExportingPdf] = useState(false);\r\n\r\n // Alerts\r\n const alertRef = useRef(null);\r\n\r\n // Load Data\r\n useEffect(() => {\r\n if (!!id){\r\n MealPlanService.getExportOptions(id).then(result => {\r\n setView(result);\r\n });\r\n }\r\n }, []);\r\n\r\n // Actions\r\n const saveChangesAndExport = (formData: IUpdateExportOptionsCommand) => {\r\n formData = prepareForSave(formData);\r\n MealPlanService.updateExportOptions(formData).then(result => {\r\n handleResponseAndReload(result);\r\n exportPdf();\r\n });\r\n }\r\n\r\n const exportPdf = () => {\r\n setExportingPdf(true);\r\n MealPlanService.exportPdf(id).then(result => {\r\n FileSaver.saveAs(result, 'MealPlan.pdf');\r\n }).finally(() => setExportingPdf(false));\r\n }\r\n\r\n const prepareForSave = (formData) => {\r\n\r\n if (editorRef.current) {\r\n const view = editorRef.current.view;\r\n\r\n if (view) {\r\n formData.introduction = EditorUtils.getHtml(view.state);\r\n }\r\n }\r\n return formData;\r\n }\r\n\r\n const closeItem = () => {\r\n nav('/MealPlans/Edit/' + id);\r\n }\r\n\r\n const handleResponseAndReload = (data: IApiResponse, successMessage?: string) => {\r\n if (!data.success){\r\n alertRef.current.showError(data.Title);\r\n return;\r\n }\r\n\r\n alertRef.current.showSuccess(successMessage);\r\n MealPlanService.getExportOptions(id).then(result => setView(result));\r\n };\r\n\r\n const CheckboxCell = (props: GridCellProps) => {\r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const CoverCheckboxCell = (props: GridCellProps) => {\r\n \r\n const { onChangeCover } = useContext(FormGridContext);\r\n\r\n const onToggle = () => {\r\n onChangeCover(props.dataIndex); \r\n }\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n };\r\n\r\n const RecipeCell = (props: GridCellProps) => {\r\n\r\n const i = props.dataItem;\r\n\r\n return (\r\n {i.amount} {i.name} {i.optional && - Optional}\r\n )\r\n }\r\n\r\n const ImageDisplayCell = (props: GridCellProps) => {\r\n return (\r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const RecipeGrid = (props: FieldArrayRenderProps) => {\r\n const { validationMessage, visited, name, formRenderProps } = props;\r\n\r\n // Update a row in the grid\r\n const onChangeCover = (chosenIndex) => {\r\n\r\n for (let i = 0; i < view.recipes.length; i++) {\r\n if (i != chosenIndex) {\r\n formRenderProps.onChange('recipes[' + i + '].useAsCover', { value: false });\r\n }\r\n }\r\n };\r\n \r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const Buttons = (buttonRenderProps: IButtonGroupRenderProps) => {\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n );\r\n }\r\n\r\n const RichTextEditor = (fieldRenderProps : FieldRenderProps) => {\r\n const { value, onChange } = fieldRenderProps;\r\n const { Undo, Redo, FontSize, FormatBlock, Bold, Italic, Underline, Strikethrough, OrderedList, UnorderedList, Indent, Outdent,\r\n AlignLeft, AlignCenter, AlignRight, Link, Unlink } = EditorTools;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n return (\r\n
\r\n
\r\n (\r\n \r\n
\r\n
\r\n

Export Options

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
\r\n {view.mealPlanId && (\r\n <>\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n )}\r\n
\r\n )} />\r\n \r\n
\r\n
\r\n );\r\n}","import { useEffect } from \"react\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport { MealPlanService } from \"./MealPlanService\";\r\n\r\n/// \r\n/// Redirect to last edited meal plan.\r\n/// Fall back to meal plan list if no meal plan found.\r\n/// \r\nexport const MealPlansRedirect = () => {\r\n\r\n const nav = useNavigate();\r\n\r\n useEffect(() => {\r\n MealPlanService.getLastEditedId().then(id => {\r\n if (!!id && id !== '00000000-0000-0000-0000-000000000000'){\r\n nav('/MealPlans/Edit/' + id);\r\n } else {\r\n nav('/MealPlans/List');\r\n }\r\n });\r\n }, []);\r\n\r\n return <>\r\n}","import { Alert } from \"reactstrap\";\r\n\r\nexport const SubscriptionDetailsBanner = (props: { expiry: string }) => {\r\n\r\n if (!props.expiry) return <>;\r\n\r\n const expiry = new Date(props.expiry);\r\n const expiryString = expiry.toLocaleDateString();\r\n const showDanger = expiry < new Date();\r\n\r\n const hidden = !props.expiry;\r\n const color = showDanger ? 'danger' : 'success';\r\n\r\n const message = showDanger\r\n ? `Your subscription has expired on ${expiryString}. Please update your payment details.`\r\n : `Your subscription is valid till ${expiryString}, at which point it will auto-renew.`;\r\n\r\n return (\r\n \r\n );\r\n}","import { IApiResponse, IUserAuth } from 'common/Interfaces';\r\nimport { EditProfileInitialState, IEditProfile } from 'pages/Users/UserInterfaces';\r\nimport { useEffect, useRef, useState } from 'react';\r\nimport { useNavigate, useParams } from 'react-router-dom';\r\nimport { UserService } from 'services/UserService';\r\nimport { Alert } from 'components/Alert';\r\nimport { Input } from \"@progress/kendo-react-inputs\";\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport { Form, Field, FieldWrapper, FormElement, FormRenderProps } from \"@progress/kendo-react-form\";\r\nimport { FormValidation } from 'services/FormValidation';\r\nimport { mdiCheck, mdiClose } from '@mdi/js'; \r\nimport { Icon } from '@mdi/react';\r\nimport { IImageSelectorProps } from 'pages/Recipes/RecipeInterfaces';\r\nimport { Upload, UploadOnStatusChangeEvent } from '@progress/kendo-react-upload';\r\nimport { Card, CardBody, CardFooter, Alert as ReactStrapAlert, Label } from 'reactstrap';\r\nimport { uploadHeaders, uploadUrl } from 'services/Middleware';\r\nimport { Spinner } from 'components/Spinner';\r\nimport { SubscriptionDetailsBanner } from 'components/SubscriptionDetailsBanner';\r\n\r\nexport const EditProfile = (props: { auth: IUserAuth }) => {\r\n\r\n // Setup View\r\n const { id } = useParams();\r\n const nav = useNavigate();\r\n const [view, setView] = useState(EditProfileInitialState);\r\n const [loading, setLoading] = useState(false);\r\n\r\n // Alerts\r\n const alertRef = useRef(null);\r\n\r\n // Load Data\r\n useEffect(() => {\r\n setLoading(true);\r\n UserService.getProfileForEdit()\r\n .then(result => setView(result))\r\n .finally(() => setLoading(false));\r\n }, []);\r\n\r\n // Actions\r\n const saveChanges = (formData: IEditProfile) => {\r\n UserService.updateProfile(formData).then(result => handleResponseAndReload(result));\r\n }\r\n\r\n const handleResponseAndReload = (data: IApiResponse, successMessage?: string) => {\r\n if (!data.success){\r\n alertRef.current.showError(data.Title);\r\n return;\r\n }\r\n\r\n alertRef.current.showSuccess(successMessage);\r\n UserService.getProfileForEdit().then(result => setView(result));\r\n };\r\n\r\n const closeItem = () => {\r\n nav(-1);\r\n };\r\n\r\n const Buttons = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n const ImageSelector = (props: IImageSelectorProps) => {\r\n\r\n const [lastImage, setLastImage] = useState(view.imageUri);\r\n\r\n const onUploadCompleted = (e: UploadOnStatusChangeEvent) => {\r\n if (e.response && e.response.status == 200){\r\n\r\n // The title field has the imageUri\r\n const result = e.response.response.title;\r\n setLastImage(result);\r\n props.formRenderProps.onChange('imageId', { value: getImageIdFromUri(result)});\r\n }\r\n }\r\n\r\n const getImageIdFromUri = (uri: string) => {\r\n const fileName = uri.split('/').pop();\r\n return fileName.substring(0, fileName.lastIndexOf('.'));\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n \r\n {lastImage && }\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n return (\r\n
\r\n
\r\n (\r\n \r\n
\r\n
\r\n

Edit Profile

\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n )} />\r\n \r\n
\r\n \r\n
\r\n );\r\n}","import { IApiResponse, IUserAuth } from 'common/Interfaces';\r\nimport { EditPasswordInitialState, EditProfileInitialState, IEditPassword, IEditProfile } from 'pages/Users/UserInterfaces';\r\nimport { useRef, useState } from 'react';\r\nimport { useNavigate, useParams } from 'react-router-dom';\r\nimport { UserService } from 'services/UserService';\r\nimport { Alert } from 'components/Alert';\r\nimport { Input } from \"@progress/kendo-react-inputs\";\r\nimport { Button, ButtonGroup } from \"@progress/kendo-react-buttons\";\r\nimport { Form, Field, FieldWrapper, FormElement, FormRenderProps } from \"@progress/kendo-react-form\";\r\nimport { FormValidation } from 'services/FormValidation';\r\nimport { mdiCheck, mdiClose } from '@mdi/js'; \r\nimport { Icon } from '@mdi/react';\r\n\r\nexport const EditPassword = (props: { auth: IUserAuth }) => {\r\n\r\n // Setup View\r\n const nav = useNavigate();\r\n const [view, setView] = useState(EditPasswordInitialState);\r\n\r\n // Alerts\r\n const alertRef = useRef(null);\r\n\r\n // Actions\r\n const saveChanges = (formData: IEditPassword) => {\r\n UserService.updatePassword(formData).then(result => handleResponseAndReload(result));\r\n }\r\n\r\n const handleResponseAndReload = (data: IApiResponse, successMessage?: string) => {\r\n if (!data.success){\r\n alertRef.current.showError(data.Title);\r\n return;\r\n }\r\n\r\n alertRef.current.showSuccess(successMessage);\r\n };\r\n\r\n const closeItem = () => {\r\n nav(-1);\r\n };\r\n\r\n const Buttons = () => {\r\n return (\r\n \r\n \r\n \r\n \r\n )\r\n }\r\n\r\n return (\r\n
\r\n
\r\n (\r\n \r\n
\r\n
\r\n

Change Password

\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n )} />\r\n \r\n
\r\n
\r\n );\r\n}","import { IUserAuth } from \"common/Interfaces\";\r\nimport { Icon } from '@mdi/react';\r\nimport { mdiYoutube } from \"@mdi/js\";\r\n\r\nexport const Tutorials = (props: { auth: IUserAuth }) => {\r\n\r\n return (\r\n
\r\n \r\n
\r\n
\r\n
    \r\n

  1. Setting up your profile (adding name and logo)
  2. \r\n

    \r\n

      \r\n
    • Select your username - in this case it is TEST01.
    • \r\n
    • Select EDIT PROFILE
    • \r\n
    \r\n \r\n
      \r\n
    • Enter your Email.
    • \r\n
    • Enter your First and Last name.
    • \r\n
    • Using the Select files button, select and insert your logo or branding.
    • \r\n
    • Select Save Changes button.
    • \r\n
    \r\n \r\n

    \r\n

  3. Searching the database
  4. \r\n

    \r\n There are 4 ways to search the Wholistic Meal Plans recipe database.\r\n

      \r\n
    • Title - enter an ingredient or part of the recipe name into the Title field.
    • \r\n
    • Intolerance - enter an intolerance into the Tag field.
    • \r\n
    • Exclusion - enter an ingredient or food you wish to exclude in the Exclusions field.
    • \r\n
    • Time - use the slider to adjust cooking Time limit.
    • \r\n
    \r\n \r\n As an example, we have entered:\r\n
      \r\n
    • Two Tags (low glycaemic and dinner).
    • \r\n
    • The ingredient beef in the Exclusions field.
    • \r\n
    • There are now 237 recipes in the Results Found.
    • \r\n
    \r\n \r\n

    \r\n

  5. Creating a Meal Plan
  6. \r\n

    \r\n

      \r\n
    • Select MEAL PLANS from the menu.
    • \r\n
    • Select Create.
    • \r\n
    \r\n \r\n
      \r\n
    • Type in the Profile Name of the Meal Plan.
    • \r\n
    • Select the number of days in the Meal Plan.
    • \r\n
    • Select Create.
    • \r\n
    • Select Close.
    • \r\n
    \r\n \r\n

    \r\n

  7. Adding a Recipe to a Meal Plan
  8. \r\n

    \r\n

      \r\n
    • Search & click on a recipe.
    • \r\n
    • Select + Meal Plan.
    • \r\n
    • Select Client from drop down menu, in this case Nina Proudman.
    • \r\n
    • Select which meal to place the recipe in, in this case, breakfast.
    • \r\n
    • Select Add to Meal Plan.
    • \r\n
    \r\n \r\n
      \r\n
    • When adding meals to a meal plan, sometimes the selection is greyed out. This means there is already a meal plan in that position.
    • \r\n
    • You can still add another \"meal\", \"side\" or \"condiment\" by clicking on the greyed out area - and a white tick will appear.
    • \r\n
    • Then select Add to Meal Plan.
    • \r\n
    \r\n \r\n

    \r\n

  9. Meal Plan - weekly view
  10. \r\n

    \r\n

      \r\n
    • You can edit or rename the wording in Days of Week & Meals.
    • \r\n
    • You can also delete entire rows if you are not providing snack options or other meal time options.
    • \r\n
    \r\n \r\n

    \r\n

  11. Meal Plan - servings, leftovers & excluding nutritional data
  12. \r\n

    \r\n

      \r\n
    • Increase or decrease the Servings to suit your client.
    • \r\n
    • Select as Leftover, for occasions where the meal can be used as another meal or on the following day. This will dull the selection to give you a visual indicator in the Meal Plan view.
    • \r\n
    • Select Exclude from Nutrition if you wish to exclude the nutritional data from a meal plan.
    • \r\n
    \r\n \r\n

    \r\n

  13. Meal Plan - exporting to PDF
  14. \r\n

    \r\n

      \r\n
    • Select Export.
    • \r\n
    \r\n \r\n
      \r\n
    • You can than describe the Meal Plan and create an introduction for your client in the Export Options. You can also add hyperlinks.
    • \r\n
    • Choose a Meal Plan cover photo by selecting Cover.
    • \r\n
    • Exclude a recipe from the Meal Plan if you've used the same recipe multiple times across the week.
    • \r\n
    \r\n \r\n

    \r\n
\r\n
\r\n
\r\n
\r\n );\r\n}","\r\nexport const PrivacyPolicy = () => {\r\n return (\r\n
\r\n
\r\n

Privacy Policy

\r\n

\r\n
    \r\n\t
  1. BACKGROUND
  2. \r\n
\r\n\r\n

Wholistic Meal Plans Pty Ltd (ACN 662 157 735) (“Wholistic Meal Plans”) is committed to protecting the privacy of your personal information.

\r\n\r\n

This Privacy Policy tells you how Wholistic Meal Plans and its related entities (together “us”, “our” or “we”) will handle your personal information in accordance with the Privacy Act 1988 (Cth) (“Privacy Act”), the Australian Privacy Principles (“APPs”).

\r\n\r\n

This Privacy Policy applies when you visit the Site. By visiting the Site, you   agree   to   the   terms   of   this   Privacy   Policy.  You should not use the Site if you do not agree with this Privacy Policy or our Terms of Use.

\r\n\r\n

Capitalised terms in this Privacy Policy have the meaning given to those terms in the Definitions section (below) to the extent included in that section.

\r\n\r\n
    \r\n\t
  1. DEFINITIONS
  2. \r\n
\r\n\r\n

Customer” means a person who uses the Site on any Device to purchase any of the products advertised on the Site or obtain and/or review any information contained on the Site.

\r\n\r\n

Device” means any type of device including a computer, mobile phone, tablet or console that meets the minimum specifications required to use the Site.

\r\n\r\n

Device Information” means data that can be automatically collected from any device used to access the Site, including your Device type, your Device’s network connections, your Device’s name, your Device’s IP address, information about your Device’s web browser and the internet connection used to access the Site, Geolocation Information, information about apps downloaded to your Device and biometric data (such as Touch ID/Fingerprint).

\r\n\r\n

Geolocation Information” means information that identifies your location by using via longitude and latitude coordinates obtained through GPS, Wi-Fi or cell site triangulation.

\r\n\r\n

Site” means the website operating from the domain at https://wholisticmealplans.com.au/.

\r\n\r\n

Products” means any and all products advertised on the Site.

\r\n\r\n

Technical Usage Data” means information we collect from your Device that you use to access the Site or search, review and purchase the Products such as what you have searched for and viewed on the Site, the length of your visit and the way you use the Site, including your IP address, statistics regarding how pages are loaded or viewed, the websites you visited before coming to the Sites and other usage and browsing information collected through cookies.

\r\n\r\n

User” means a Customer or any other user of the Site.

\r\n\r\n
    \r\n\t
  1. WHAT PERSONAL INFORMATION DO WE COLLECT?
  2. \r\n
\r\n\r\n

We collect and use personal information from Users and visitors of the Site. The specific type of personal information that we collect will depend on will depend on the reasons for, or circumstances of its collection and may include, but is not limited to, the following:

\r\n\r\n
    \r\n\t
  • Account registration and use information: name, telephone and mobile number, email address, residential and postal address, Facebook username (if you log in to the Application via Facebook) and contact list information (if your contact list is linked to your account);
  • \r\n\t
  • Verification of identity information: age, date of birth, place of birth, details and copies of identity documents (such as passport, driver’s licence, marriage certificate, change of name certificate, birth certificate, citizenship certificate, Medicare card, Centrelink card, Department of Veteran Affairs’ card and/or change of name certificate), tax file number, signature and photograph;
  • \r\n\t
  • Payment and transactional information: banking, credit card or debit card details, billing information, bill details, Device information and Technical Usage Data;
  • \r\n\t
  • Enquiries, communications and social media: information contained in any enquiry you submit to us regarding our Products and services, communication content, metadata associated with communications and information about you shared by social media platforms (if you communicate with us via a social media platform that we use); and 
  • \r\n\t
  • Other personal or sensitive information: health information and history, disability status, racial or ethnic origin(s), language(s) spoken, religious belief(s) and affiliation(s), gender(s), occupation(s), employment and qualification details, financial information and criminal history.
  • \r\n
\r\n\r\n

We generally do not collect sensitive information (as defined under the Privacy Act) and restrict collection of such information to circumstances where we have either obtained your express consent or we are permitted by law.

\r\n\r\n

If you do not allow us to collect all the personal information we reasonably request, we may not be able to deliver the Products to you.

\r\n\r\n
    \r\n\t
  1. HOW WE COLLECT PERSONAL INFORMATION
  2. \r\n
\r\n\r\n

We may collect your personal information directly from you or in the course of our dealings with you. For example, we collect personal information from you or about you from:

\r\n\r\n
    \r\n\t
  • your use of the Site;
  • \r\n\t
  • correspondence between you and us;
  • \r\n\t
  • visits to and submissions you make on our Site;
  • \r\n\t
  • your interactions with our electronic direct mail and/or emails from our marketing campaigns (such as clicks on links included in these emails); and
  • \r\n\t
  • registration and forms you may fill in for our marketing-related activities and events.
  • \r\n
\r\n\r\n

In some instances, we may receive personal information about you from third parties, including our related entities, government agencies and regulatory authorities. We may also receive personal information about you from your authorised third parties and publicly available sources.

\r\n\r\n
    \r\n\t
  1. WHY WE COLLECT, HOLD AND USE PERSONAL INFORMATION
  2. \r\n
\r\n\r\n

You permit us to collect, hold and use your personal information for purposes including, but not limited to, the following:

\r\n\r\n
    \r\n\t
  • to provide you with use of our Site;
  • \r\n\t
  • supplying the services to you;
  • \r\n\t
  • managing our relationship with you (including maintaining a User profile), communicating with you, identifying you when you contact us, responding to your enquiries and keeping records;
  • \r\n\t
  • the performance of our contractual arrangements;
  • \r\n\t
  • ensuring the security of our Site and maintaining back-ups of our database(s);
  • \r\n\t
  • offering, promoting, advertising, marketing and selling relevant and suitable services or products to you;
  • \r\n\t
  • sending you relevant notifications, electronic direct mail, email marketing campaigns and/or newsletters;
  • \r\n\t
  • processing payments you have authorised; and
  • \r\n\t
  • any other purposes identified at the time of collecting your personal information.
  • \r\n
\r\n\r\n

In addition to the above, you permit us to use your personal information:

\r\n\r\n
    \r\n\t
  • where you have consented to its use or disclosure;
  • \r\n\t
  • to develop and improve our business, the Site and the Products;
  • \r\n\t
  • for monitoring, research and analysis in relation to our business, the Site, our services or products;
  • \r\n\t
  • to involve you in market research, gauging customer satisfaction and seeking feedback;
  • \r\n\t
  • for our internal accounting and administration;
  • \r\n\t
  • where we reasonably believe that use or disclosure is necessary to lessen or prevent a serious, immediate threat to someone’s health or safety or the public’s health or safety;
  • \r\n\t
  • where we reasonably suspect that unlawful activity has been, is being or may be engaged in and the use or disclosure is a necessary part of our investigation or in reporting the matter to the relevant authorities;
  • \r\n\t
  • in the preparation for, or conduct of, court proceedings or in an administrative or out-of-court procedure (or the implementation of orders of a court or tribunal or on behalf of an enforcement body);
  • \r\n\t
  • for the purpose of obtaining or maintaining insurance coverage, managing risks, or obtaining professional advice; and
  • \r\n\t
  • for any lawful purpose.
  • \r\n
\r\n\r\n

Where we wish to use or disclose your personal information for other purposes, we will obtain your consent.

\r\n\r\n
    \r\n\t
  1. DISCLOSURE TO THIRD PARTIES
  2. \r\n
\r\n\r\n

By using the Site and/or by providing us with your personal information (or allowing another person to do so), you acknowledge and consent to us disclosing some or all of your personal information to third parties. This includes disclosure of your personal information and details:

\r\n\r\n
    \r\n\t
  • to our related entities as necessary for the provision of products and services or to enable them to provide service offerings you have requested;
  • \r\n\t
  • to our third party provider of verification of identity services (in which case you will be asked to agree to the third party provider’s applicable privacy policy and other policies);
  • \r\n\t
  • payment service providers for any payments you make via the Site (noting we use a third party payment service provider that is required to take reasonable steps to protect your information);
  • \r\n\t
  • to a person that uses the Products or Services on your behalf and/or a person you have authorised;
  • \r\n\t
  • if you enable third party applications to be used in conjunction with the Products and services, to those third party applications, including Facebook (if your account is linked to your Facebook login credentials);
  • \r\n\t
  • to our partners, contractors, suppliers, subcontractors and service providers, including without limitation our suppliers of IT based solutions that assist us in providing the Products and services, distributors of direct marketing communications; marketing agencies, insurers and external business advisors;
  • \r\n\t
  • in accordance with requirements or authorisations under applicable laws or to comply with our legal obligations; and
  • \r\n\t
  • to any other persons contemplated by this Privacy Policy.
  • \r\n
\r\n\r\n

We take reasonable steps to ensure that third party recipients are obliged to protect the privacy and security of your personal information and use it only for the purpose for which it is disclosed.

\r\n\r\n

Occasionally, we may be required to disclose your personal information to third parties are located outside of Australia. In this instance, we will take all reasonable steps to ensure that those third parties, in whichever jurisdiction, adhere to the terms of this Privacy Policy.

\r\n\r\n

To the maximum extent provided by law, we are not responsible or liable for the protection and privacy of any personal information provided to third parties. You accept and agree that the disclosed personal information will be held by third parties and may be used by them in accordance with the Privacy Act and any privacy policy they may have, and in such circumstances, the third party recipient will be solely responsible for their use of this personal information.

\r\n\r\n
    \r\n\t
  1. HOW WE HOLD AND STORE PERSONAL INFORMATION
  2. \r\n
\r\n\r\n

Your personal information is held and stored on paper, by electronic means or both. We have physical, electronic and procedural safeguards in place for personal information and take reasonable steps to ensure that your personal information is protected from misuse, interference, loss and unauthorised access, modification and disclosure. In some cases, these facilities may be located offshore and/or in cloud-based servers.

\r\n\r\n

Data held and stored on paper is stored in secure locked premises.

\r\n\r\n

Data held and stored electronically is protected by internal and external firewalls, high encryption and all access to electronic data including databases requires password access that meets Microsoft complexity standards.

\r\n\r\n

Access to personal information is restricted to staff and contractors whose job description requires access. Our employees and contractors are contractually obliged to maintain the confidentiality of any personal information held by us.

\r\n\r\n

Data stored or archived off-site is contained within secure facilities. We also require our storage contractors to implement privacy safeguards.

\r\n\r\n

We undertake regular data backups, with the data copied and backed up to multiple locations for redundancy purposes.

\r\n\r\n

Our staff receive regular training on privacy procedures.

\r\n\r\n

Where permitted by local data protection laws, we may use your personal information to send you targeted electronic marketing and promotional communications related to our Site and our Products and services (and those of third parties) that we think may interest you, unless you have requested not to receive such information.  We will only use your personal information for targeted electronic marketing and promotional communications if you have consented to it (which consent may be express or, where permitted by local data laws, inferred).  You can opt out of receiving any targeted electronic marketing or promotional communications by following the unsubscribe prompt provided in the communication.

\r\n\r\n
    \r\n\t
  1. DESTRUCTION OF PERSONAL INFORMATION
  2. \r\n
\r\n\r\n

We will retain your personal information whilst it is required for any of our business functions or for any other lawful purpose.

\r\n\r\n

We will retain your personal information for the time periods required by law.

\r\n\r\n

We use secure methods to destroy, desensitise or de-identify your personal information when it is no longer needed or legally required to be retained. Paper records are sent for secure destruction. In some instances, paper records and original documents will be returned to you and/or relevant third parties.

\r\n\r\n

Electronic records may be archived to alternative storage and are subject to the procedural safeguards described above.

\r\n\r\n
    \r\n\t
  1. ACCESS TO AND CORRECTION OF PERSONAL DATA
  2. \r\n
\r\n\r\n

You have a right to request access to or correction of your personal information held by us.

\r\n\r\n

If you wish to access, correct or update any personal information that we hold about you, please contact us via the details below. 

\r\n\r\n

We will respond to your request within a reasonable time of you making the request and give you access in the manner you requested unless it is unreasonable or impracticable for us to do so. There may be reasons why we cannot give you access to the information that you have requested, or we refuse to correct your personal information. In these instances, we will let you know these reasons in writing.

\r\n\r\n

To assist us to keep our records up to date, please notify us of any changes to your personal information.

\r\n\r\n
    \r\n\t
  1. DATA BREACH
  2. \r\n
\r\n\r\n

We will take seriously and deal promptly with any accidental or unauthorised loss, use or disclosure of personal information.

\r\n\r\n

We are subject to the Notifiable Data Breaches Scheme (“NDB Scheme”) under the Privacy Act. In assessing and responding to suspected notifiable data breaches, we will act in accordance with:

\r\n\r\n
    \r\n\t
  • our applicable policies which incorporate the requirements of the NDB Scheme; and
  • \r\n\t
  • the guidance of the Office of the Australian Information Commissioner (“OAIC”).
  • \r\n
\r\n\r\n

Where a breach of your personal information occurs that is likely to cause serious harm, we will notify you and make recommendations about the steps you should take in response to the breach. Where required by law, the OAIC will also be notified.

\r\n\r\n
    \r\n\t
  1. FEEDBACK AND SURVEYS
  2. \r\n
\r\n\r\n

From time to time, you may have the option to participate in surveys or provide feedback intended to improve the services offered by us which may involve providing additional personal information. Your participation in such activities is subject to your consent.

\r\n\r\n
    \r\n\t
  1. DIRECT MARKETING
  2. \r\n
\r\n\r\n

We may use and disclose your personal information for the purpose of direct marketing to you via direct mail, email, SMS, MMS, targeted digital advertising or any other means of marketing communication, where:

\r\n\r\n
    \r\n\t
  • you have consented to us doing so; or
  • \r\n\t
  • it is otherwise permitted by law.
  • \r\n
\r\n\r\n

You may opt out of direct marketing communications at any time by contacting us or by using opt-out facilities set out in the direct marketing communications.

\r\n\r\n
    \r\n\t
  1. COOKIES
  2. \r\n
\r\n\r\n

A cookie is a small data file that is placed on your computer or mobile device when you visit a website. Website owners widely use cookies in order to make their websites work, or to work more efficiently, as well as to provide reporting information. We use cookies to:

\r\n\r\n
    \r\n\t
  • personalise your visit to our Site (as a cookie allows a web server to ‘remember’ visitors on subsequent visits without having to prompt them for information previously supplied. A cookie can also remember courses previously viewed by a site visitor);
  • \r\n\t
  • provide information about us to you while you browse; and
  • \r\n\t
  • obtain non-identifying information about your demographic group and general interests.
  • \r\n
\r\n\r\n

You may elect to disable cookies and/or geolocation sharing at any time.

\r\n\r\n

Our Site may contain links to other websites of interest. However, we note that once you have used those links to leave our Site we do not have control over that other website and are not responsible for the protection and privacy of any information you provide whilst visiting such sites, and such sites are not governed by this Privacy Policy. You should exercise caution and look at the privacy policy applicable to the site(s) in question.

\r\n\r\n
    \r\n\t
  1. CHANGES TO THIS PRIVACY POLICY
  2. \r\n
\r\n\r\n

We may update our Privacy Policy from time to time by publishing a new version on our Site. Our Privacy Policy was last updated on 1st November 2022. By continuing to use our website or otherwise continuing to deal with us, you accept this Privacy Policy as it applies from time to time.

\r\n\r\n
    \r\n\t
  1. COMPLAINTS
  2. \r\n
\r\n\r\n

We have procedures in place for dealing with complaints and concerns about our practices in relation to the Privacy Act, the APPs, and any alleged breach of this Privacy Policy. We will respond to your complaint in accordance with the relevant provisions of the APPs. For further information, please contact us.

\r\n\r\n
    \r\n\t
  1. CONTACT
  2. \r\n
\r\n\r\n

You can contact us via:

\r\n\r\n

Privacy Officer
\r\nWholistic Meal Plans Pty Ltd
\r\nPO BOX 217
\r\nNobby Beach
\r\nQLD 4209 Australia
\r\nPhone: 1300 443 456
\r\nEmail: support@wholisticmealplans.com.au

\r\n
\r\n
\r\n );\r\n}","\r\nexport const TermsAndConditions = () => {\r\n return (\r\n
\r\n
\r\n

Terms and Conditions

\r\n

\r\n\r\n

TERMS OF USE

\r\n\r\n

Wholistic Meal Plans Pty Ltd (ACN 662 157 735) and its associated entities (together, “we”, “us” or “our”) provide you, a health industry professional, various information as well as the ability to create food intolerance friendly meal plans for your clients and patients. These Terms of Use are intended to explain our obligations and your obligations as a User of our Site.

\r\n\r\n

These Terms of Use are binding on any use of our Site on any Device and apply to you from the time that we provide you with access to any of the Site. These Terms of Use will govern any other terms and conditions provided by us that replace and/or supplement the service, unless such other terms and conditions are accompanied by a separate agreement stating otherwise, in which case the terms of that agreement will govern and be paramount to the extent of any inconsistency.

\r\n\r\n

You accept that your use or access of our Site and on any Device includes your unreserved acceptance of these Terms of Use and our Privacy Policy.

\r\n\r\n

By using or accessing our Site, you acknowledge that you have read and understood and agree to be bound by these Terms of Use in their entirety in addition to any other applicable laws and regulations and that you have the authority to act on behalf of any person or entity for whom you are using the Site and you agree to these Terms of Use personally and on behalf that person or entity.

\r\n\r\n

If you do not agree to any of these Terms of Use, you must not use the Site in any manner.

\r\n\r\n

If you have any particular questions, please contact us by email at support@wholisticmealplans.com.au.

\r\n\r\n

1. PRIVACY POLICY

\r\n\r\n

Your privacy is very important to us. Please refer to our Privacy Policy at for further information about how we collect, use, store, process and disclose your personal information.

\r\n\r\n

2. DEFINITIONS

\r\n\r\n

Unless the context provides otherwise, the following capitalised terms have the following meaning in these Terms of Use:

\r\n\r\n

Confidential Information” means the confidential information of a party which relates to the subject matter of these Terms of Use and includes:

\r\n\r\n

(a) confidential information relating to the technology and design of our Site including, but not limited to, algorithms, manuals, designs, diagrams and training videos of the Site;

\r\n\r\n

(b) the Data;

\r\n\r\n

(c) information relating to our personnel, policies or business strategies;

\r\n\r\n

(d) information relating to the terms upon which the Site is provided to you;

\r\n\r\n

(e) all information exchanged between the parties to these Terms of Use, whether in writing, electronically or orally, including the Site but does not include information which is, or becomes, publicly available other than through unauthorised disclosure by the other party.

\r\n\r\n

Data” means any data inputted by you or with your authority through the use of the Site and includes without limitation data owned or supplied by you or data which may otherwise be generated, compiled, arranged or developed using the Site by the User pursuant to these Terms of Use.

\r\n\r\n

Device” means any type of device including a computer, mobile phone, tablet or console.

\r\n\r\n

GST” has the meaning given by section 195-1 of the GST Act.

\r\n\r\n

GST Act” means the A New Tax System (Goods and Services) Tax Act 1999 (Cth) as amended or replaced from time to time.

\r\n\r\n

Intellectual Property Rights” means all intellectual property rights, including all copyright, patents, trademarks, design rights, trade secrets, domain names, know how and other rights of a similar nature, whether registrable or not and whether registered or not, and any applications for registration or rights to make such an application.

\r\n\r\n

Moral Rights” has the meaning given under the Copyright Act 1968 (Cth) and includes any similar rights existing in other countries.

\r\n\r\n

Site” means the website operating from the domain at https://wholisticmealplans.com.au/.

\r\n\r\n

Terms of Use” means these terms of use (as may be changed or updated from time to time by us.

\r\n\r\n

User” means any person, and where the context permits, includes any entity on whose behalf that person who uses (whether as a registered or unregistered user) or accesses the Site on any Device.

\r\n\r\n

you” means the User, and where the context permits, any person you authorise to use the Site on your behalf.

\r\n\r\n

your” has a corresponding meaning.

\r\n\r\n

3. USE OF SITE

\r\n\r\n

We grant you the right to access and use the Site. This right is non-exclusive, non-transferable, and limited by and subject to these Terms of Use.

\r\n\r\n

We reserve the right to change, suspend, remove, or disable access to any part of the Site at any time without notice. In no event will we be liable for the removal of or disabling of access to any such part of the Site. We may also impose limits on the use of, or access to, the Site in any case and without any notice or liability.

\r\n\r\n

4. ELIGIBILITY

\r\n\r\n

As a condition of your using and accessing the Site, you represent and warrant that you:

\r\n\r\n

(a) are aware and comply with all relevant and applicable laws regarding use of the information contained within the site;

\r\n\r\n

(b) will only provide Data and other information that is complete, accurate and up to date;

\r\n\r\n

(c) will not falsify any of your Data or other information;

\r\n\r\n

(d) will only maintain one account at any given time, and if your account is ever suspended or terminated for any reason, you will not create another account;

\r\n\r\n

(e) are not currently prohibited or otherwise restricted from using or accessing the Site;

\r\n\r\n

(f) are not a competitor of us, and are not using or accessing the Site for the purposes of competing with our business;

\r\n\r\n

(g) will not violate any of our or any other person’s rights, including but not limited to, Intellectual Property Rights; and

\r\n\r\n

(h) have full authority to enter into any agreement with us in connection with using or accessing the Site, including but not limited to, agreeing to be bound by these Terms of Use, and that doing so does not violate any other agreement which you have with any other party.

\r\n\r\n

5. YOUR OBLIGATIONS

\r\n\r\n

5.1. You must not:

\r\n\r\n

(a) use the Site for any purpose or in any manner other than as set out in these Terms of Use;

\r\n\r\n

(b) use the Site in any way that could damage our reputation or the goodwill or other rights associated with the Services; or

\r\n\r\n

(c) permit any third party to use the Site other than as set out in these Terms of Use;

\r\n\r\n

(d) attempt to undermine the security or integrity of our computing systems or networks or, where the Site are hosted by a third party, that third party’s computing systems and networks;

\r\n\r\n

(e) use, or misuse, the Site in any way which may impair the functionality of the Site, or other systems used to deliver the Site or impair the ability of any other user to use the Site;

\r\n\r\n

(f) attempt to gain unauthorised access to any materials other than those to which you have been given express permission to access or to the Device on which the Site is hosted;

\r\n\r\n

(g) transmit, or input into the Site, any files that may damage any other person’s computing devices or software, content that may be offensive, or material or Data in violation of any law (including Data or other material protected by copyright or trade secrets which you do not have the right to use); and/or

\r\n\r\n

(h) unless you have our prior written consent, rent, lease, lend, sell, redistribute or sublicense the Site, decompile, reverse engineer, disassemble, attempt to derive the source code of, modify, or create derivative works of the Site, any updates, or any part thereof or any computer programs used to deliver and/or operate the Site (except as and only to the extent any foregoing restriction is prohibited by applicable law or to the extent as may be permitted by the licensing terms governing use of any open sourced components included with the Site).

\r\n\r\n

5.2. You must only use the Site for your own lawful personal or business purposes, in accordance with these Terms of Use and any notice sent by us and any other additional terms, conditions, policies, rules, disclaimers and notices displayed elsewhere on the Site may be changed or updated from time to time by us. You may use the Site on behalf of others or in order to provide services to others but if you do so you must ensure that you are authorised to do so and that all persons for whom or to whom goods and/or services are provided, comply with and accept all Terms of Use that apply to you.

\r\n\r\n

5.3. You must ensure you protect the Site at all times from unauthorised access, use or damage and you must ensure that all usernames and passwords required to access the Site are kept secure and confidential. You must immediately notify us of any unauthorised use of your passwords or any other breach of security and you must reset your password and you must take all other actions that we reasonably deem necessary to maintain or enhance the security of our computing systems and networks and your access to the Site.

\r\n\r\n

5.4. As a condition of these Terms of Use, when using or accessing the Site the User must pay all monies as and when due to us.

\r\n\r\n

5.5. Your use of any third party application from within the Site is subject to that party’s terms of use and conditions and you confirm that you have read and accepted that party’s terms of use and conditions.

\r\n\r\n

5.6. You will be responsible for providing your own Device and other access facilities (including terminal, software, internet access, modem and telecommunications facilities) necessary for utilising the Site. You must ensure that any Device on which the Site is used are in good, up to date working order and operating condition. We accept no responsibility or liability for any deficiency relating to your Device and other access facilities. Additionally, you acknowledge and agree that you will be solely liable for any fees or other charges incurred by you in connection with using or accessing the Site, including but not limited to software, hardware, equipment and internet usage charges.

\r\n\r\n

6. USAGE LIMITATIONS

\r\n\r\n

Use of the Site may be subject to limitations. Any such limitations will be advised.

\r\n\r\n

7. SUITABILITY OF GOODS

\r\n\r\n

You agree and acknowledge that:

\r\n\r\n

(a) save for any express representations and warranties, we make no representations as to the suitability, quality or acceptability of any meal plans generated and/or with regard to your or your clients particular needs (including any allergies or illnesses you or they may have);

\r\n\r\n

(b) if there are any issues with regard to the suitability, quality or acceptability of any meal plan provided to you, you will contact us directly in respect of such issues;

\r\n\r\n

8. FEES AND PAYMENTS

\r\n\r\n

8.1. Wholistic Meal Plans subscribers can purchase monthly or yearly membership options. By purchasing one of those options, you are committing to that option of term chosen. Memberships are billed on a recurring basis, and at the end of your nominated term, our payment provider will process the applicable membership fee. This processing of fee will continue to occur unless you cancel your subscription before the next billing date. You can find your billing information the profile page. We do not refund any subscriptions for late cancellations or unused membership time. You may cancel your membership at anytime by emailing us at support@wholisticmealplans.com.au. Charges are in Australian dollars (AUD). It is the responsibility of purchasers outside of Australia to pay the applicable taxes in their state or country.

\r\n\r\n

 

\r\n\r\n

8.2. You acknowledge that where you purchase any membership through our Site, you will be responsible for payment in full (without any set-off or deduction) before an account can be established or continued.

\r\n\r\n

8.3. Where such payments are taken through the Site, you acknowledge and accept that such payments are not processed or taken by us and instead are processed by a third party payment gateway (and you agree to be bound by any policies and terms applicable to that payment gateway).

\r\n\r\n

9. CONFIDENTIALITY

\r\n\r\n

9.1. Unless the relevant party has the prior written consent of the other or unless required to do so by law:

\r\n\r\n

(a) each party will preserve the confidentiality of all Confidential Information of the other obtained in connection with these Terms of Use. Neither party will, without the prior written consent of the other, disclose or make any Confidential Information available to any person, or use the same for its own benefit, other than as contemplated by these Terms of Use;

\r\n\r\n

(b) each party’s obligations under this clause will survive termination of these Terms of Use; and

\r\n\r\n

(c) you shall take all reasonable steps to ensure that your employees, agents, subcontractors or related entities, do not make public or disclose our Confidential Information. If you become aware that any of your employees, agents, sub-contractors or related entities passed on any Confidential Information to any other party, then you shall notify us in writing immediately.

\r\n\r\n

9.2. The provisions of this clause shall not apply to any information which:

\r\n\r\n

(a) is or becomes public knowledge other than by a breach of this clause;

\r\n\r\n

(b) is received from a third party who lawfully acquired it and who is under no obligation restricting its disclosure;

\r\n\r\n

(c) is in the possession of the receiving party without restriction in relation to disclosure before the date of receipt from the disclosing party; or

\r\n\r\n

(d) is independently developed without access to the Confidential Information.

\r\n\r\n

10. INTELLECTUAL PROPERTY

\r\n\r\n

10.1. Title to, and all Intellectual Property Rights in the Site and any documentation relating to the Site remain our (and/or our licensors) sole property.

\r\n\r\n

10.2. Nothing in these Terms of Use constitutes a transfer of any Intellectual Property Rights.

\r\n\r\n

10.3. Nothing transfers to you ownership of the Site or the recipes or our Intellectual Property Rights in relation to the Site or the recipes.

\r\n\r\n

10.4. You acknowledge that we (and/or our licensors) own all the Intellectual Property Rights in the Site and the recipes.

\r\n\r\n

10.5. We retain full legal rights in and title to the Site and recipes whether in its original form or as modified by you or us.

\r\n\r\n

10.6. You will not directly or indirectly do anything that would or might invalidate or put in dispute our title in the Site and the recipes.

\r\n\r\n

10.7. If any person makes any claim alleging that any information of the Site infringes any Intellectual Property Rights or Moral Rights of any person, you must:

\r\n\r\n

(a) promptly notify us in writing; and

\r\n\r\n

(b) co-operate with, assist and act at all times in accordance with our reasonable instructions, in relation to the claim and any consequent investigations, negotiations, settlement and dispute resolution proceedings.

\r\n\r\n

10.8. You must not:

\r\n\r\n

(a) permit any person to link to any page containing any part of the Site (including via a hyperlink or RSS feed) without our prior written consent;

\r\n\r\n

(b) except as expressly permitted by these Terms of Use, and except to the extent that applicable laws, including the Copyright Act 1968 (Cth), prevent us restraining you from doing so:

\r\n\r\n

(c) reproduce, make error corrections to or otherwise modify or adapt the Site or the recipes or create any derivative works based upon the Site or the recipes;

\r\n\r\n

(d) de-compile, disassemble or otherwise reverse engineer the Site or the recipes or permit any third party to do so; or

\r\n\r\n

(e) modify or remove any copyright or proprietary notices on the Site or the recipes.

\r\n\r\n

10.9. The materials displayed on, or contained within Site, or exported from the site including without limitation all software, design, text, editorial materials, informational text, photographs, illustrations, images, tools, artwork and other graphic materials, and names, logos, trademarks and service marks (the “Materials”), are the property of Wholistic Meal Plans and are protected by copyright, trade-mark or other intellectual property laws. Our materials can be used on the Site or in the original Portable Document Format ("PDF") but any use of the materials outside of the Site or the original PDF file generated from (or on) the Site without express written consent of Wholistic Meal Plans is prohibited. Usage of our photography, recipes or any other Materials for marketing purposes, outside of the original PDF is prohibited.

\r\n\r\n

11. DATA

\r\n\r\n

11.1. You agree that we may collect, process, use, disclose, store, and back-up your Data for any purpose (including the purpose of enabling you to use or access the Site and purchase the Products and any other purpose related to provision of services to you) subject to our Privacy Policy.

\r\n\r\n

11.2. You acknowledge and agree that:

\r\n\r\n

(a) where you create a user account or user profile, we may collect information from you (including personal information) in support of your registration. You authorise us to retain such inputted information;

\r\n\r\n

(b) where you interact with our Site, with or without a user account or profile, we may cache any transmitted data for a period of up to 24 hours (following which such data will be erased); and

\r\n\r\n

(c) where we collect, process, use, disclose, store, and back-up any of your personal information we will do so in accordance with our Privacy Policy.

\r\n\r\n

11.3. You agree that we may collect and use the Data and other technical and related information, including but not limited to information about your Device, system and application software, and peripherals, that is gathered periodically to facilitate the provision of software updates, product support and other services to you (if any) related to the Site. We may use this information, as long as it is in a form that does not personally identify you, to improve our products or to provide services or technologies to you.

\r\n\r\n

13. THIRD PARTY APPLICATIONS AND YOUR DATA

\r\n\r\n

13.1. If you enable third party applications for use in conjunction with the Site you acknowledge that we may allow the providers of those third party applications to access your Data as required for the interoperation of such third party applications with the Site.

\r\n\r\n

13.2. You agree that where you use any third party applications or services to interact with our Site in any way, you do so at your own risk and on the understanding that we are not responsible for any claims or loss arising out of, or in any way related to, your use of such third party applications or services and/or the interaction of such third party applications or services with our Site.

\r\n\r\n

14. WARRANTIES AND ACKNOWLEDGEMENTS

\r\n\r\n

14.1. We do not warrant that the use of the Site will be uninterrupted or error free. Among other things, the operation and availability of the systems used for accessing the Site, including public telephone services, computer networks, the internet and any Device, can be unpredictable and may from time to time interfere with or prevent access to the Site. We are not in any way responsible for any such interference or prevention of your use of or access to the Site.

\r\n\r\n

14.2. You warrant and acknowledge that:

\r\n\r\n

(a) you are authorised to use and access the Site and to access the information and Data that you input into the Site, including any information or Data input into the Site by any person you have authorised to use the Site.

\r\n\r\n

(b) you are authorised to access the processed information and Data that is made available to you through your use of the Site (whether that information and Data is your own or that of anyone else);

\r\n\r\n

(c) we have no responsibility to any person other than you and nothing in these Terms of Use confers, or purports to confer, a benefit on any person other than you;

\r\n\r\n

(d) you are responsible for authorising any person who is given access to information or Data, and you agree that we have no obligation to provide any person access to such information or Data without your authorisation and may refer any requests for information to you to address; and

\r\n\r\n

(e) the provision of, access to, and use of, the Site is on an “as is” basis and at your own risk;

\r\n\r\n

(f) it is your sole responsibility to determine that the Site meets your personal needs and requirements and are suitable for the purposes for which they are used;

\r\n\r\n

(g) you remain solely responsible for complying with laws applicable to you; and

\r\n\r\n

(h) it is your responsibility to check that storage of and access to your Data via the Site will comply with laws applicable to you (including any laws requiring you to retain records).

\r\n\r\n

14.3. You acknowledge and warrant that if you use our Site on behalf of or for the benefit of anyone other than yourself (whether a body corporate or otherwise):

\r\n\r\n

(a) you are responsible for ensuring that you have the right to do so;

\r\n\r\n

(b) you agree that you have obtained that person’s authority and consent to use the Site on their behalf and have the authority to agree to these Terms of Use on behalf of that person;

\r\n\r\n

(c) you agree that by registering to use the Site you bind the person on whose behalf you act to the performance of any and all obligations that you become subject to by virtue of these Terms of Use, without limiting your own personal obligations under these Terms of Use; and

\r\n\r\n

(d) the provision of, access to, and use of, the Site is on an “as is” basis and at your (and that person’s) own risk.

\r\n\r\n

15. OUR LIABILITY

\r\n\r\n

15.1. You acknowledge and agree that the Site and meal plans cannot be tested in every possible combination, operating condition or application, and how and for what purpose the Site and the meal plans are used by you is not within our control.

\r\n\r\n

15.2. To the maximum extent permitted by law:

\r\n\r\n

(a) we exclude all warranties and representations as to the correctness, accuracy, adequacy, completeness, currency, reliability, timeliness or usefulness of any information or other content posted on the Site;

\r\n\r\n

(b) we do not guarantee that the Site, or the server supporting the Site, is free from defects, viruses or other harmful components, or will be uninterrupted or error free;

\r\n\r\n

(c) we do not guarantee that the meal plans are free from any defects or errors;

\r\n\r\n

(d) we accept no liability for the loss of Data where such loss is wholly or partly caused by factors beyond our reasonable control including, but not limited to, failure or fault in the hosted environment of the Site, defective network or internet connections, defective equipment utilised by you or incorrect operation by you of your own Device or other access facilities;

\r\n\r\n

(e) we shall not be responsible for any disclosure, use, modification or deletion of your Data resulting from any access by third party application providers; and

\r\n\r\n

(f) neither us, nor our directors, officers, employees, contractors or agents, will be liable for any direct, indirect, consequential or other loss or damage to any person or entity, however caused (whether by negligence or otherwise), arising in connection with your use of, or inability to use, the Site or the meal plans, or reliance upon any of the content or other information posted on the Site or the meal plans.

\r\n\r\n

15.3. Save for any terms, conditions, guarantees, warranties, indemnities or other rights which may arise under the Australian Consumer Law or other legislation and which cannot be excluded:

\r\n\r\n

(a) all warranties, whether express or implied including warranties as to fitness for any purpose and merchantability are expressly excluded; and

\r\n\r\n

(b) to the extent legally possible any liability that we may have to the User in relation to the Site which cannot be excluded shall be limited to, at our discretion:

\r\n\r\n

(i) either the supplying of the meal plan again; or

\r\n\r\n

(ii) the payment of the cost of having the meal plan supplied again.

\r\n\r\n

15.4. We shall not be liable for:

\r\n\r\n

(a) any injury, loss, expense or damages (including loss of life) of any kind whatsoever or however arising whether directly, indirectly, consequently or contingently to any person or property and without limiting the generality of the foregoing; and

\r\n\r\n

(b) any losses, expenses or damages caused by delays or any other reasons or additional expenses incurred by the User including losses of prospective profits or actual profits incurred by the User.

\r\n\r\n

15.5. The site provides nutrition(al) data gathered primarily from the Food Standards Australia New Zealand (FSANZ) database, whenever available, or otherwise other online calculators.

\r\n\r\n

(a) Nutrition information can vary for a recipe based on factors such as precision of measurements, brands, ingredient freshness, or the source of nutrition data. We strive to keep the information as accurate as possible, but make no warranties regarding its accuracy. We encourage users to make their own calculations based on the actual ingredients used in the recipe using your preferred nutrition calculator.

\r\n\r\n

(b) All the recipes contained within the site are sourced and adapted to be intolerance friendly. However, we do not have control over the ingredients you use to make these recipes nor the environment in which you are making them. If we list specific foods or brand of ingredients, the user acknowledges that companies do change their products and ingredients at times, and you should always read labels. If you are following a gluten-free diet, for example, check on the gluten-free status of a product or ingredient yourself.

\r\n\r\n

(c) When an ingredient is mentioned that may contain, for example, gluten (such as oats or tamari), I am always referring to a gluten-free version of that ingredient whether noted or not. I am not responsible or liable for any reactions that might result from following the posted recipes. Your clients health is their and your responsibility.

\r\n\r\n

16. INDEMNITY

\r\n\r\n

You agree to indemnify and hold us and our officers, employees and agents harmless (“those indemnified“) from and against any action, liability, claim, loss, damage, proceeding, expense (including reasonable legal costs and expenses) suffered or incurred by any of those indemnified, whether directly or indirectly, in connection with:

\r\n\r\n

(a) your breach or non-observance of any of these Terms of Use;

\r\n\r\n

(b) your breach of any obligation you may have to us;

\r\n\r\n

(c) any breach or inaccuracy in any of your representations or warranties;

\r\n\r\n

(d) your use or access of the Site or the meal plans;

\r\n\r\n

(e) your or any third party’s instructions on the meal plans;

\r\n\r\n

(f) any Data submitted by you;

\r\n\r\n

(g) our possession, processing, use or other handling of the Data or related data, documentation or records;

\r\n\r\n

(h) our refusal to provide any person access to your information or Data in accordance with these Terms of Use; and

\r\n\r\n

(i) us making available information or Data to any person with your authorisation.

\r\n\r\n

17. ACKNOWLEDGEMENT AND RELEASE

\r\n\r\n

17.1. You acknowledge and agree that:

\r\n\r\n

(a) By using or accessing the Site, you may encounter content that may be deemed offensive, indecent, or objectionable, which content may or may not be identified as having explicit language, and that the results of any search or entering of a particular URL may automatically and unintentionally generate links or references to objectionable material. Nevertheless, you agree to use or access the Site at your sole risk and that we shall not have any liability to you for any content that may be found to be offensive, indecent, or objectionable.

\r\n\r\n

17.2. You agree that, to the maximum extent permitted by law, you release us from any and all Claims suffered by you, in connection with:

\r\n\r\n

(a) any loss, cost or damage you suffer as a result of (or in any way connected to) any meal plan or recipe;

\r\n\r\n

(b) your use of our Site or the meal plans or recipes (except in the manner contemplated by these Terms of Use);

\r\n\r\n

(c) any collection, use, processing or disclosure of your personal information in accordance with our Privacy Policy; and

\r\n\r\n

(d) the protection and privacy of your personal information (except as set out in our Privacy Policy).

\r\n\r\n

18. FEEDBACK AND REVIEW

\r\n\r\n

18.1. From time to time, we may request that you provide us with feedback or reviews on the Site. You are not obliged to provide such feedback.

\r\n\r\n

18.2. From time to time, we may also request that you provide us with feedback or reviews with respect to the meal plans and recipes on our Site. You are not obliged to provide such feedback.

\r\n\r\n

18.3. You acknowledge and agree that we, at our sole discretion, may determine whether your comment is to be published on our Site.

\r\n\r\n

18.4. You acknowledge and agree that where you intend to post any negative review or comment with respect to the Site, recipes or meal plans on any external review site or social media platform, you will contact us and provide us with an opportunity to discuss your concerns before publishing such negative review or comment.

\r\n\r\n

19. SOCIAL MEDIA

\r\n\r\n

19.1. You agree that, where our Site integrates in any way with social media, with respect to such integrations, you will adhere to these Terms of Use and any other social media policy enacted by us from time to time.

\r\n\r\n

19.2. With respect to social media, for the purposes of marketing and/or promotion, you hereby acknowledge and authorise us to:

\r\n\r\n

(a) upload, publish, post or repost any content which directly or indirectly references content that you have uploaded, published, posted or reposted in respect of us and/or our Site, recipes or meal plans;

\r\n\r\n

(b) make use of any publicly available information (including venue information and imagery) for the purposes of any publication, post or repost.

\r\n\r\n

19.3. For the avoidance of doubt, by using the Site, you agree and consent to us undertaking any of the activities contemplated by clause 20.2 without the need to obtain any further consent from you.

\r\n\r\n

20. TERMINATION

\r\n\r\n

20.1. Your rights under these Terms of Use to use the Site will terminate automatically without notice from us if you fail to comply with these Terms of Use.

\r\n\r\n

20.2. Upon termination, you shall cease all use of the Site.

\r\n\r\n

20.3. Any termination shall not affect any accrued rights or liabilities of either party, nor shall it affect any provision of these Terms of Use which is expressly or by implication intended to continue in force after such termination.

\r\n\r\n

21. ASSIGNMENT AND NOVATION

\r\n\r\n

You may not assign or transfer any rights under these to any other person without our prior written consent.

\r\n\r\n

22. OUR RIGHTS

\r\n\r\n

Any express statement of a right belonging to us under these Terms of Use is without prejudice to any of our other rights expressly stated in these Terms of Use or existing at law.

\r\n\r\n

23. GOVERNING LAW

\r\n\r\n

The parties to these Terms of Use shall be bound by the laws of the State of Victoria in relation to all matters arising from all contracts between the parties and the parties agree to submit to the non-exclusive jurisdiction of the Court of Victoria and the Federal Courts of Australia and that any legal proceedings may be heard in these Courts.

\r\n\r\n

24. SEVERABILITY

\r\n\r\n

If any part or provision of these Terms of Use is invalid, unenforceable or in conflict with the law, that part or provision is replaced with a provision which, as far as possible, accomplishes the original purpose of that part or provision. The remainder of these Terms of Use will be binding on the parties.

\r\n\r\n

25. NOTICES

\r\n\r\n

25.1. Any notice given under these Terms of Use by either party to the other must be in writing by email and will be deemed to have been given on transmission.

\r\n\r\n

25.2. Notices must be sent to support@wholisticmealplans.com.au or to any other email address notified by email to you by us.

\r\n\r\n

25.3. Notices to you may be sent via electronic messages, including email, text message/SMS, or mobile push notifications, to the email address or numbers which you provided when setting up your access to the Site.

\r\n\r\n

26. RIGHTS OF THIRD PARTIES

\r\n\r\n

A person who is not a party to these Terms of Use has no right to benefit under or to enforce any term of these Terms of Use.

\r\n\r\n

27. VARIATION TO TERMS

\r\n\r\n

We reserve the right to change, modify, add or remove portions of these Terms of Use at any time without notice to you, effective upon posting it on the Site. By continuing to use or access the Site and purchasing the Products following any changes to these Terms of Use, you signify that you have read, understood and agree to be bound by the updated Terms of Use.

\r\n\r\n
\r\n
\r\n );\r\n}","export interface ISignUpViewModel {\r\n setupIntent: string;\r\n userName: string;\r\n email: string;\r\n firstName: string;\r\n lastName: string;\r\n companyName: string;\r\n phoneNumber: string;\r\n modality: string;\r\n modalityOther: string;\r\n}\r\n\r\nexport const SignUpViewModelInitialState : ISignUpViewModel = {\r\n setupIntent: '',\r\n userName: '',\r\n email: '',\r\n firstName: '',\r\n lastName: '',\r\n companyName: '',\r\n phoneNumber: '',\r\n modality: 'Nutritionist',\r\n modalityOther: '',\r\n}","import { SyntheticEvent, useEffect, useState } from 'react';\r\nimport { useNavigate } from 'react-router-dom';\r\nimport { Alert, Dropdown, Label } from 'reactstrap';\r\nimport { Button } from '@progress/kendo-react-buttons';\r\nimport { AuthService } from 'services/AuthService';\r\nimport { Field, FieldRenderProps, FieldWrapper, Form, FormElement, FormRenderProps } from '@progress/kendo-react-form';\r\nimport { Error } from \"@progress/kendo-react-labels\";\r\nimport { Input, RadioGroup } from \"@progress/kendo-react-inputs\";\r\nimport { DropDownList } from \"@progress/kendo-react-dropdowns\";\r\nimport { Elements, PaymentElement, useElements, useStripe } from '@stripe/react-stripe-js';\r\nimport { loadStripe, Stripe } from '@stripe/stripe-js';\r\nimport ServiceConfig from 'services/ServiceConfig';\r\nimport { FormValidation } from 'services/FormValidation';\r\nimport { ISignUpViewModel, SignUpViewModelInitialState } from './AuthViewModels';\r\nimport { get } from 'services/Middleware';\r\n\r\nexport const SignUpForm = () => {\r\n\r\n const [loading, setLoading] = useState(false);\r\n const [lastError, setLastError] = useState('');\r\n\r\n const [view, setView] = useState(SignUpViewModelInitialState);\r\n\r\n const modalityOptions = [\r\n { label: 'Nutritionist', value: 'Nutritionist' },\r\n { label: 'Naturopath', value: 'Naturopath' },\r\n { label: 'Dietician', value: 'Dietician' },\r\n { label: 'General Practitioner', value: 'General Practitioner' },\r\n { label: 'Integrative GP', value: 'Integrative GP' },\r\n { label: 'Allied Health Professional', value: 'Allied Health Professional' },\r\n { label: 'Health Coach', value: 'Health Coach' },\r\n { label: 'Personal Trainer', value: 'Personal Trainer' },\r\n { label: 'Other', value: 'Other' },\r\n ];\r\n\r\n // Stripe\r\n const stripe = useStripe();\r\n const elements = useElements();\r\n\r\n const [stripeError, setStripeError] = useState('');\r\n\r\n const handleSubmit = async (formData: ISignUpViewModel) => {\r\n \r\n if (await isUserNameTaken(formData.userName)) {\r\n setLastError(`Username \\'${formData.userName}\\' has already been taken.`);\r\n return;\r\n }\r\n\r\n if (await isEmailTaken(formData.email)){\r\n setLastError(`Email \\'${formData.email}\\' is already registered to another user.`);\r\n return;\r\n }\r\n\r\n let returnUrl = window.location.origin;\r\n returnUrl += `/PaymentStatus`;\r\n returnUrl += (`?userName=${formData.userName}`);\r\n returnUrl += (`&email=${formData.email}`);\r\n returnUrl += (`&firstName=${formData.firstName}`);\r\n returnUrl += (`&lastName=${formData.lastName}`);\r\n returnUrl += (`&companyName=${formData.companyName}`);\r\n returnUrl += (`&phoneNumber=${formData.phoneNumber}`);\r\n returnUrl += (`&modality=${formData.modality}`);\r\n returnUrl += (`&modalityOther=${formData.modalityOther}`);\r\n \r\n if (!stripe || !elements) {\r\n return;\r\n }\r\n\r\n const {error} = await stripe.confirmSetup({\r\n elements,\r\n confirmParams: {\r\n return_url: returnUrl,\r\n },\r\n });\r\n \r\n if (error) {\r\n setStripeError(error.message);\r\n }\r\n }\r\n\r\n const isUserNameTaken = (userName: string) : Promise => {\r\n return get('/account/userNameExists?userName=' + userName)\r\n .then(exists => {\r\n return exists;\r\n });\r\n }\r\n const isEmailTaken = (email: string) : Promise => {\r\n return get('/account/emailExists?email=' + email)\r\n .then(exists => {\r\n return exists;\r\n });\r\n }\r\n\r\n const InputWithValidation = (fieldRenderProps: FieldRenderProps) => {\r\n const { validationMessage, visited, ...others } = fieldRenderProps;\r\n return (\r\n
\r\n \r\n {visited && validationMessage && {validationMessage}}\r\n
\r\n );\r\n }\r\n\r\n const RegisterButton = () => {\r\n if (loading) {\r\n return \r\n } else {\r\n return \r\n }\r\n }\r\n \r\n return (\r\n <>\r\n (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n

Payment Details

\r\n

You will be making a payment of AU$39 monthly for this subscription.

\r\n \r\n \r\n {lastError}\r\n {stripeError}\r\n
\r\n )} />\r\n \r\n )\r\n}","import { useEffect, useState } from 'react';\r\nimport { AuthService } from 'services/AuthService';\r\nimport { Elements } from '@stripe/react-stripe-js';\r\nimport { loadStripe, Stripe } from '@stripe/stripe-js';\r\nimport { SignUpForm } from './SignUpForm';\r\nimport { useStripePublicKey } from 'hooks/useStripePublicKey';\r\n\r\nexport const SignUp = () => {\r\n \r\n // Stripe\r\n const stripePromise = loadStripe(useStripePublicKey());\r\n const [clientSecret, setClientSecret] = useState('');\r\n \r\n const stripeOptions = {\r\n clientSecret: clientSecret,\r\n }\r\n\r\n useEffect(() => {\r\n AuthService.getPaymentIntent().then(result => {\r\n if (!!result.clientSecret) {\r\n setClientSecret(result.clientSecret);\r\n }\r\n });\r\n }, []);\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n
\r\n

Create Account

\r\n {!!clientSecret &&\r\n \r\n \r\n \r\n }\r\n
\r\n
\r\n
\r\n \r\n );\r\n}","export const useStripePublicKey = () => {\r\n\r\n // Test environment\r\n const testPublicKey = \"pk_test_51M7mKqKGC04Zak3TnnDXmfvgqmpJBBdoUPJryBFGrrWm9gzoOYALVn9qsG6k9n6qNBxkNHeGr38ng8P6D610e7wK00A48Bvhf2\";\r\n\r\n // Prod environment\r\n const livePublicKey = \"pk_live_51M7mKqKGC04Zak3TtyyS7CUP2evYdcF4czsj7ZVX14Cx37RmQsnbXjsAdLueGb75y1lY52auCcpwskm5RyDjwUXG004HgRuoIP\";\r\n\r\n return livePublicKey;\r\n}","import { useEffect, useState } from \"react\";\r\nimport { useStripe } from \"@stripe/react-stripe-js\";\r\nimport { ISignUpViewModel } from \"./AuthViewModels\";\r\nimport { AuthService } from \"services/AuthService\";\r\nimport { useNavigate } from \"react-router-dom\";\r\nimport { Alert, Button } from \"reactstrap\";\r\nimport { Spinner } from \"components/Spinner\";\r\n\r\nexport const PaymentStatusQuery = (props: { clientSecret: string }) => {\r\n\r\n const nav = useNavigate();\r\n\r\n const [loading, setLoading] = useState(false);\r\n const [lastError, setLastError] = useState('');\r\n const [signUpComplete, setSignUpComplete] = useState(false);\r\n\r\n const stripe = useStripe();\r\n const [message, setMessage] = useState(null);\r\n\r\n useEffect(() => {\r\n if (!stripe){\r\n return;\r\n }\r\n\r\n stripe.retrieveSetupIntent(props.clientSecret)\r\n .then(({setupIntent}) => {\r\n switch (setupIntent.status) {\r\n case 'succeeded':\r\n createAccount();\r\n break;\r\n case 'processing':\r\n setMessage(\"Processing payment details. We'll update you when processing is complete.\");\r\n break;\r\n case 'requires_payment_method':\r\n setLastError('Payment failed. Please try again.');\r\n break;\r\n }\r\n })\r\n\r\n }, [stripe]);\r\n\r\n const createAccount = () => {\r\n const setupIntent = new URLSearchParams(window.location.search).get('setup_intent');\r\n const userName = new URLSearchParams(window.location.search).get('userName');\r\n const email = new URLSearchParams(window.location.search).get('email');\r\n const firstName = new URLSearchParams(window.location.search).get('firstName');\r\n const lastName = new URLSearchParams(window.location.search).get('lastName');\r\n const companyName = new URLSearchParams(window.location.search).get('companyName');\r\n const phoneNumber = new URLSearchParams(window.location.search).get('phoneNumber');\r\n const modality = new URLSearchParams(window.location.search).get('modality');\r\n const modalityOther = new URLSearchParams(window.location.search).get('modalityOther');\r\n\r\n const model: ISignUpViewModel = {\r\n setupIntent: setupIntent,\r\n userName: userName,\r\n email: email,\r\n firstName: firstName,\r\n lastName: lastName,\r\n companyName: companyName,\r\n phoneNumber: phoneNumber,\r\n modality: modality,\r\n modalityOther: modalityOther,\r\n }\r\n\r\n setLoading(true);\r\n\r\n AuthService.signUp(model)\r\n .then(response => {\r\n if (response.success){\r\n handleSuccess(); \r\n } else {\r\n handleFailure(response);\r\n }\r\n }).finally(() => setLoading(false));\r\n }\r\n\r\n function goToLogin(){\r\n nav('/Login');\r\n }\r\n\r\n function handleSuccess(){\r\n setLastError('');\r\n setSignUpComplete(true);\r\n }\r\n\r\n function handleFailure(response){\r\n setLastError(response.Title);\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n

Create Account

\r\n

{message}

\r\n {lastError}\r\n Your account has been created and a password has been emailed to you.\r\n \r\n \r\n
\r\n
\r\n
\r\n );\r\n}","import { Elements } from \"@stripe/react-stripe-js\";\r\nimport { loadStripe } from \"@stripe/stripe-js\";\r\nimport { useStripePublicKey } from \"hooks/useStripePublicKey\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { PaymentStatusQuery } from \"./PaymentStatusQuery\";\r\n\r\nexport const PaymentStatus = () => {\r\n \r\n const stripePromise = loadStripe(useStripePublicKey());\r\n \r\n const [clientSecret, setClientSecret] = useState('');\r\n \r\n const stripeOptions = {\r\n clientSecret: clientSecret,\r\n }\r\n\r\n useEffect(() => {\r\n const clientSecret = new URLSearchParams(window.location.search)\r\n .get('setup_intent_client_secret');\r\n \r\n setClientSecret(clientSecret);\r\n \r\n }, []);\r\n\r\n return (\r\n \r\n

\r\n
\r\n );\r\n}","import { useState } from 'react';\r\nimport { Alert } from 'reactstrap';\r\nimport { Button } from '@progress/kendo-react-buttons';\r\nimport { Form, FormElement, FormRenderProps } from '@progress/kendo-react-form';\r\nimport { PaymentElement, useElements, useStripe } from '@stripe/react-stripe-js';\r\n\r\nexport const UpdatePaymentForm = () => {\r\n\r\n const [loading, setLoading] = useState(false);\r\n\r\n // Stripe\r\n const stripe = useStripe();\r\n const elements = useElements();\r\n\r\n const [stripeError, setStripeError] = useState('');\r\n\r\n const handleSubmit = async (formData) => {\r\n\r\n let returnUrl = window.location.origin;\r\n returnUrl += `/UpdatePaymentResult`;\r\n \r\n if (!stripe || !elements) { \r\n return;\r\n }\r\n\r\n setLoading(true);\r\n\r\n const {error} = await stripe.confirmSetup({\r\n elements,\r\n confirmParams: {\r\n return_url: returnUrl,\r\n },\r\n });\r\n \r\n if (error) {\r\n setStripeError(error.message);\r\n }\r\n\r\n setLoading(false);\r\n }\r\n\r\n const UpdateButton = () => {\r\n if (loading) {\r\n return \r\n } else {\r\n return \r\n }\r\n }\r\n \r\n return (\r\n <>\r\n (\r\n \r\n \r\n \r\n {stripeError}\r\n \r\n )} />\r\n \r\n )\r\n}","import { useEffect, useState } from 'react';\r\nimport { Elements } from '@stripe/react-stripe-js';\r\nimport { loadStripe, Stripe } from '@stripe/stripe-js';\r\nimport { UserService } from 'services/UserService';\r\nimport { UpdatePaymentForm } from './UpdatePaymentForm';\r\nimport { IUserAuth } from 'common/Interfaces';\r\nimport { Alert, Card, CardBody, CardHeader, Label } from 'reactstrap';\r\nimport { SubscriptionDetailsBanner } from 'components/SubscriptionDetailsBanner';\r\nimport { EditProfileInitialState, IEditProfile } from './UserInterfaces';\r\nimport { useStripePublicKey } from 'hooks/useStripePublicKey';\r\n\r\nexport const ManageSubscription = (props: { auth: IUserAuth }) => {\r\n \r\n const [loading, setLoading] = useState(false);\r\n const [view, setView] = useState(EditProfileInitialState);\r\n const [lastError, setLastError] = useState('');\r\n\r\n // Stripe\r\n const stripePromise = loadStripe(useStripePublicKey());\r\n const [clientSecret, setClientSecret] = useState('');\r\n \r\n const stripeOptions = {\r\n clientSecret: clientSecret,\r\n }\r\n\r\n useEffect(() => {\r\n setLoading(true);\r\n\r\n UserService.getProfileForEdit()\r\n .then(result => setView(result))\r\n .finally(() => setLoading(false));\r\n\r\n UserService.getUpdateSetupIntent().then(result => {\r\n if (!result.success && !!result.Title) {\r\n setLastError(result.Title);\r\n }\r\n if (!!result.clientSecret) {\r\n setClientSecret(result.clientSecret);\r\n setLastError('');\r\n }\r\n });\r\n }, []);\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n

Manage Subscription

\r\n

Use this page to manage your subscription and payment details.

\r\n \r\n
\r\n
\r\n \r\n \r\n Update Payment Details\r\n \r\n \r\n {!!clientSecret &&\r\n \r\n \r\n \r\n }\r\n {lastError}\r\n \r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n );\r\n}","import { useEffect, useState } from \"react\";\r\nimport { useStripe } from \"@stripe/react-stripe-js\";\r\nimport { Alert } from \"reactstrap\";\r\nimport { Spinner } from \"components/Spinner\";\r\nimport { IUpdatePaymentMethodCommand } from \"./UserCommands\";\r\nimport { UserService } from \"services/UserService\";\r\nimport { IApiResponse } from \"common/Interfaces\";\r\n\r\nexport const UpdatePaymentResultChild = (props: { clientSecret: string }) => {\r\n\r\n const [loading, setLoading] = useState(true);\r\n const [isError, setIsError] = useState(false);\r\n const [updated, setUpdated] = useState(false);\r\n\r\n const stripe = useStripe();\r\n const [message, setMessage] = useState(null);\r\n\r\n useEffect(() => {\r\n if (!stripe) return;\r\n\r\n stripe.retrieveSetupIntent(props.clientSecret)\r\n .then(({setupIntent}) => {\r\n switch (setupIntent.status) {\r\n case 'succeeded':\r\n updatePaymentMethod();\r\n break;\r\n case 'processing':\r\n setMessage(\"Processing payment details. We'll update you when processing is complete...\");\r\n break;\r\n case 'requires_payment_method':\r\n setMessage('Payment method update in payment system failed. Please try again.');\r\n setIsError(true);\r\n setLoading(false);\r\n break;\r\n }\r\n })\r\n\r\n }, [stripe]);\r\n\r\n // Update customer and subscription through command.\r\n const updatePaymentMethod = () => {\r\n const setupIntentId = new URLSearchParams(window.location.search).get('setup_intent');\r\n\r\n const command: IUpdatePaymentMethodCommand = {\r\n setupIntentId: setupIntentId,\r\n };\r\n\r\n UserService.updatePaymentMethod(command)\r\n .then(response => handleResponse(response))\r\n .finally(() => setLoading(false));\r\n }\r\n\r\n const handleResponse = (response: IApiResponse) => {\r\n if (response.success){\r\n setMessage(\"Payment details have been updated.\");\r\n setUpdated(true);\r\n } else {\r\n setMessage('Payment method update failed: ' + response.Title);\r\n setIsError(true);\r\n }\r\n }\r\n\r\n return (\r\n
\r\n
\r\n

Updating Payment Method

\r\n {message}\r\n {message}\r\n \r\n \r\n
\r\n
\r\n );\r\n}","import { Elements } from \"@stripe/react-stripe-js\";\r\nimport { loadStripe } from \"@stripe/stripe-js\";\r\nimport { useStripePublicKey } from \"hooks/useStripePublicKey\";\r\nimport { useEffect, useState } from \"react\";\r\nimport { UpdatePaymentResultChild } from \"./UpdatePaymentResultChild\";\r\n\r\nexport const UpdatePaymentResult = () => {\r\n \r\n const stripePromise = loadStripe(useStripePublicKey());\r\n const [clientSecret, setClientSecret] = useState('');\r\n const stripeOptions = { clientSecret: clientSecret }\r\n\r\n useEffect(() => {\r\n const clientSecret = new URLSearchParams(window.location.search).get('setup_intent_client_secret');\r\n setClientSecret(clientSecret);\r\n }, []);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n}","export default __webpack_public_path__ + \"static/media/section-3-mealplans.169acbb0.png\";","export default __webpack_public_path__ + \"static/media/section-3-tags.05e347b2.jpg\";","export default __webpack_public_path__ + \"static/media/section-3-recipes.f3ef5dd0.jpg\";","export default __webpack_public_path__ + \"static/media/section-5-feature.e9ffe43b.png\";","import { useNavigate } from 'react-router';\r\nimport { Button } from '@progress/kendo-react-buttons';\r\nimport logo from '../../assets/images/wmp-logo.png';\r\nimport section2aus from '../../assets/images/section-2-aus.png';\r\nimport section2branded from '../../assets/images/section-2-branded.png';\r\nimport section2chef from '../../assets/images/section-2-chef.png';\r\nimport section2diet from '../../assets/images/section-2-diet.png';\r\nimport section3mealplans from '../../assets/images/section-3-mealplans.png';\r\nimport section3tags from '../../assets/images/section-3-tags.jpg';\r\nimport section3recipes from '../../assets/images/section-3-recipes.jpg';\r\nimport section5feature from '../../assets/images/section-5-feature.png';\r\n\r\n\r\nexport const Home = () => {\r\n const navigate = useNavigate();\r\n\r\n const signUp = () => {\r\n navigate('/SignUp');\r\n }\r\n\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Meal Planning Software for Health Professionals who want to create customised meal plans for their clients

\r\n

Fully customised meal planning software with personal business branding making it easy for you to uplevel your services.

\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Designed for the AUS/NZ Market

\r\n

Meals and ingredients that are relevant for your Australian and New Zealand clients.

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Recipes developed by nutritionists and chefs

\r\n

Every recipe is tried and tested in our kitchen by our Chefs and Nutritionists ensuring each recipe works, tastes great and is nutritionally balanced.

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Develop your own business branded meal plans

\r\n

Each meal plan includes your own branding.

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n

Create plans for even the most complex dietary requirements

\r\n

Search filters making it easy to source and include meals for clients with complex dietary needs and preferences.

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

A recipe database full of nutritionally dense, intolerance friendly meals that have been developed and adapted by our expert in-house Chefs and Nutritionists

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n \r\n
\r\n
From Anti-candida to low histamine, we've created hundreds of recipes for over 25 commonly diagnosed food intolerances, providing meal options for a range of breakfasts, lunches, sides, dinners, salads, snacks, desserts and beverages.
\r\n
\r\n \r\n
\r\n
\r\n
\r\n \r\n
How does it work? Simply filter your intolerance(s), exclude any ingredients you may not like, find your recipes, and add the recipe to your clients meal plan. For example, you have a client who is gluten and dairy intolerant who is also histamine intolerant and doesn't like capsicum? Simple. Enter those details into the search field and only the meals that match those parameters will show, allowing you to design a nutritionally balanced meal plan that takes all the guess work out of the equation. All meals have macros per serving calculated as well as vitamins and minerals levels listed. Once your meal plan is complete, it can be exported to a wonderful PDF booklet that is customised with your Business Logo ready to send to your client.
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Features and Benefits

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Simple and streamlined

\r\n
    \r\n
  • 100's of meals to choose from with more added monthly
  • \r\n
  • Nutritional breakdown for each meal provided from the Food AU/NZ database
  • \r\n
  • Automatic shopping list created for each meal plan
  • \r\n
  • Top tier customer service from our in-house business and tech support
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Use the software for

\r\n
    \r\n
  • 1:1 clients
  • \r\n
  • Group programs and online courses
  • \r\n
  • Workshops, cooking classes and corporate wellness programs
  • \r\n
  • Producing digital products
  • \r\n
  • Increasing your service offerings
  • \r\n
  • Generating leads
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Ensuring success for you and your client

\r\n
    \r\n
  • Saves you time and increases your earnings
  • \r\n
  • Helps you deliver the highest quality of care for your clients
  • \r\n
  • Improves treatment plan compliance
  • \r\n
  • Improves client retention
  • \r\n
  • Produces plans with your logo
  • \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Why we developed this for you

\r\n

A program designed to save you time, increase your income and improve client health outcomes

\r\n

Wholistic Meal Plans was born from the frustration experienced by our founder, Clinical Nutritionist - Danyel Waters, at the amount of time it took to develop and deliver nourishing, nutrient dense meal plans for patients with complex food intolerances or preferences.

\r\n {/*
\r\n \r\n
*/}\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

What our Health Professional users are saying

\r\n
\r\n
\r\n
\r\n
\r\n

\"It was such a pleasure to work with the Wholistic Meal Plans program\"

\r\n

Easy to locate recipes, navigate the system to create meal plans that are enjoyable and adhere to my client's dietary intolerances and all the while being (and for me this was the winner) an Australian-based program. Thank you, Team Wholistic Meal Plans, I look forward to continuing to use the program in my clinic.

\r\n

Dr. Sara Fieschi

\r\n
\r\n
\r\n
\r\n

\"I've been able to add an additional add on service without increasing my hours in Clinic\"

\r\n

Being able to offer customised meal planning as a service has increased the value of my treatment plans without adding hours of work outside of consultations. I love being able to filter the recipes by intolerance to really support my clients at that next level. Its so easy to use!

\r\n

Bec
Nutritionist

\r\n
\r\n
\r\n
\r\n

\"This is saving me so much time!\"

\r\n

I love using this program to create meal plans I know my clients will love. Before using this program I avoided writing meal plans because of the time involved, Wholistic Meal Plans solved that problem!

\r\n

Courtney
Naturopath and Nutritionist

\r\n
\r\n
\r\n
\r\n

\"The Meal Plans are super detailed for clients and so easy to use\"

\r\n

I was lucky enough to be part of the original beta testing team for the Wholistic Meal Plans software. It has helped me in my business saving so much time and is super easy to use. I am excited to continue using the software to uplevel my clients' meal plans and save me loads of time in the process.

\r\n

Erin
Personal Trainer

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Launching Sale Price

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
Foundation
\r\n
$39 AUD
\r\n
per month
\r\n
\r\n

Foundation Membership

\r\n

Cancel at any time

\r\n

$39 AUD

\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n
\r\n
\r\n

Foundation Membership

\r\n

Limited Time Offer

\r\n {/*

Contact us for more info

*/}\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n

Frequently Asked Questions

\r\n
\r\n
\r\n
\r\n
\r\n

Am I locked into a contract or can I cancel at any time?

\r\n

You can cancel your subscription at any time, without any cancellation fees. Your subscription will continue until the end of your current billing cycle, although we think you’ll love it just as much as we do, and it will become a valuable part of your everyday profession.

\r\n
\r\n
\r\n
\r\n
\r\n

What intolerances do you cater for?

\r\n

At present, we have hundreds of recipes catering for intolerances such as; anti-candida, auto immune, celiac, dairy free, low glycaemic, egg free, fodmap, gaps, gluten free, grain free, high protein, keto, low carb, low histamine, low lectin, low oxalate, nightshade free, nut free, paleo, pescatarian, pork free, refined sugar free, sibobiphasic1, sibobiphasic2, sulphite free, vegan, vegetarian.

\r\n
\r\n
\r\n
\r\n
\r\n

Is there a cap on the amount of Meal Plans I can produce?

\r\n

No, there are no caps on the amount of meal plans you can create and export. You can save up to 100 meal plans under your account.

\r\n
\r\n
\r\n
\r\n
\r\n

I have multiple practitioners at my clinic, can we all use the same login?

\r\n

Your user login is specific and unique to you. Please contact us for more information on our Clinic Pricing schedule.

\r\n
\r\n
\r\n
\r\n
\r\n

Can we edit the current recipes or add our own recipes?

\r\n

We are currently working on this functionality, and will have updates very soon.

\r\n
\r\n
\r\n
\r\n
\r\n
\r\n
\r\n );\r\n}","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAADdgAAA3YBfdWCzAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA/KSURBVHic7Z171FVlmcB/z6dc/EAuKppAapKpoS5dihcUU0BrqFVkpWXK0iJz2aKb45hmzkwzo62cJO3qVGaGOiSGqeiYKGGR5S0NTBEydaQBBSFEBLk888ezPzrf/p69zz5n73P2+c73/tZ611nrve1nv+9z3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kendo-theme-bootstrap/dist/all.scss\";\r\nimport 'bootstrap/scss/bootstrap.scss';\r\nimport 'assets/scss/App.scss';\r\nimport { useEffect, useState } from 'react';\r\nimport { Route, Routes, useNavigate } from 'react-router-dom';\r\nimport _ from \"lodash\";\r\nimport { AuthService } from 'services/AuthService';\r\nimport { Layout } from 'components/Layout';\r\nimport { Overview } from 'pages/Overview/Overview';\r\nimport { Ingredients } from 'pages/Ingredients/Ingredients';\r\nimport { Login } from 'pages/Authentication/Login';\r\nimport { Logout } from 'pages/Authentication/Logout';\r\nimport { EditIngredient } from 'pages/Ingredients/EditIngredient';\r\nimport { Users } from 'pages/Users/Users';\r\nimport { EditUser } from 'pages/Users/EditUser';\r\nimport { Recipes } from 'pages/Recipes/Recipes';\r\nimport { ViewRecipe } from 'pages/Recipes/ViewRecipe';\r\nimport { EditRecipe } from 'pages/Recipes/EditRecipe';\r\nimport { MealPlans } from 'pages/MealPlans/MealPlans';\r\nimport { EditMealPlan } from 'pages/MealPlans/EditMealPlan';\r\nimport { ShoppingList } from 'pages/MealPlans/ShoppingList';\r\nimport { ExportMealPlan } from 'pages/MealPlans/ExportMealPlan';\r\nimport { MealPlansRedirect } from 'pages/MealPlans/MealPlansRedirect';\r\nimport { IUserAuth } from 'common/Interfaces';\r\nimport { EditProfile } from 'pages/Users/EditProfile';\r\nimport { EditPassword } from 'pages/Users/EditPassword';\r\nimport { Tutorials } from 'pages/Tutorials/Tutorials';\r\nimport { PrivacyPolicy } from 'pages/Overview/PrivacyPolicy';\r\nimport { TermsAndConditions } from 'pages/Overview/TermsAndConditions';\r\nimport { SignUp } from 'pages/Authentication/SignUp';\r\nimport { PaymentStatus } from 'pages/Authentication/PaymentStatus';\r\nimport { ManageSubscription } from 'pages/Users/ManageSubscription';\r\nimport { UpdatePaymentResult } from 'pages/Users/UpdatePaymentResult';\r\nimport { Home } from 'pages/Authentication/Home';\r\n\r\nexport const App = () => {\r\n\r\n const navigate = useNavigate();\r\n\r\n const unauthenticatedUser: IUserAuth = {\r\n authenticated: false,\r\n username: '',\r\n role: '',\r\n isAdmin: false,\r\n isActiveSubscription: false,\r\n }\r\n\r\n const [auth, setAuth] = useState(unauthenticatedUser);\r\n\r\n useEffect(() => {\r\n AuthService.currentUser.subscribe(data => { \r\n \r\n if(!!data) {\r\n\r\n // Valid signed in user\r\n const details = AuthService.getUserDetails(data.token);\r\n\r\n setAuth({\r\n authenticated: true,\r\n username: details.unique_name,\r\n role: details.role,\r\n isAdmin: details.role === 'Admin',\r\n isActiveSubscription: details.isActiveSubscription === \"True\",\r\n });\r\n\r\n } else {\r\n\r\n // Not signed in\r\n setAuth(unauthenticatedUser);\r\n\r\n const pathRequiresLogin = _.filter(publicPages, p => p == window.location.pathname).length == 0;\r\n\r\n if (pathRequiresLogin) {\r\n navigate('/Login');\r\n }\r\n }\r\n });\r\n }, []);\r\n\r\n const publicPages = [\r\n '/',\r\n '/SignUp',\r\n '/PrivacyPolicy',\r\n '/TermsAndConditions',\r\n '/PaymentStatus',\r\n ];\r\n\r\n return (\r\n \r\n }>\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n } />\r\n \r\n \r\n )\r\n}","import ReactDOM from 'react-dom';\nimport { BrowserRouter } from 'react-router-dom';\nimport { App } from './App';\n\nReactDOM.render(\n \n \n ,\n document.getElementById('root')\n);\n"],"sourceRoot":""}