pcm-shared-components 2.0.18 → 2.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -28,6 +28,4 @@ import PlatformPaymentPlans from './components/Platform/PlatformPaymentPlans';
28
28
  import PlatformPlanTitles from './components/Platform/PlatformPlanTitles';
29
29
  import PlatformPlanPrices from './components/Platform/PlatformPlanPrices';
30
30
  import LoadingBackdrop from './components/Loaders/LoadingBackdrop';
31
- import ReservationTimelineComponent from './components/Timelines/ReservationTimelineComponent';
32
- import * as dateFormatter from './app/tools/date_formatter';
33
- export { TestButton, CodeHighlight, CustomFab, HelpButton, GenericDialogWindow, PcSharedComponentThemeInheritor, ImageCanvasDraw, PCMScrollbar, TwoColumnDisplay, SimpleTab, HrefLink, GenericAppBar, ReusablePopupMenu, SearchBar, TillButton, ProductItemButton, DropdownButton, translationResources, coreLocals, currencySymbol, DateRangeCalendar, SimpleLabel, CurrencyTextInput, ImageStack, PlatformPaymentPlans, PlatformPlanTitles, PlatformPlanPrices, LoadingBackdrop, ReservationTimelineComponent, dateFormatter };
31
+ export { TestButton, CodeHighlight, CustomFab, HelpButton, GenericDialogWindow, PcSharedComponentThemeInheritor, ImageCanvasDraw, PCMScrollbar, TwoColumnDisplay, SimpleTab, HrefLink, GenericAppBar, ReusablePopupMenu, SearchBar, TillButton, ProductItemButton, DropdownButton, translationResources, coreLocals, currencySymbol, DateRangeCalendar, SimpleLabel, CurrencyTextInput, ImageStack, PlatformPaymentPlans, PlatformPlanTitles, PlatformPlanPrices, LoadingBackdrop };
@@ -1 +1 @@
1
- *,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2196f380;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.static{position:static}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.right-0{right:0}.top-0{top:0}.left-0{left:0}.bottom-0{bottom:0}.z-99{z-index:99}.m-auto{margin:auto}.m-12{margin:1.2rem}.mx-6{margin-left:.6rem;margin-right:.6rem}.my-auto{margin-top:auto;margin-bottom:auto}.mx-12{margin-left:1.2rem;margin-right:1.2rem}.my-4{margin-top:.4rem;margin-bottom:.4rem}.mx-0{margin-left:0;margin-right:0}.my-24{margin-top:2.4rem;margin-bottom:2.4rem}.mx-auto{margin-left:auto;margin-right:auto}.mx-4{margin-left:.4rem;margin-right:.4rem}.my-12{margin-top:1.2rem;margin-bottom:1.2rem}.mx-2{margin-left:.2rem;margin-right:.2rem}.my-6{margin-top:.6rem;margin-bottom:.6rem}.mx-8{margin-left:.8rem;margin-right:.8rem}.-ml-10{margin-left:-1rem}.ml-24{margin-left:2.4rem}.ml-0{margin-left:0}.mr-0{margin-right:0}.ml-4{margin-left:.4rem}.mt-12{margin-top:1.2rem}.mt-24{margin-top:2.4rem}.mt-auto{margin-top:auto}.mb-24{margin-bottom:2.4rem}.mr-24{margin-right:2.4rem}.mb-12{margin-bottom:1.2rem}.ml-1{margin-left:.1rem}.mb-0{margin-bottom:0}.mt-4{margin-top:.4rem}.mt-0{margin-top:0}.ml-6{margin-left:.6rem}.mt-6{margin-top:.6rem}.mb-2{margin-bottom:.2rem}.mb-6{margin-bottom:.6rem}.ml-12{margin-left:1.2rem}.mr-12{margin-right:1.2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.h-screen{height:100vh}.min-h-160{min-height:16rem}.min-h-256{min-height:25.6rem}.w-full{width:100%}.w-auto{width:auto}.w-1\/2{width:50%}.w-2\/5{width:40%}.max-w-full{max-width:100%}.max-w-min{max-width:-moz-min-content;max-width:min-content}.flex-shrink-0{flex-shrink:0}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.cursor-not-allowed{cursor:not-allowed}.cursor-default{cursor:default}.resize{resize:both}.list-none{list-style-type:none}.list-disc{list-style-type:disc}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overscroll-none{overscroll-behavior:none}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.rounded{border-radius:.4rem}.rounded-md{border-radius:.6rem}.rounded-lg{border-radius:.8rem}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-2{border-width:2px}.border-t-8{border-top-width:8px}.border-dashed{border-style:dashed}.border-transparent{border-color:#0000}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(67 160 71/var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity:1;background-color:rgb(34 41 47/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(238 238 238/var(--tw-bg-opacity))}.bg-gray-400\/75{background-color:#bdbdbdbf}.bg-yellow-100\/50{background-color:#fff9c480}.p-0{padding:0}.p-6{padding:.6rem}.p-12{padding:1.2rem}.px-4{padding-left:.4rem;padding-right:.4rem}.py-2{padding-top:.2rem;padding-bottom:.2rem}.px-2{padding-left:.2rem;padding-right:.2rem}.pl-4{padding-left:.4rem}.pt-12{padding-top:1.2rem}.pt-4{padding-top:.4rem}.pl-0{padding-left:0}.pr-0{padding-right:0}.pb-4{padding-bottom:.4rem}.pl-8{padding-left:.8rem}.text-center{text-align:center}.font-sans{font-family:Muli,Roboto,-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-serif{font-family:Georgia,Cambria,Times New Roman,Times,serif}.text-sm{font-size:1.4rem;line-height:2rem}.text-17{font-size:1.7rem}.text-xl{font-size:2rem;line-height:2.8rem}.text-4xl{font-size:3.6rem;line-height:4rem}.text-base{font-size:1.6rem;line-height:2.4rem}.text-5xl{font-size:4.8rem;line-height:1}.text-2xl{line-height:3.2rem}.text-24,.text-2xl{font-size:2.4rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-900{font-weight:900}.font-500{font-weight:500}.font-semibold{font-weight:600}.font-extrabold{font-weight:800}.font-600{font-weight:600}.capitalize{text-transform:capitalize}.leading-tight{line-height:1.25}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity))}.text-green-600{--tw-text-opacity:1;color:rgb(67 160 71/var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity:1;color:rgb(251 140 0/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(158 158 158/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(97 97 97/var(--tw-text-opacity))}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-gray-500{text-decoration-color:#9e9e9e}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px 0 #0000000f;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px 0 var(--tw-shadow-color)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-1{--tw-shadow:0px 2px 1px -1px #0003,0px 1px 1px 0px #00000024,0px 1px 3px 0px #0000001f;--tw-shadow-colored:0px 2px 1px -1px var(--tw-shadow-color),0px 1px 1px 0px var(--tw-shadow-color),0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f)}.drop-shadow,.drop-shadow-none{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-none{--tw-drop-shadow:drop-shadow(0 0 #0000)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\:translate-y-1:hover{--tw-translate-y:0.1rem}.hover\:rotate-3:hover,.hover\:translate-y-1:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:rotate-3:hover{--tw-rotate:3deg}.hover\:skew-y-3:hover{--tw-skew-y:3deg}.hover\:scale-105:hover,.hover\:skew-y-3:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}.hover\:list-disc:hover{list-style-type:disc}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(56 142 60/var(--tw-bg-opacity))}.hover\:bg-gray-100\/75:hover{background-color:#f5f5f5bf}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(97 97 97/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:drop-shadow-2xl:hover{--tw-drop-shadow:drop-shadow(0 25px 25px #00000026);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-green-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(76 175 80/var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}@media (prefers-color-scheme:dark){.dark\:text-green-500{--tw-text-opacity:1;color:rgb(76 175 80/var(--tw-text-opacity))}.dark\:text-gray-500{--tw-text-opacity:1;color:rgb(158 158 158/var(--tw-text-opacity))}.dark\:text-orange-500{--tw-text-opacity:1;color:rgb(255 152 0/var(--tw-text-opacity))}}@media (min-width:600px){.sm\:p-8{padding:.8rem}}@media (min-width:960px){.md\:mx-auto{margin-left:auto;margin-right:auto}.md\:max-w-288{max-width:28.8rem}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:pt-0{padding-top:0}}
1
+ *,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2196f380;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.static{position:static}.absolute{position:absolute}.relative{position:relative}.right-0{right:0}.top-0{top:0}.left-0{left:0}.bottom-0{bottom:0}.z-99{z-index:99}.m-auto{margin:auto}.m-12{margin:1.2rem}.mx-6{margin-left:.6rem;margin-right:.6rem}.my-auto{margin-top:auto;margin-bottom:auto}.mx-12{margin-left:1.2rem;margin-right:1.2rem}.my-4{margin-top:.4rem;margin-bottom:.4rem}.mx-0{margin-left:0;margin-right:0}.my-24{margin-top:2.4rem;margin-bottom:2.4rem}.mx-auto{margin-left:auto;margin-right:auto}.mx-4{margin-left:.4rem;margin-right:.4rem}.my-12{margin-top:1.2rem;margin-bottom:1.2rem}.mx-2{margin-left:.2rem;margin-right:.2rem}.my-6{margin-top:.6rem;margin-bottom:.6rem}.mx-8{margin-left:.8rem;margin-right:.8rem}.-ml-10{margin-left:-1rem}.ml-24{margin-left:2.4rem}.ml-0{margin-left:0}.mr-0{margin-right:0}.ml-4{margin-left:.4rem}.mt-12{margin-top:1.2rem}.mt-24{margin-top:2.4rem}.mt-auto{margin-top:auto}.mb-24{margin-bottom:2.4rem}.mr-24{margin-right:2.4rem}.mb-12{margin-bottom:1.2rem}.ml-1{margin-left:.1rem}.mb-0{margin-bottom:0}.mt-4{margin-top:.4rem}.mt-0{margin-top:0}.mt-6{margin-top:.6rem}.mb-2{margin-bottom:.2rem}.ml-6{margin-left:.6rem}.mb-6{margin-bottom:.6rem}.ml-12{margin-left:1.2rem}.mr-12{margin-right:1.2rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.h-full{height:100%}.h-screen{height:100vh}.min-h-160{min-height:16rem}.min-h-256{min-height:25.6rem}.w-full{width:100%}.w-auto{width:auto}.w-1\/2{width:50%}.w-2\/5{width:40%}.max-w-full{max-width:100%}.max-w-min{max-width:-moz-min-content;max-width:min-content}.flex-shrink-0{flex-shrink:0}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.cursor-not-allowed{cursor:not-allowed}.cursor-default{cursor:default}.list-none{list-style-type:none}.list-disc{list-style-type:disc}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.space-x-10>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overscroll-none{overscroll-behavior:none}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.rounded{border-radius:.4rem}.rounded-md{border-radius:.6rem}.rounded-lg{border-radius:.8rem}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-2{border-width:2px}.border-t-8{border-top-width:8px}.border-transparent{border-color:#0000}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(67 160 71/var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity:1;background-color:rgb(34 41 47/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(238 238 238/var(--tw-bg-opacity))}.bg-yellow-100\/50{background-color:#fff9c480}.p-0{padding:0}.p-6{padding:.6rem}.p-12{padding:1.2rem}.px-4{padding-left:.4rem;padding-right:.4rem}.py-2{padding-top:.2rem;padding-bottom:.2rem}.px-2{padding-left:.2rem;padding-right:.2rem}.pl-4{padding-left:.4rem}.pt-12{padding-top:1.2rem}.pt-4{padding-top:.4rem}.pl-0{padding-left:0}.pr-0{padding-right:0}.pb-4{padding-bottom:.4rem}.pl-8{padding-left:.8rem}.text-center{text-align:center}.font-sans{font-family:Muli,Roboto,-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.font-serif{font-family:Georgia,Cambria,Times New Roman,Times,serif}.text-sm{font-size:1.4rem;line-height:2rem}.text-17{font-size:1.7rem}.text-xl{font-size:2rem;line-height:2.8rem}.text-4xl{font-size:3.6rem;line-height:4rem}.text-base{font-size:1.6rem;line-height:2.4rem}.text-5xl{font-size:4.8rem;line-height:1}.text-2xl{line-height:3.2rem}.text-24,.text-2xl{font-size:2.4rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-900{font-weight:900}.font-500{font-weight:500}.font-semibold{font-weight:600}.font-extrabold{font-weight:800}.font-600{font-weight:600}.capitalize{text-transform:capitalize}.leading-tight{line-height:1.25}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(117 117 117/var(--tw-text-opacity))}.text-green-600{--tw-text-opacity:1;color:rgb(67 160 71/var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity:1;color:rgb(251 140 0/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(158 158 158/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(97 97 97/var(--tw-text-opacity))}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.decoration-gray-500{text-decoration-color:#9e9e9e}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px 0 #0000000f;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px 0 var(--tw-shadow-color)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-1{--tw-shadow:0px 2px 1px -1px #0003,0px 1px 1px 0px #00000024,0px 1px 3px 0px #0000001f;--tw-shadow-colored:0px 2px 1px -1px var(--tw-shadow-color),0px 1px 1px 0px var(--tw-shadow-color),0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.drop-shadow{--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f)}.drop-shadow,.drop-shadow-none{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-none{--tw-drop-shadow:drop-shadow(0 0 #0000)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\:translate-y-1:hover{--tw-translate-y:0.1rem}.hover\:rotate-3:hover,.hover\:translate-y-1:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:rotate-3:hover{--tw-rotate:3deg}.hover\:skew-y-3:hover{--tw-skew-y:3deg}.hover\:scale-105:hover,.hover\:skew-y-3:hover{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:scale-105:hover{--tw-scale-x:1.05;--tw-scale-y:1.05}.hover\:list-disc:hover{list-style-type:disc}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(56 142 60/var(--tw-bg-opacity))}.hover\:bg-gray-100\/75:hover{background-color:#f5f5f5bf}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(97 97 97/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:drop-shadow-2xl:hover{--tw-drop-shadow:drop-shadow(0 25px 25px #00000026);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-green-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(76 175 80/var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}@media (prefers-color-scheme:dark){.dark\:text-green-500{--tw-text-opacity:1;color:rgb(76 175 80/var(--tw-text-opacity))}.dark\:text-gray-500{--tw-text-opacity:1;color:rgb(158 158 158/var(--tw-text-opacity))}.dark\:text-orange-500{--tw-text-opacity:1;color:rgb(255 152 0/var(--tw-text-opacity))}}@media (min-width:600px){.sm\:p-8{padding:.8rem}}@media (min-width:960px){.md\:mx-auto{margin-left:auto;margin-right:auto}.md\:max-w-288{max-width:28.8rem}.md\:flex-row{flex-direction:row}.md\:flex-col{flex-direction:column}.md\:pt-0{padding-top:0}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "2.0.18",
3
+ "version": "2.0.20",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {
@@ -69,18 +69,15 @@
69
69
  "i18next": "^21.8.14",
70
70
  "i18next-browser-languagedetector": "^6.1.4",
71
71
  "i18next-http-backend": "^1.4.1",
72
- "interactjs": "^1.9.2",
73
72
  "mobile-detect": "^1.4.5",
74
73
  "moment": "^2.29.1",
75
74
  "prismjs": "^1.27.0",
76
- "react-calendar-timeline": "^0.28.0",
77
75
  "react-canvas-draw": "^1.2.1",
78
76
  "react-color": "^2.19.3",
79
77
  "react-i18next": "^11.18.1",
80
78
  "react-markdown": "^8.0.3",
81
79
  "react-perfect-scrollbar": "^1.5.8",
82
80
  "react-split-it": "^2.0.0",
83
- "react-tooltip-lite": "^1.12.0",
84
81
  "styled-components": "^5.3.5",
85
82
  "tinycolor2": "^1.4.2"
86
83
  }
@@ -1,89 +0,0 @@
1
- //import "app/i18n";
2
- import i18next from "i18next";
3
-
4
- //this is the mapping of fields from the reservation_status table
5
- export const NOT_ARRIVED = 1; //'Not Arrived';
6
- export const CHECKED_IN = 2; //'Checked In';
7
- export const CHECKED_OUT = 3; //'Checked Out';
8
- export const ON_HOLD = 4; //'On Hold';
9
-
10
- export const getAvailableItems = () => {
11
- //Returns an object used to create the drop down list of item available to select.
12
- //Note this list ID needs to match the unit_type id in my database
13
- // id: is the unique id of the table id musth match table id
14
- // name: is the string value I want to use
15
- const return_val = [{
16
- id: NOT_ARRIVED,
17
- name: i18next.t("reservation_grid.reservation_status.not_arrived")
18
- }, {
19
- id: CHECKED_IN,
20
- name: i18next.t("reservation_grid.reservation_status.checked_in")
21
- }, {
22
- id: CHECKED_OUT,
23
- name: i18next.t("reservation_grid.reservation_status.checked_out")
24
- }, {
25
- id: ON_HOLD,
26
- name: i18next.t("reservation_grid.reservation_status.on_hold")
27
- }];
28
- return return_val;
29
- };
30
- export const getPreBuildString = () => {
31
- //THE PREBUILD_STRING is used to speed up the process by pre building the language string once and then looping over the PREBUILD_STRING instead of having i18next fetch the string for every check.
32
- //Note the GET function handles with PREBUILD_STRING or without. without is much much... slower if looping over the rows.
33
- const stringArray = getAvailableItems();
34
- const PREBUILT_STRING = {};
35
- PREBUILT_STRING[NOT_ARRIVED] = findName(stringArray, NOT_ARRIVED);
36
- PREBUILT_STRING[CHECKED_IN] = findName(stringArray, CHECKED_IN);
37
- PREBUILT_STRING[CHECKED_OUT] = findName(stringArray, CHECKED_OUT);
38
- PREBUILT_STRING[ON_HOLD] = findName(stringArray, ON_HOLD);
39
- return PREBUILT_STRING;
40
- };
41
- const findName = (array, value) => {
42
- //Just a quick way to return the object name by searching for the id inside the object
43
- try {
44
- return array.find(x => x.id === value).name;
45
- } catch (error) {}
46
- return 'Item not found!';
47
- };
48
- export const getMultiSelectItems = () => {
49
- //used to populate the status filter on the reservation grid, works with the fuseChipSelect module
50
- const status_chips = [{
51
- value: NOT_ARRIVED,
52
- label: i18next.t("reservation_grid.reservation_status.not_arrived"),
53
- class: "bg-yellow"
54
- }, {
55
- value: CHECKED_IN,
56
- label: i18next.t("reservation_grid.reservation_status.checked_in"),
57
- class: "bg-green text-white"
58
- }, {
59
- value: CHECKED_OUT,
60
- label: i18next.t("reservation_grid.reservation_status.checked_out"),
61
- class: "bg-grey"
62
- }, {
63
- value: ON_HOLD,
64
- label: i18next.t("reservation_grid.reservation_status.on_hold"),
65
- class: "on-hold"
66
- }];
67
- return status_chips;
68
- };
69
- export const getResStateI18nValue = (res_status, PREBUILT_STRING = {}) => {
70
- let status_i18n = null;
71
- const LOCAL_PREBUILT_STRING = Object.keys(PREBUILT_STRING).length === 0 ? getPreBuildString() : {};
72
- switch (res_status) {
73
- case NOT_ARRIVED:
74
- Object.keys(PREBUILT_STRING).length === 0 ? status_i18n = LOCAL_PREBUILT_STRING[NOT_ARRIVED] : status_i18n = PREBUILT_STRING[NOT_ARRIVED];
75
- break;
76
- case CHECKED_IN:
77
- Object.keys(PREBUILT_STRING).length === 0 ? status_i18n = LOCAL_PREBUILT_STRING[CHECKED_IN] : status_i18n = PREBUILT_STRING[CHECKED_IN];
78
- break;
79
- case CHECKED_OUT:
80
- Object.keys(PREBUILT_STRING).length === 0 ? status_i18n = LOCAL_PREBUILT_STRING[CHECKED_OUT] : status_i18n = PREBUILT_STRING[CHECKED_OUT];
81
- break;
82
- case ON_HOLD:
83
- Object.keys(PREBUILT_STRING).length === 0 ? status_i18n = LOCAL_PREBUILT_STRING[ON_HOLD] : status_i18n = PREBUILT_STRING[ON_HOLD];
84
- break;
85
- default:
86
- break;
87
- }
88
- return status_i18n;
89
- };
@@ -1,72 +0,0 @@
1
- //import "app/i18n";
2
- import i18next from "i18next";
3
-
4
- //this is the mapping of fields for any yes no display in the grid
5
- export const YES = 'Yes';
6
- export const NO = 'No';
7
- export const getPreBuildString = () => {
8
- //THE PREBUILD_STRING is used to speed up the process by pre building the language string once and then looping over the PREBUILD_STRING instead of having i18next fetch the string for every check.
9
- //Note the GET function handles with PREBUILD_STRING or without. without is much much... slower if looping over the rows.
10
- const PREBUILT_STRING = {};
11
- PREBUILT_STRING[NO] = i18next.t("common.app.no");
12
- PREBUILT_STRING[YES] = i18next.t("common.app.yes");
13
- return PREBUILT_STRING;
14
- };
15
- export const getMultiSelectConflictItems = () => {
16
- //used to populate the status filter on the reservation grid, works with the fuseChipSelect module
17
- const LOCALPREBUILT = getPreBuildString();
18
- const status_chips = [{
19
- value: YES,
20
- label: LOCALPREBUILT[YES],
21
- class: "res-conflict"
22
- }, {
23
- value: NO,
24
- label: LOCALPREBUILT[NO],
25
- class: "bg-grey "
26
- }];
27
- return status_chips;
28
- };
29
- export const getMultiSelectMadeOnlineItems = () => {
30
- //used to populate the made online filter on the reservation grid, works with the fuseChipSelect module
31
- const LOCALPREBUILT = getPreBuildString();
32
- const status_chips = [{
33
- value: YES,
34
- label: LOCALPREBUILT[YES],
35
- class: "made-online-yes"
36
- }, {
37
- value: NO,
38
- label: LOCALPREBUILT[NO],
39
- class: "bg-grey "
40
- }];
41
- return status_chips;
42
- };
43
- export const getYesNoStatusI18nValue = (status, PREBUILT_STRING = {}) => {
44
- let status_i18n = null;
45
- const LOCAL_PREBUILT_STRING = Object.keys(PREBUILT_STRING).length === 0 ? getPreBuildString() : {};
46
- switch (status) {
47
- case YES:
48
- Object.keys(PREBUILT_STRING).length === 0 ? status_i18n = LOCAL_PREBUILT_STRING[YES] : status_i18n = PREBUILT_STRING[YES];
49
- break;
50
- case NO:
51
- Object.keys(PREBUILT_STRING).length === 0 ? status_i18n = LOCAL_PREBUILT_STRING[NO] : status_i18n = PREBUILT_STRING[NO];
52
- break;
53
- default:
54
- break;
55
- }
56
- return status_i18n;
57
- };
58
- export const getYesNo_01_StatusI18nValue = (status, PREBUILT_STRING = {}) => {
59
- let val_i18n = null;
60
- const LOCAL_PREBUILT_STRING = Object.keys(PREBUILT_STRING).length === 0 ? getPreBuildString() : {};
61
- switch (status) {
62
- case 1:
63
- Object.keys(PREBUILT_STRING).length === 0 ? val_i18n = LOCAL_PREBUILT_STRING[YES] : val_i18n = PREBUILT_STRING[YES];
64
- break;
65
- case 0:
66
- Object.keys(PREBUILT_STRING).length === 0 ? val_i18n = LOCAL_PREBUILT_STRING[NO] : val_i18n = PREBUILT_STRING[NO];
67
- break;
68
- default:
69
- break;
70
- }
71
- return val_i18n;
72
- };
@@ -1,141 +0,0 @@
1
- import { getSeasonalStartDate, getSeasonalEndDate } from './seasonal_dates';
2
- import moment from 'moment';
3
- export const DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm';
4
-
5
- //outputs yyyy-mm-dd HH:MM
6
- export const dateToString = value => {
7
- try {
8
- if (Object.prototype.toString.call(value) === '[object Date]') {
9
- var date = value;
10
- var aaaa = date.getFullYear();
11
- var gg = date.getDate();
12
- var mm = date.getMonth() + 1;
13
- if (gg < 10) gg = "0" + gg;
14
- if (mm < 10) mm = "0" + mm;
15
- var cur_day = aaaa + "-" + mm + "-" + gg;
16
- var hours = date.getHours();
17
- var minutes = date.getMinutes();
18
- if (hours < 10) hours = "0" + hours;
19
- if (minutes < 10) minutes = "0" + minutes;
20
-
21
- // if (seconds < 10)
22
- // seconds = "0" + seconds;
23
- return cur_day + " " + hours + ":" + minutes;
24
- }
25
- } catch (error) {}
26
- return value;
27
- };
28
-
29
- /**
30
- * shortDateToString: yyyy-mm-dd
31
- *
32
- * @param {*} value a valid date must be give not a string
33
- * @returns outputs yyyy-mm-dd
34
- */
35
- export const shortDateToString = value => {
36
- try {
37
- if (Object.prototype.toString.call(value) === '[object Date]') {
38
- var date = value;
39
- var aaaa = date.getFullYear();
40
- var gg = date.getDate();
41
- var mm = date.getMonth() + 1;
42
- if (gg < 10) gg = "0" + gg;
43
- if (mm < 10) mm = "0" + mm;
44
- var cur_day = aaaa + "-" + mm + "-" + gg;
45
- return cur_day;
46
- }
47
- } catch (error) {}
48
- return value;
49
- };
50
-
51
- /**
52
- * createSeasonalRange
53
- *
54
- * Creates a seasonal range object that can be used in different situations.
55
- *
56
- * returns: [ { year:yyyy , from: yyyy-mm-dd HH:mm , to: yyyy-mm-dd HH:mm } ]
57
- *
58
- * @param {*} start_year
59
- * @param {*} end_year
60
- */
61
- export const createSeasonalRange = (start_year, end_year, seasonal_dates) => {
62
- //! Creating circular dependency luc
63
- // let seasonal_dates = store.getState().system.parameters.seasonal_dates;
64
- let return_value = [];
65
- try {
66
- for (let year = start_year; year <= end_year; year++) {
67
- return_value.push({
68
- year: year,
69
- from: new Date(getSeasonalStartDate(year, seasonal_dates)),
70
- to: new Date(getSeasonalEndDate(year, seasonal_dates))
71
- });
72
- }
73
- } catch (error) {
74
- console.error(error);
75
- }
76
- return return_value;
77
- };
78
-
79
- /**
80
- * This is used mostly in reports to crete the campgrounds seasonal fiscal year.
81
- *
82
- * Example: let's say we need the fiscal year for 2019, then we would use...
83
- *
84
- * 2018 ending date 2019 ending date
85
- * V V
86
- * ----------|---------------------------|----------------------
87
- *
88
- * @param {*} start_year starting range
89
- * @param {*} end_year ending range
90
- * @returns Returns an object with the fiscal year: ####, from: date, end: date
91
- */
92
- export const createSeasonalFiscalRange = (start_year, end_year, seasonal_dates) => {
93
- //! Creating circular dependency luc
94
- // let seasonal_dates = store.getState().system.parameters.seasonal_dates;
95
- let return_value = [];
96
- try {
97
- for (let year = start_year; year <= end_year; year++) {
98
- return_value.push({
99
- year: year,
100
- from: new Date(getSeasonalEndDate(year - 1, seasonal_dates)),
101
- to: new Date(getSeasonalEndDate(year, seasonal_dates))
102
- });
103
- }
104
- } catch (error) {
105
- console.error(error);
106
- }
107
- return return_value;
108
- };
109
-
110
- /**
111
- * Takes in a string such as YYYY-MM-DD HH-MM and returns a date object.
112
- Needed because on macos safari and iphone the new Date('YYYY-MM-DD HH:MM') will generate an error.
113
- This way it works on both android iphone etc...
114
- *
115
- * @param {*} date
116
- * @returns
117
- */
118
- export const convertStringToDate = date => {
119
- try {
120
- return moment(date).toDate();
121
- } catch (error) {
122
- console.error(error);
123
- }
124
- return date;
125
- };
126
-
127
- /**
128
- * IOS and safari appears to not like the format yyyy-mm-dd HH:mm
129
- So I need to convert it to yyyy/mm/dd HH:mm
130
- *
131
- * @param {*} date
132
- * @returns
133
- */
134
- export const convertDateToIosSafariSafeFormat = date => {
135
- try {
136
- return date.replace(/-/g, "/");
137
- } catch (error) {
138
- console.error(error);
139
- }
140
- return date;
141
- };
@@ -1,177 +0,0 @@
1
- /* eslint-disable eqeqeq */
2
- import * as YNStatus from "app/config/yes_no_status";
3
-
4
- /**
5
- * overlap
6
- *
7
- * this function takes an array of date ranges in this format:
8
- * [{ start: Date, end: Date}]
9
- * the array is first sorted, and then checked for any overlap
10
- * see this webpage: https://derickbailey.com/2015/09/07/check-for-date-range-overlap-with-javascript-arrays-sorting-and-reducing/
11
- *
12
- * @param {*} dateRanges {{start: Date, end: Date},{start: Date, end: Date}}
13
- * @returns true if overlap exists
14
- */
15
- export const overlap = dateRanges => {
16
- var sortedRanges = dateRanges.sort((previous, current) => {
17
- // get the start date from previous and current
18
- var previousTime = previous.start.getTime();
19
- var currentTime = current.start.getTime();
20
-
21
- // if the previous is earlier than the current
22
- if (previousTime < currentTime) {
23
- return -1;
24
- }
25
-
26
- // if the previous time is the same as the current time
27
- if (previousTime === currentTime) {
28
- return 0;
29
- }
30
-
31
- // if the previous time is later than the current time
32
- return 1;
33
- });
34
- var result = sortedRanges.reduce((result, current, idx, arr) => {
35
- // get the previous range
36
- if (idx === 0) {
37
- return result;
38
- }
39
- var previous = arr[idx - 1];
40
-
41
- // check for any overlap
42
- var previousEnd = previous.end.getTime();
43
- var currentStart = current.start.getTime();
44
- var overlap = previousEnd > currentStart;
45
-
46
- // store the result
47
- if (overlap) {
48
- // yes, there is overlap
49
- result.overlap = true;
50
- // store the specific ranges that overlap
51
- result.ranges.push({
52
- previous: previous,
53
- current: current
54
- });
55
- }
56
- return result;
57
-
58
- // seed the reduce
59
- }, {
60
- overlap: false,
61
- ranges: []
62
- });
63
-
64
- // return the final results
65
- return result.overlap;
66
- };
67
- export const lots_date_overlap = (reservation_new_data, current_selected_res_id, lot) => {
68
- /**
69
- * This will verify if the the current active res overlaps any other active res being added.
70
- */
71
-
72
- try {
73
- //verify if dates overlap with an existing reservation if lot id matches.
74
- let conflict_found = reservation_new_data.active_res.find((row, idx) => {
75
- return idx != current_selected_res_id && lot.lot_id == row.lot.lot_id && overlap([{
76
- start: new Date(reservation_new_data.active_res[current_selected_res_id].reservation.start_date),
77
- end: new Date(reservation_new_data.active_res[current_selected_res_id].reservation.end_date)
78
- }, {
79
- start: new Date(row.reservation.start_date),
80
- end: new Date(row.reservation.end_date)
81
- }]) ? true : false;
82
- });
83
- if (conflict_found) {
84
- return true;
85
- }
86
- } catch (error) {
87
- // let errors = error;
88
- }
89
- return false;
90
- };
91
-
92
- /**
93
- * validateExistingConflicts
94
- *
95
- * This will be used to ensure the current reservation conflicts that exist are still valid.
96
- * Will only loop over the reservations that are currently identified as conflicts and then verify if it's still a valid conflict.
97
- *
98
- * @param {*} reservation_data these are the reservation items
99
- * @returns returns the validation item with the corrected conflict status
100
- */
101
- export const validateExistingConflicts = (reservation_data, lot_number = "") => {
102
- try {
103
- const only_for_this_lot = reservation_data.filter(cur_res => cur_res.lot_number === lot_number);
104
- const YN_STRING = YNStatus.getPreBuildString();
105
-
106
- //Using the same criteria as the online server
107
- reservation_data = reservation_data.map(row => {
108
- if (row.lot_number === lot_number && parseInt(row.transaction_status_id, 10) <= 2 &&
109
- // if Completed or Incomplete
110
- parseInt(row.reservation_status_id, 10) !== 3 // if not Checked Out
111
- ) {
112
- if (only_for_this_lot.find(cur_res => parseInt(cur_res.transaction_status_id, 10) <= 2 &&
113
- // if Completed or Incomplete
114
- parseInt(cur_res.reservation_status_id, 10) !== 3 &&
115
- // if not Checked Out
116
- cur_res.reservation_id !== row.reservation_id &&
117
- // Don't verify itself
118
- overlap([{
119
- start: new Date(row.arrival_date),
120
- end: new Date(row.departure_date)
121
- }, {
122
- start: new Date(cur_res.arrival_date),
123
- end: new Date(cur_res.departure_date)
124
- }]))) {
125
- return {
126
- ...row,
127
- conflict_detected: "Yes",
128
- conflict_detected_i18n: YNStatus.getYesNoStatusI18nValue("Yes", YN_STRING)
129
- };
130
- } else {
131
- // The reservation is no longer in conflict with another res
132
- return {
133
- ...row,
134
- conflict_detected: "No",
135
- conflict_detected_i18n: YNStatus.getYesNoStatusI18nValue("No", YN_STRING)
136
- };
137
- }
138
- } else {
139
- if (parseInt(row.transaction_status_id, 10) === 3 || parseInt(row.reservation_status_id, 10) === 3) {
140
- // If cancelled or checked out then clear out the the conflicts if any
141
- return {
142
- ...row,
143
- conflict_detected: "No",
144
- conflict_detected_i18n: YNStatus.getYesNoStatusI18nValue("No", YN_STRING)
145
- };
146
- } else {
147
- return row;
148
- }
149
- }
150
- });
151
- } catch (error) {
152
- // let errors = error;
153
- }
154
- return reservation_data;
155
- };
156
- export const doDatesConflictWithOtherReservations = (reservation_data, lot_number, startDate, endDate) => {
157
- try {
158
- const only_for_this_lot = reservation_data.filter(cur_res => cur_res.lot_number === lot_number);
159
- if (only_for_this_lot.find(cur_res => parseInt(cur_res.transaction_status_id, 10) <= 2 &&
160
- // if Completed or Incomplete
161
- parseInt(cur_res.reservation_status_id, 10) !== 3 &&
162
- // if not Checked Out
163
- overlap([{
164
- start: new Date(startDate),
165
- end: new Date(endDate)
166
- }, {
167
- start: new Date(cur_res.arrival_date),
168
- end: new Date(cur_res.departure_date)
169
- }]))) {
170
- return true;
171
- } else {
172
- return false;
173
- }
174
- } catch (error) {
175
- console.error('Error in doDatesConflictWithOtherReservations', error);
176
- }
177
- };