@@ -56,7 +56,7 @@ export function App({bodyshop, checkUserSession, currentUser, online, setOnline,
|
||||
}
|
||||
|
||||
checkUserSession();
|
||||
}, [checkUserSession, setOnline]);
|
||||
}, [checkUserSession, setOnline]);
|
||||
|
||||
//const b = Grid.useBreakpoint();
|
||||
// console.log("Breakpoints:", b);
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
animation: alertBlinker 1s linear infinite;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
@keyframes alertBlinker {
|
||||
50% {
|
||||
color: red;
|
||||
@@ -99,6 +100,7 @@
|
||||
color: rgba(255, 140, 0, 0.8);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.production-completion-past {
|
||||
color: rgba(255, 0, 0, 0.8);
|
||||
font-weight: bold;
|
||||
|
||||
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 52 KiB |
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 -256 1792 1792">
|
||||
<g transform="matrix(1,0,0,-1,197.42373,1300.6102)">
|
||||
<path d="M 1408,131 Q 1408,11 1335,-58.5 1262,-128 1141,-128 H 267 Q 146,-128 73,-58.5 0,11 0,131 0,184 3.5,234.5 7,285 17.5,343.5 28,402 44,452 q 16,50 43,97.5 27,47.5 62,81 35,33.5 85.5,53.5 50.5,20 111.5,20 9,0 42,-21.5 33,-21.5 74.5,-48 41.5,-26.5 108,-48 Q 637,565 704,565 q 67,0 133.5,21.5 66.5,21.5 108,48 41.5,26.5 74.5,48 33,21.5 42,21.5 61,0 111.5,-20 50.5,-20 85.5,-53.5 35,-33.5 62,-81 27,-47.5 43,-97.5 16,-50 26.5,-108.5 10.5,-58.5 14,-109 Q 1408,184 1408,131 z m -320,893 Q 1088,865 975.5,752.5 863,640 704,640 545,640 432.5,752.5 320,865 320,1024 320,1183 432.5,1295.5 545,1408 704,1408 863,1408 975.5,1295.5 1088,1183 1088,1024 z"/>
|
||||
</g>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
|
||||
viewBox="0 -256 1792 1792">
|
||||
<g transform="matrix(1,0,0,-1,197.42373,1300.6102)">
|
||||
<path d="M 1408,131 Q 1408,11 1335,-58.5 1262,-128 1141,-128 H 267 Q 146,-128 73,-58.5 0,11 0,131 0,184 3.5,234.5 7,285 17.5,343.5 28,402 44,452 q 16,50 43,97.5 27,47.5 62,81 35,33.5 85.5,53.5 50.5,20 111.5,20 9,0 42,-21.5 33,-21.5 74.5,-48 41.5,-26.5 108,-48 Q 637,565 704,565 q 67,0 133.5,21.5 66.5,21.5 108,48 41.5,26.5 74.5,48 33,21.5 42,21.5 61,0 111.5,-20 50.5,-20 85.5,-53.5 35,-33.5 62,-81 27,-47.5 43,-97.5 16,-50 26.5,-108.5 10.5,-58.5 14,-109 Q 1408,184 1408,131 z m -320,893 Q 1088,865 975.5,752.5 863,640 704,640 545,640 432.5,752.5 320,865 320,1024 320,1183 432.5,1295.5 545,1408 704,1408 863,1408 975.5,1295.5 1088,1183 1088,1024 z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 981 B After Width: | Height: | Size: 955 B |
@@ -1 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M23.5 7c.276 0 .5.224.5.5v.511c0 .793-.926.989-1.616.989l-1.086-2h2.202zm-1.441 3.506c.639 1.186.946 2.252.946 3.666 0 1.37-.397 2.533-1.005 3.981v1.847c0 .552-.448 1-1 1h-1.5c-.552 0-1-.448-1-1v-1h-13v1c0 .552-.448 1-1 1h-1.5c-.552 0-1-.448-1-1v-1.847c-.608-1.448-1.005-2.611-1.005-3.981 0-1.414.307-2.48.946-3.666.829-1.537 1.851-3.453 2.93-5.252.828-1.382 1.262-1.707 2.278-1.889 1.532-.275 2.918-.365 4.851-.365s3.319.09 4.851.365c1.016.182 1.45.507 2.278 1.889 1.079 1.799 2.101 3.715 2.93 5.252zm-16.059 2.994c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5zm10 1c0-.276-.224-.5-.5-.5h-7c-.276 0-.5.224-.5.5s.224.5.5.5h7c.276 0 .5-.224.5-.5zm2.941-5.527s-.74-1.826-1.631-3.142c-.202-.298-.515-.502-.869-.566-1.511-.272-2.835-.359-4.441-.359s-2.93.087-4.441.359c-.354.063-.667.267-.869.566-.891 1.315-1.631 3.142-1.631 3.142 1.64.313 4.309.497 6.941.497s5.301-.184 6.941-.497zm2.059 4.527c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5zm-18.298-6.5h-2.202c-.276 0-.5.224-.5.5v.511c0 .793.926.989 1.616.989l1.086-2z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
||||
<path d="M23.5 7c.276 0 .5.224.5.5v.511c0 .793-.926.989-1.616.989l-1.086-2h2.202zm-1.441 3.506c.639 1.186.946 2.252.946 3.666 0 1.37-.397 2.533-1.005 3.981v1.847c0 .552-.448 1-1 1h-1.5c-.552 0-1-.448-1-1v-1h-13v1c0 .552-.448 1-1 1h-1.5c-.552 0-1-.448-1-1v-1.847c-.608-1.448-1.005-2.611-1.005-3.981 0-1.414.307-2.48.946-3.666.829-1.537 1.851-3.453 2.93-5.252.828-1.382 1.262-1.707 2.278-1.889 1.532-.275 2.918-.365 4.851-.365s3.319.09 4.851.365c1.016.182 1.45.507 2.278 1.889 1.079 1.799 2.101 3.715 2.93 5.252zm-16.059 2.994c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5zm10 1c0-.276-.224-.5-.5-.5h-7c-.276 0-.5.224-.5.5s.224.5.5.5h7c.276 0 .5-.224.5-.5zm2.941-5.527s-.74-1.826-1.631-3.142c-.202-.298-.515-.502-.869-.566-1.511-.272-2.835-.359-4.441-.359s-2.93.087-4.441.359c-.354.063-.667.267-.869.566-.891 1.315-1.631 3.142-1.631 3.142 1.64.313 4.309.497 6.941.497s5.301-.184 6.941-.497zm2.059 4.527c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5zm-18.298-6.5h-2.202c-.276 0-.5.224-.5.5v.511c0 .793.926.989 1.616.989l1.086-2z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -1,5 +1,21 @@
|
||||
<?xml version="1.0" ?><svg style="enable-background:new 0 0 128 128;" version="1.1" viewBox="0 0 128 128" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css">
|
||||
<?xml version="1.0" ?>
|
||||
<svg style="enable-background:new 0 0 128 128;" version="1.1" viewBox="0 0 128 128" xml:space="preserve"
|
||||
xmlns="http://www.w3.org/2000/svg"><style type="text/css">
|
||||
.st0{fill:none;stroke:#000000;stroke-width:8;stroke-miterlimit:10;}
|
||||
.st1{display:none;}
|
||||
.st2{display:inline;opacity:0.25;fill:#F45EFD;}
|
||||
</style><g id="_x31_2_3D_Printing"/><g id="_x31_1_VR_Gear"/><g id="_x31_0_Virtual_reality"/><g id="_x39__Augmented_reality"/><g id="_x38__Teleport"/><g id="_x37__Glassess"/><g id="_x36__Folding_phone"/><g id="_x35__Drone"/><g id="_x34__Retina_scan"/><g id="_x33__Smartwatch"/><g id="_x32__Bionic_Arm"/><g id="_x31__Chip"><g><path d="M108,40c-5.2,0-9.6,3.3-11.3,8H84V32h-8V20h-8v12h-8V20h-8v12h-8v16H24v-8.7c4.7-1.7,8-6.1,8-11.3c0-6.6-5.4-12-12-12 S8,21.4,8,28c0,5.2,3.3,9.6,8,11.3V56h28v8H16v16.7c-4.7,1.7-8,6.1-8,11.3c0,6.6,5.4,12,12,12s12-5.4,12-12c0-5.2-3.3-9.6-8-11.3 V72h20v16h8v12h8V88h8v12h8V88h8V72h8v16.7c-4.7,1.7-8,6.1-8,11.3c0,6.6,5.4,12,12,12s12-5.4,12-12c0-5.2-3.3-9.6-8-11.3V64H84v-8 h12.7c1.7,4.7,6.1,8,11.3,8c6.6,0,12-5.4,12-12S114.6,40,108,40z M20,32c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S22.2,32,20,32z M20,96c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S22.2,96,20,96z M76,80H52V40h24V80z M96,96c2.2,0,4,1.8,4,4s-1.8,4-4,4s-4-1.8-4-4 S93.8,96,96,96z M108,56c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S110.2,56,108,56z"/><rect height="8" width="8" x="56" y="64"/></g></g><g class="st1" id="Guide"><path class="st2" d="M120,8v112H8V8H120 M128,0H0v128h128V0L128,0z"/></g></svg>
|
||||
</style>
|
||||
<g id="_x31_2_3D_Printing"/>
|
||||
<g id="_x31_1_VR_Gear"/>
|
||||
<g id="_x31_0_Virtual_reality"/>
|
||||
<g id="_x39__Augmented_reality"/>
|
||||
<g id="_x38__Teleport"/>
|
||||
<g id="_x37__Glassess"/>
|
||||
<g id="_x36__Folding_phone"/>
|
||||
<g id="_x35__Drone"/>
|
||||
<g id="_x34__Retina_scan"/>
|
||||
<g id="_x33__Smartwatch"/>
|
||||
<g id="_x32__Bionic_Arm"/>
|
||||
<g id="_x31__Chip"><g><path d="M108,40c-5.2,0-9.6,3.3-11.3,8H84V32h-8V20h-8v12h-8V20h-8v12h-8v16H24v-8.7c4.7-1.7,8-6.1,8-11.3c0-6.6-5.4-12-12-12 S8,21.4,8,28c0,5.2,3.3,9.6,8,11.3V56h28v8H16v16.7c-4.7,1.7-8,6.1-8,11.3c0,6.6,5.4,12,12,12s12-5.4,12-12c0-5.2-3.3-9.6-8-11.3 V72h20v16h8v12h8V88h8v12h8V88h8V72h8v16.7c-4.7,1.7-8,6.1-8,11.3c0,6.6,5.4,12,12,12s12-5.4,12-12c0-5.2-3.3-9.6-8-11.3V64H84v-8 h12.7c1.7,4.7,6.1,8,11.3,8c6.6,0,12-5.4,12-12S114.6,40,108,40z M20,32c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S22.2,32,20,32z M20,96c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S22.2,96,20,96z M76,80H52V40h24V80z M96,96c2.2,0,4,1.8,4,4s-1.8,4-4,4s-4-1.8-4-4 S93.8,96,96,96z M108,56c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S110.2,56,108,56z"/><rect
|
||||
height="8" width="8" x="56" y="64"/></g></g>
|
||||
<g class="st1" id="Guide"><path class="st2" d="M120,8v112H8V8H120 M128,0H0v128h128V0L128,0z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 30 KiB |
@@ -1,144 +1,216 @@
|
||||
<svg id="svg166" version="1.1" viewBox="0 0 1668 1160" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="g158" transform="translate(254 -254)">
|
||||
<g id="g34" transform="translate(-13.78 3.524)" stroke="#000">
|
||||
<path id="path10" d="m494.57 1006.9c41.429-15.714 140-11.427 191.43-12.857 51.429-1.429 160.48 10.23 201.43 27.143 40.995 16.93 134.78 67.656 151.43 72.857 22.857 7.143 41.429 7.143 80 20 38.572 12.857 25.714 32.857 25.714 32.857l-30-4.286-5.756 52.92s37.185 1.366 41.47 15.652c4.286 14.286 5.715 31.428-2.856 41.428-8.572 10-14.286-1.428-18.572 12.858-4.286 14.285-2.857 28.571-27.143 27.142-24.285-1.428-98.571 0-98.571 0s-15.714-108.57-98.573-105.71c-82.857 2.857-95.714 105.71-95.714 105.71h-500s-5.714-104.28-97.143-105.71c-91.428-1.428-98.571 105.71-98.571 105.71h-65.713l-18.572-38.571c-0.515 0-26.243 0-21.428-17.143 4.651-16.561-4.286-41.428 17.142-41.428 21.429 0 47.143 1.428 47.143 1.428l15.715-44.286-41.429-2.857s34.286-24.285 118.57-32.857c84.286-8.571 157.14-8.571 192.86-31.428 35.714-22.858 137.14-78.572 137.14-78.572z" fill="none" stroke-width="5"/>
|
||||
<path id="path12" d="m28.857 1254h92.857m180 0h517.14m172.86 0h151.43" fill="none" stroke-width="2"/>
|
||||
<path id="path14" d="m364.57 1101.1c15.715-18.572 123.37-81.525 151.43-88.572 29.502-7.41 103-7.142 103-7.142l-7.143 95.714z" fill="#f0ffeb" stroke-width="5"/>
|
||||
<path id="path16" d="m404.57 1071.1v28.571" fill="none" stroke-width="2"/>
|
||||
<path id="path18" d="m644.7 1006.8-4.285 94.328h207.16c-11.307-20.753-46.612-74.906-72.857-88.572-14.285-10-82.878-4.327-130.02-5.756zm167.02 7.164s80 84.286 85.715 87.143c5.714 2.857 115.71 1.428 115.71 1.428s-77.143-47.141-102.86-58.571c-25.715-11.429-90-31.429-98.572-30z" fill="#f0ffeb" stroke-width="5"/>
|
||||
<g fill="none">
|
||||
<path id="path20" d="m345.64 1091.7c-14.075 30.968-18.298 71.788-18.298 94.31 0 22.521 4.223 91.493 22.521 105.57m282.93-298.41c-1.408 5.63-4.047 81.903-6.51 106.93-3.67 18.715-4.989 51.219-6.159 87.315 0 22.522 7.038 80.233 12.669 105.57" stroke-width="5"/>
|
||||
<path id="path22" d="m103.53 1252.1s15.483-85.864 106.98-85.864c91.494 0 109.79 87.271 109.79 87.271m479.99 0s15.483-85.863 106.98-85.863c91.493 0 109.79 87.27 109.79 87.27m-947.31-57.711h63.342" stroke-width="2"/>
|
||||
<path id="path24" d="m779.18 1000.2c18.299 12.668 56.304 50.673 92.9 104.16 36.598 53.489 8.447 59.12-18.298 74.603-26.744 15.483-49.266 42.227-67.564 112.61" stroke-width="5"/>
|
||||
<path id="path26" d="m1112.8 1196h-129.5m-696.76-0.222h544.74m-22.522-150.61v54.896" stroke-width="2"/>
|
||||
</g>
|
||||
<g stroke-width="2">
|
||||
<rect id="rect28" x="558.65" y="1144.9" width="41.286" height="14.541" rx="2.933" ry="7.379" fill="#e6e6e6"/>
|
||||
<rect id="rect30" x="816.24" y="1144.9" width="41.286" height="14.541" rx="2.933" ry="7.379" fill="#e6e6e6"/>
|
||||
<rect id="rect32" x="259.53" y="1146.3" width="18.776" height="11.738" rx="1.63" ry="7.692" fill="#ffcb00"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g54" transform="translate(-13.78 15.524)" stroke="#000">
|
||||
<path id="path36" d="m62.767 812.59-11.712 16.12-18.95-6.157v-19.925l18.95-6.158z" fill="none" stroke-width="5"/>
|
||||
<path id="path38" d="m31.742 745.02 315.3-111.2m-316.71 254.77 315.3 115.42" fill="none" stroke-width="2"/>
|
||||
<path id="path40" d="m341.41 632.78 140.76 38.005s-8.446 49.222-8.446 71.963v147.62c0 30.967 8.445 78.825 8.445 78.825l-140.76 33.782s-17.242-61.902-17.242-92.901l2.111-185.8c-1.408-30.967 15.132-91.493 15.132-91.493z" fill="#f0ffeb" stroke-width="5"/>
|
||||
<g fill="none">
|
||||
<path id="path42" d="m482.17 670.79s94.309 5.63 152.02 5.63c106.98 0 201.29-5.63 201.29-5.63m-1.408 297s-77.418-5.63-199.88-5.63c-68.972 0-152.02 7.038-152.02 7.038" stroke-width="5"/>
|
||||
<rect id="rect44" x="528.62" y="729.2" width="106.98" height="181.58" rx="31.19" ry="34.436" stroke-width="2"/>
|
||||
<path id="path46" d="m345.78 632.78h-294.19l-14.076 102.75-7.038 11.26v142.17l7.038 14.076 15.483 101.35h288.56m491.11-333.6s-12.668 47.858-12.668 73.195v146.39c0 25.336 12.668 77.417 12.668 77.417l205.51 38.005h108.38s14.076-81.64 14.076-115.42v-147.8c0-38.005-14.076-109.79-14.076-109.79h-108.38z" stroke-width="5"/>
|
||||
</g>
|
||||
<path id="path48" d="m843.92 689.09s-8.445 40.82-8.445 56.303v144.98c0 19.706 7.038 57.711 7.038 57.711s94.308 26.744 123.87 26.744h42.228v-312.49h-47.859c-25.336 0-116.83 26.745-116.83 26.745z" fill="#f0ffeb" stroke-width="5"/>
|
||||
<path id="path50" d="m1038.2 632.78s30.967 40.82 30.967 111.2v146.39c0 64.749-30.967 116.83-30.967 116.83m-713.65-263.22 32.374-32.375v-40.82 112.61m-33.078 81.641 32.374-32.375v-40.82 112.61m648.9-116.83-32.375-32.374v-40.82 112.61" fill="none" stroke-width="2"/>
|
||||
<path id="path52" d="m341.41 632.78s-42.228 78.825-42.228 111.2v146.39c0 40.82 42.228 114.02 42.228 114.02" fill="none" stroke-width="2"/>
|
||||
</g>
|
||||
<g fill="none" stroke="#000">
|
||||
<path id="path56" d="m-106.79 740.92 1.407-91.493s5.63-23.93-25.337-25.337c-30.967-1.408-26.744 2.815-26.744 2.815l1.408 415.24h28.152c28.152 0 22.521-22.52 22.521-22.52v-95.717c-12.677 0-11.26-9.614-11.26-16.891v-149.2c0.45-18.89 9.853-16.892 9.853-16.892z" stroke-width="5"/>
|
||||
<path id="path58" d="m-155.99 646.16h49.265m-48.415 374.27h49.266m-50.82-315.37h49.266m-46.451 259.81h49.266" stroke-width="2.2"/>
|
||||
<path id="path60" d="m-147.1 703.82v260.4m9.853-258.84v260.4" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="g88" transform="translate(-13.78 15.524)" stroke="#000">
|
||||
<path id="path62" d="m494.57 641.61c41.429 15.714 140 11.428 191.43 12.856s160.48-10.23 201.43-27.143c40.995-16.93 134.78-67.656 151.43-72.857 22.857-7.143 41.429-7.143 80-20 38.572-12.857 25.714-32.857 25.714-32.857l-30 4.285-5.756-52.92s37.185-1.365 41.47-15.651c4.286-14.286 5.715-31.429-2.856-41.429-8.572-10-14.286 1.429-18.572-12.857-4.286-14.285-2.857-28.571-27.143-27.143-24.285 1.429-98.571 0-98.571 0s-15.714 108.57-98.572 105.72c-82.857-2.857-95.714-105.72-95.714-105.72h-500s-5.714 104.29-97.143 105.72c-91.428 1.428-98.571-105.72-98.571-105.72h-65.714l-18.572 38.572c-0.515 0-26.243 0-21.428 17.143 4.651 16.561-4.286 41.428 17.142 41.428 21.429 0 47.143-1.428 47.143-1.428l15.715 44.285-41.429 2.859s34.286 24.285 118.57 32.857c84.286 8.571 157.14 8.571 192.86 31.428 35.714 22.857 137.14 78.572 137.14 78.572z" fill="none" stroke-width="5"/>
|
||||
<path id="path64" d="m28.857 394.47h92.857m180 0h517.14m172.86 0h151.43" fill="none" stroke-width="2"/>
|
||||
<path id="path66" d="m364.57 547.33c15.715 18.571 123.37 81.524 151.43 88.571 29.502 7.41 103 7.143 103 7.143l-7.143-95.714z" fill="#f0ffeb" stroke-width="5"/>
|
||||
<path id="path68" d="m404.57 577.33v-28.571" fill="none" stroke-width="2"/>
|
||||
<path id="path70" d="m644.7 641.64-4.285-94.328h207.16c-11.307 20.753-46.612 74.906-72.857 88.571-14.285 10-82.878 4.328-130.02 5.757zm167.02-7.165s80-84.285 85.715-87.142c5.714-2.857 115.71-1.429 115.71-1.429s-77.143 47.143-102.86 58.572c-25.715 11.428-90 31.428-98.572 30z" fill="#f0ffeb" stroke-width="5"/>
|
||||
<g fill="none">
|
||||
<path id="path72" d="m345.64 556.81c-14.075-30.967-18.298-71.787-18.298-94.309 0-22.521 4.223-91.493 22.521-105.57m282.93 298.41c-1.408-5.63-4.047-81.905-6.51-106.93-3.67-18.714-4.989-51.218-6.159-87.314 0-22.522 7.038-80.233 12.669-105.57" stroke-width="5"/>
|
||||
<path id="path74" d="m103.53 396.34s15.483 85.864 106.98 85.864c91.494 0 109.79-87.271 109.79-87.271m479.99 0s15.483 85.863 106.98 85.863c91.493 0 109.79-87.27 109.79-87.27m-947.31 57.71h63.342" stroke-width="2"/>
|
||||
<path id="path76" d="m779.18 648.3c18.299-12.669 56.304-50.674 92.9-104.16 36.598-53.489 8.447-59.12-18.298-74.603-26.744-15.483-49.266-42.228-67.564-112.61" stroke-width="5"/>
|
||||
<path id="path78" d="m1112.8 452.42h-129.5m-696.76 0.223h544.74m-22.522 150.61v-54.895" stroke-width="2"/>
|
||||
</g>
|
||||
<g stroke-width="2">
|
||||
<rect id="rect80" transform="scale(1 -1)" x="558.65" y="-503.55" width="41.286" height="14.541" rx="2.933" ry="7.379" fill="#e6e6e6"/>
|
||||
<rect id="rect82" transform="scale(1 -1)" x="816.24" y="-503.55" width="41.286" height="14.541" rx="2.933" ry="7.379" fill="#e6e6e6"/>
|
||||
<rect id="rect84" transform="scale(1 -1)" x="259.53" y="-502.15" width="18.776" height="11.738" rx="1.63" ry="7.692" fill="#ffcb00"/>
|
||||
<circle id="circle86" transform="translate(941.34 284)" cx="59.119" cy="211.28" r="16.891" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<path id="path90" d="m-126.58 704.93v260.4" fill="none" stroke="#000" stroke-width="2"/>
|
||||
<path id="path92" d="m-153.88 992.49v-26.041h45.043v52.08h-45.043zm0-316.71v-27.448h45.043v54.898h-45.043z" fill="#ffffc0"/>
|
||||
<g fill="none" stroke="#000">
|
||||
<path id="path94" d="m-157.4 624.38s-4.223-12.669-18.299-12.669-14.076 8.446-14.076 8.446v423.69s1.408 9.853 14.076 9.853c12.669 0 18.3-9.853 18.3-9.853" stroke-width="5"/>
|
||||
<path id="path96" d="m-191.18 624.38s-35.19-1.408-35.19 21.114v371.6c0 22.521 36.597 25.336 36.597 25.336" stroke-width="5"/>
|
||||
<g stroke-width="2">
|
||||
<rect id="rect98" x="-216.51" y="648.31" width="16.891" height="35.19" rx="7.742" ry="6.284"/>
|
||||
<rect id="rect100" x="-216.51" y="985.58" width="16.891" height="35.19" rx="7.742" ry="6.284"/>
|
||||
<path id="path102" d="m-62.939 645.49h30.967v377.24h-30.967z"/>
|
||||
</g>
|
||||
<path id="path104" d="m1200.9 633.86v73.195h67.565v-83.048l-25.337-14.076zm0 329.38h67.565v78.826l-23.93 14.076-43.635-18.3zm0-270.26v284.33m67.565-283.74v284.33" stroke-width="5"/>
|
||||
<path id="path106" d="m1216.6 759.51h14.076v147.8h-14.076zm7.631-1.408v-53.488m0 257.37v-53.49m30.375-201.06v256.18" stroke-width="2"/>
|
||||
<path id="path108" d="m1268.8 624.97s4.223-12.668 18.299-12.668 14.076 8.445 14.076 8.445v423.69s-1.408 9.853-14.076 9.853c-12.669 0-18.299-9.853-18.299-9.853m33.783-419.46s35.19-1.408 35.19 21.114v371.6c0 22.521-36.598 25.337-36.598 25.337" stroke-width="5"/>
|
||||
<g stroke-width="2">
|
||||
<rect id="rect110" transform="scale(-1 1)" x="-1329.9" y="648.9" width="16.891" height="35.19" rx="7.742" ry="6.284"/>
|
||||
<rect id="rect112" transform="scale(-1 1)" x="-1329.9" y="986.17" width="16.891" height="35.19" rx="7.742" ry="6.284"/>
|
||||
<path id="path114" d="m1199.7 632.82 67.565 74.603m-67.565 0.592 67.565-73.195m-67.342 328.16 67.565 74.602m-67.565 0.593 67.565-73.195"/>
|
||||
</g>
|
||||
</g>
|
||||
<g stroke="#000">
|
||||
<g stroke-width="2">
|
||||
<circle id="circle116" transform="translate(78.489 1074.7)" cx="119.65" cy="202.84" r="76.01" fill="#c8c8c8"/>
|
||||
<circle id="circle118" transform="translate(94.676 1204.9)" cx="103.46" cy="72.633" r="44.339" fill="#fff"/>
|
||||
<circle id="circle120" transform="translate(78.489 187.66)" cx="119.65" cy="202.84" r="76.01" fill="#c8c8c8"/>
|
||||
<circle id="circle122" transform="translate(94.676 317.86)" cx="103.46" cy="72.633" r="44.339" fill="#fff"/>
|
||||
<circle id="circle124" transform="translate(773.02 187.66)" cx="119.65" cy="202.84" r="76.01" fill="#c8c8c8"/>
|
||||
<circle id="circle126" transform="translate(789.21 317.86)" cx="103.46" cy="72.633" r="44.339" fill="#fff"/>
|
||||
<circle id="circle128" transform="translate(773.02 1074.7)" cx="119.65" cy="202.84" r="76.01" fill="#c8c8c8"/>
|
||||
<circle id="circle130" transform="translate(789.21 1204.9)" cx="103.46" cy="72.633" r="44.339" fill="#fff"/>
|
||||
</g>
|
||||
<path id="path132" d="m1338.5 829.07h40.82" fill="none" stroke-width="5"/>
|
||||
<circle id="circle134" transform="translate(1441.3 600.31)" cx="-59.119" cy="229.58" r="4.223" fill="#3c3c3c" stroke-width="5"/>
|
||||
<g stroke-width="2">
|
||||
<path id="path136" d="m778.06 845.37-38.709-38.709" fill="none"/>
|
||||
<g id="g146" transform="translate(-13.78 15.524)" fill="#3c3c3c">
|
||||
<circle id="circle138" transform="translate(-79.458 449.8)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<circle id="circle140" transform="translate(-79.458 569.92)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<circle id="circle142" transform="translate(-79.458 690.03)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<circle id="circle144" transform="translate(-79.458 810.15)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<g id="g158" transform="translate(254 -254)">
|
||||
<g id="g34" transform="translate(-13.78 3.524)" stroke="#000">
|
||||
<path id="path10"
|
||||
d="m494.57 1006.9c41.429-15.714 140-11.427 191.43-12.857 51.429-1.429 160.48 10.23 201.43 27.143 40.995 16.93 134.78 67.656 151.43 72.857 22.857 7.143 41.429 7.143 80 20 38.572 12.857 25.714 32.857 25.714 32.857l-30-4.286-5.756 52.92s37.185 1.366 41.47 15.652c4.286 14.286 5.715 31.428-2.856 41.428-8.572 10-14.286-1.428-18.572 12.858-4.286 14.285-2.857 28.571-27.143 27.142-24.285-1.428-98.571 0-98.571 0s-15.714-108.57-98.573-105.71c-82.857 2.857-95.714 105.71-95.714 105.71h-500s-5.714-104.28-97.143-105.71c-91.428-1.428-98.571 105.71-98.571 105.71h-65.713l-18.572-38.571c-0.515 0-26.243 0-21.428-17.143 4.651-16.561-4.286-41.428 17.142-41.428 21.429 0 47.143 1.428 47.143 1.428l15.715-44.286-41.429-2.857s34.286-24.285 118.57-32.857c84.286-8.571 157.14-8.571 192.86-31.428 35.714-22.858 137.14-78.572 137.14-78.572z"
|
||||
fill="none" stroke-width="5"/>
|
||||
<path id="path12" d="m28.857 1254h92.857m180 0h517.14m172.86 0h151.43" fill="none" stroke-width="2"/>
|
||||
<path id="path14"
|
||||
d="m364.57 1101.1c15.715-18.572 123.37-81.525 151.43-88.572 29.502-7.41 103-7.142 103-7.142l-7.143 95.714z"
|
||||
fill="#f0ffeb" stroke-width="5"/>
|
||||
<path id="path16" d="m404.57 1071.1v28.571" fill="none" stroke-width="2"/>
|
||||
<path id="path18"
|
||||
d="m644.7 1006.8-4.285 94.328h207.16c-11.307-20.753-46.612-74.906-72.857-88.572-14.285-10-82.878-4.327-130.02-5.756zm167.02 7.164s80 84.286 85.715 87.143c5.714 2.857 115.71 1.428 115.71 1.428s-77.143-47.141-102.86-58.571c-25.715-11.429-90-31.429-98.572-30z"
|
||||
fill="#f0ffeb" stroke-width="5"/>
|
||||
<g fill="none">
|
||||
<path id="path20"
|
||||
d="m345.64 1091.7c-14.075 30.968-18.298 71.788-18.298 94.31 0 22.521 4.223 91.493 22.521 105.57m282.93-298.41c-1.408 5.63-4.047 81.903-6.51 106.93-3.67 18.715-4.989 51.219-6.159 87.315 0 22.522 7.038 80.233 12.669 105.57"
|
||||
stroke-width="5"/>
|
||||
<path id="path22"
|
||||
d="m103.53 1252.1s15.483-85.864 106.98-85.864c91.494 0 109.79 87.271 109.79 87.271m479.99 0s15.483-85.863 106.98-85.863c91.493 0 109.79 87.27 109.79 87.27m-947.31-57.711h63.342"
|
||||
stroke-width="2"/>
|
||||
<path id="path24"
|
||||
d="m779.18 1000.2c18.299 12.668 56.304 50.673 92.9 104.16 36.598 53.489 8.447 59.12-18.298 74.603-26.744 15.483-49.266 42.227-67.564 112.61"
|
||||
stroke-width="5"/>
|
||||
<path id="path26" d="m1112.8 1196h-129.5m-696.76-0.222h544.74m-22.522-150.61v54.896" stroke-width="2"/>
|
||||
</g>
|
||||
<g stroke-width="2">
|
||||
<rect id="rect28" x="558.65" y="1144.9" width="41.286" height="14.541" rx="2.933" ry="7.379"
|
||||
fill="#e6e6e6"/>
|
||||
<rect id="rect30" x="816.24" y="1144.9" width="41.286" height="14.541" rx="2.933" ry="7.379"
|
||||
fill="#e6e6e6"/>
|
||||
<rect id="rect32" x="259.53" y="1146.3" width="18.776" height="11.738" rx="1.63" ry="7.692"
|
||||
fill="#ffcb00"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g54" transform="translate(-13.78 15.524)" stroke="#000">
|
||||
<path id="path36" d="m62.767 812.59-11.712 16.12-18.95-6.157v-19.925l18.95-6.158z" fill="none"
|
||||
stroke-width="5"/>
|
||||
<path id="path38" d="m31.742 745.02 315.3-111.2m-316.71 254.77 315.3 115.42" fill="none" stroke-width="2"/>
|
||||
<path id="path40"
|
||||
d="m341.41 632.78 140.76 38.005s-8.446 49.222-8.446 71.963v147.62c0 30.967 8.445 78.825 8.445 78.825l-140.76 33.782s-17.242-61.902-17.242-92.901l2.111-185.8c-1.408-30.967 15.132-91.493 15.132-91.493z"
|
||||
fill="#f0ffeb" stroke-width="5"/>
|
||||
<g fill="none">
|
||||
<path id="path42"
|
||||
d="m482.17 670.79s94.309 5.63 152.02 5.63c106.98 0 201.29-5.63 201.29-5.63m-1.408 297s-77.418-5.63-199.88-5.63c-68.972 0-152.02 7.038-152.02 7.038"
|
||||
stroke-width="5"/>
|
||||
<rect id="rect44" x="528.62" y="729.2" width="106.98" height="181.58" rx="31.19" ry="34.436"
|
||||
stroke-width="2"/>
|
||||
<path id="path46"
|
||||
d="m345.78 632.78h-294.19l-14.076 102.75-7.038 11.26v142.17l7.038 14.076 15.483 101.35h288.56m491.11-333.6s-12.668 47.858-12.668 73.195v146.39c0 25.336 12.668 77.417 12.668 77.417l205.51 38.005h108.38s14.076-81.64 14.076-115.42v-147.8c0-38.005-14.076-109.79-14.076-109.79h-108.38z"
|
||||
stroke-width="5"/>
|
||||
</g>
|
||||
<path id="path48"
|
||||
d="m843.92 689.09s-8.445 40.82-8.445 56.303v144.98c0 19.706 7.038 57.711 7.038 57.711s94.308 26.744 123.87 26.744h42.228v-312.49h-47.859c-25.336 0-116.83 26.745-116.83 26.745z"
|
||||
fill="#f0ffeb" stroke-width="5"/>
|
||||
<path id="path50"
|
||||
d="m1038.2 632.78s30.967 40.82 30.967 111.2v146.39c0 64.749-30.967 116.83-30.967 116.83m-713.65-263.22 32.374-32.375v-40.82 112.61m-33.078 81.641 32.374-32.375v-40.82 112.61m648.9-116.83-32.375-32.374v-40.82 112.61"
|
||||
fill="none" stroke-width="2"/>
|
||||
<path id="path52" d="m341.41 632.78s-42.228 78.825-42.228 111.2v146.39c0 40.82 42.228 114.02 42.228 114.02"
|
||||
fill="none" stroke-width="2"/>
|
||||
</g>
|
||||
<g fill="none" stroke="#000">
|
||||
<path id="path56"
|
||||
d="m-106.79 740.92 1.407-91.493s5.63-23.93-25.337-25.337c-30.967-1.408-26.744 2.815-26.744 2.815l1.408 415.24h28.152c28.152 0 22.521-22.52 22.521-22.52v-95.717c-12.677 0-11.26-9.614-11.26-16.891v-149.2c0.45-18.89 9.853-16.892 9.853-16.892z"
|
||||
stroke-width="5"/>
|
||||
<path id="path58"
|
||||
d="m-155.99 646.16h49.265m-48.415 374.27h49.266m-50.82-315.37h49.266m-46.451 259.81h49.266"
|
||||
stroke-width="2.2"/>
|
||||
<path id="path60" d="m-147.1 703.82v260.4m9.853-258.84v260.4" stroke-width="2"/>
|
||||
</g>
|
||||
<g id="g88" transform="translate(-13.78 15.524)" stroke="#000">
|
||||
<path id="path62"
|
||||
d="m494.57 641.61c41.429 15.714 140 11.428 191.43 12.856s160.48-10.23 201.43-27.143c40.995-16.93 134.78-67.656 151.43-72.857 22.857-7.143 41.429-7.143 80-20 38.572-12.857 25.714-32.857 25.714-32.857l-30 4.285-5.756-52.92s37.185-1.365 41.47-15.651c4.286-14.286 5.715-31.429-2.856-41.429-8.572-10-14.286 1.429-18.572-12.857-4.286-14.285-2.857-28.571-27.143-27.143-24.285 1.429-98.571 0-98.571 0s-15.714 108.57-98.572 105.72c-82.857-2.857-95.714-105.72-95.714-105.72h-500s-5.714 104.29-97.143 105.72c-91.428 1.428-98.571-105.72-98.571-105.72h-65.714l-18.572 38.572c-0.515 0-26.243 0-21.428 17.143 4.651 16.561-4.286 41.428 17.142 41.428 21.429 0 47.143-1.428 47.143-1.428l15.715 44.285-41.429 2.859s34.286 24.285 118.57 32.857c84.286 8.571 157.14 8.571 192.86 31.428 35.714 22.857 137.14 78.572 137.14 78.572z"
|
||||
fill="none" stroke-width="5"/>
|
||||
<path id="path64" d="m28.857 394.47h92.857m180 0h517.14m172.86 0h151.43" fill="none" stroke-width="2"/>
|
||||
<path id="path66"
|
||||
d="m364.57 547.33c15.715 18.571 123.37 81.524 151.43 88.571 29.502 7.41 103 7.143 103 7.143l-7.143-95.714z"
|
||||
fill="#f0ffeb" stroke-width="5"/>
|
||||
<path id="path68" d="m404.57 577.33v-28.571" fill="none" stroke-width="2"/>
|
||||
<path id="path70"
|
||||
d="m644.7 641.64-4.285-94.328h207.16c-11.307 20.753-46.612 74.906-72.857 88.571-14.285 10-82.878 4.328-130.02 5.757zm167.02-7.165s80-84.285 85.715-87.142c5.714-2.857 115.71-1.429 115.71-1.429s-77.143 47.143-102.86 58.572c-25.715 11.428-90 31.428-98.572 30z"
|
||||
fill="#f0ffeb" stroke-width="5"/>
|
||||
<g fill="none">
|
||||
<path id="path72"
|
||||
d="m345.64 556.81c-14.075-30.967-18.298-71.787-18.298-94.309 0-22.521 4.223-91.493 22.521-105.57m282.93 298.41c-1.408-5.63-4.047-81.905-6.51-106.93-3.67-18.714-4.989-51.218-6.159-87.314 0-22.522 7.038-80.233 12.669-105.57"
|
||||
stroke-width="5"/>
|
||||
<path id="path74"
|
||||
d="m103.53 396.34s15.483 85.864 106.98 85.864c91.494 0 109.79-87.271 109.79-87.271m479.99 0s15.483 85.863 106.98 85.863c91.493 0 109.79-87.27 109.79-87.27m-947.31 57.71h63.342"
|
||||
stroke-width="2"/>
|
||||
<path id="path76"
|
||||
d="m779.18 648.3c18.299-12.669 56.304-50.674 92.9-104.16 36.598-53.489 8.447-59.12-18.298-74.603-26.744-15.483-49.266-42.228-67.564-112.61"
|
||||
stroke-width="5"/>
|
||||
<path id="path78" d="m1112.8 452.42h-129.5m-696.76 0.223h544.74m-22.522 150.61v-54.895"
|
||||
stroke-width="2"/>
|
||||
</g>
|
||||
<g stroke-width="2">
|
||||
<rect id="rect80" transform="scale(1 -1)" x="558.65" y="-503.55" width="41.286" height="14.541"
|
||||
rx="2.933" ry="7.379" fill="#e6e6e6"/>
|
||||
<rect id="rect82" transform="scale(1 -1)" x="816.24" y="-503.55" width="41.286" height="14.541"
|
||||
rx="2.933" ry="7.379" fill="#e6e6e6"/>
|
||||
<rect id="rect84" transform="scale(1 -1)" x="259.53" y="-502.15" width="18.776" height="11.738"
|
||||
rx="1.63" ry="7.692" fill="#ffcb00"/>
|
||||
<circle id="circle86" transform="translate(941.34 284)" cx="59.119" cy="211.28" r="16.891" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
<path id="path90" d="m-126.58 704.93v260.4" fill="none" stroke="#000" stroke-width="2"/>
|
||||
<path id="path92" d="m-153.88 992.49v-26.041h45.043v52.08h-45.043zm0-316.71v-27.448h45.043v54.898h-45.043z"
|
||||
fill="#ffffc0"/>
|
||||
<g fill="none" stroke="#000">
|
||||
<path id="path94"
|
||||
d="m-157.4 624.38s-4.223-12.669-18.299-12.669-14.076 8.446-14.076 8.446v423.69s1.408 9.853 14.076 9.853c12.669 0 18.3-9.853 18.3-9.853"
|
||||
stroke-width="5"/>
|
||||
<path id="path96" d="m-191.18 624.38s-35.19-1.408-35.19 21.114v371.6c0 22.521 36.597 25.336 36.597 25.336"
|
||||
stroke-width="5"/>
|
||||
<g stroke-width="2">
|
||||
<rect id="rect98" x="-216.51" y="648.31" width="16.891" height="35.19" rx="7.742" ry="6.284"/>
|
||||
<rect id="rect100" x="-216.51" y="985.58" width="16.891" height="35.19" rx="7.742" ry="6.284"/>
|
||||
<path id="path102" d="m-62.939 645.49h30.967v377.24h-30.967z"/>
|
||||
</g>
|
||||
<path id="path104"
|
||||
d="m1200.9 633.86v73.195h67.565v-83.048l-25.337-14.076zm0 329.38h67.565v78.826l-23.93 14.076-43.635-18.3zm0-270.26v284.33m67.565-283.74v284.33"
|
||||
stroke-width="5"/>
|
||||
<path id="path106"
|
||||
d="m1216.6 759.51h14.076v147.8h-14.076zm7.631-1.408v-53.488m0 257.37v-53.49m30.375-201.06v256.18"
|
||||
stroke-width="2"/>
|
||||
<path id="path108"
|
||||
d="m1268.8 624.97s4.223-12.668 18.299-12.668 14.076 8.445 14.076 8.445v423.69s-1.408 9.853-14.076 9.853c-12.669 0-18.299-9.853-18.299-9.853m33.783-419.46s35.19-1.408 35.19 21.114v371.6c0 22.521-36.598 25.337-36.598 25.337"
|
||||
stroke-width="5"/>
|
||||
<g stroke-width="2">
|
||||
<rect id="rect110" transform="scale(-1 1)" x="-1329.9" y="648.9" width="16.891" height="35.19"
|
||||
rx="7.742" ry="6.284"/>
|
||||
<rect id="rect112" transform="scale(-1 1)" x="-1329.9" y="986.17" width="16.891" height="35.19"
|
||||
rx="7.742" ry="6.284"/>
|
||||
<path id="path114"
|
||||
d="m1199.7 632.82 67.565 74.603m-67.565 0.592 67.565-73.195m-67.342 328.16 67.565 74.602m-67.565 0.593 67.565-73.195"/>
|
||||
</g>
|
||||
</g>
|
||||
<g stroke="#000">
|
||||
<g stroke-width="2">
|
||||
<circle id="circle116" transform="translate(78.489 1074.7)" cx="119.65" cy="202.84" r="76.01"
|
||||
fill="#c8c8c8"/>
|
||||
<circle id="circle118" transform="translate(94.676 1204.9)" cx="103.46" cy="72.633" r="44.339"
|
||||
fill="#fff"/>
|
||||
<circle id="circle120" transform="translate(78.489 187.66)" cx="119.65" cy="202.84" r="76.01"
|
||||
fill="#c8c8c8"/>
|
||||
<circle id="circle122" transform="translate(94.676 317.86)" cx="103.46" cy="72.633" r="44.339"
|
||||
fill="#fff"/>
|
||||
<circle id="circle124" transform="translate(773.02 187.66)" cx="119.65" cy="202.84" r="76.01"
|
||||
fill="#c8c8c8"/>
|
||||
<circle id="circle126" transform="translate(789.21 317.86)" cx="103.46" cy="72.633" r="44.339"
|
||||
fill="#fff"/>
|
||||
<circle id="circle128" transform="translate(773.02 1074.7)" cx="119.65" cy="202.84" r="76.01"
|
||||
fill="#c8c8c8"/>
|
||||
<circle id="circle130" transform="translate(789.21 1204.9)" cx="103.46" cy="72.633" r="44.339"
|
||||
fill="#fff"/>
|
||||
</g>
|
||||
<path id="path132" d="m1338.5 829.07h40.82" fill="none" stroke-width="5"/>
|
||||
<circle id="circle134" transform="translate(1441.3 600.31)" cx="-59.119" cy="229.58" r="4.223"
|
||||
fill="#3c3c3c" stroke-width="5"/>
|
||||
<g stroke-width="2">
|
||||
<path id="path136" d="m778.06 845.37-38.709-38.709" fill="none"/>
|
||||
<g id="g146" transform="translate(-13.78 15.524)" fill="#3c3c3c">
|
||||
<circle id="circle138" transform="translate(-79.458 449.8)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<circle id="circle140" transform="translate(-79.458 569.92)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<circle id="circle142" transform="translate(-79.458 690.03)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<circle id="circle144" transform="translate(-79.458 810.15)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
</g>
|
||||
<g id="g156" transform="translate(-13.78 17.524)" fill="#3c3c3c">
|
||||
<circle id="circle148" transform="translate(1381.6 448.25)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<circle id="circle150" transform="translate(1381.6 568.36)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<circle id="circle152" transform="translate(1381.6 688.48)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<circle id="circle154" transform="translate(1381.6 808.59)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g156" transform="translate(-13.78 17.524)" fill="#3c3c3c">
|
||||
<circle id="circle148" transform="translate(1381.6 448.25)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<circle id="circle150" transform="translate(1381.6 568.36)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<circle id="circle152" transform="translate(1381.6 688.48)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<circle id="circle154" transform="translate(1381.6 808.59)" cx="-81.641" cy="188.76" r="4.223"/>
|
||||
<g id="layer2" fill="#d00000">
|
||||
<circle id="p02" cx="503.65" cy="248.75" r="61.935"/>
|
||||
<circle id="p03" cx="863.41" cy="248.75" r="61.935"/>
|
||||
<circle id="p04" cx="1181.5" cy="248.75" r="61.935"/>
|
||||
<circle id="p05" cx="1378.4" cy="151.16" r="61.935"/>
|
||||
<circle id="p06" cx="1535.1" cy="581.37" r="61.935"/>
|
||||
<circle id="p07" cx="1378.4" cy="997.9" r="61.935"/>
|
||||
<circle id="p08" cx="1181.5" cy="914.24" r="61.935"/>
|
||||
<circle id="p09" transform="scale(1,-1)" cx="863.41" cy="-914.24" r="61.935"/>
|
||||
<circle id="p10" cx="503.65" cy="914.24" r="61.935"/>
|
||||
<circle id="p11" cx="297.77" cy="997.9" r="61.935"/>
|
||||
<circle id="p12" cx="93.269" cy="581.37" r="61.935"/>
|
||||
<circle id="p25" cx="424.31" cy="581.37" r="61.935"/>
|
||||
<circle id="p27" cx="972.84" cy="581.37" r="61.935"/>
|
||||
<circle id="p01" cx="297.77" cy="151.16" r="61.935"/>
|
||||
<circle id="p26" cx="1339.4" cy="581.37" r="61.935"/>
|
||||
</g>
|
||||
<g id="g4994" fill="#ffef00">
|
||||
<circle id="s02" cx="503.65" cy="248.75" r="61.935"/>
|
||||
<circle id="s03" cx="863.41" cy="248.75" r="61.935"/>
|
||||
<circle id="s04" cx="1181.5" cy="248.75" r="61.935"/>
|
||||
<circle id="s05" cx="1378.4" cy="151.16" r="61.935"/>
|
||||
<circle id="s06" cx="1535.1" cy="581.37" r="61.935"/>
|
||||
<circle id="s07" cx="1378.4" cy="997.9" r="61.935"/>
|
||||
<circle id="s08" cx="1181.5" cy="914.24" r="61.935"/>
|
||||
<circle id="s09" transform="scale(1,-1)" cx="863.41" cy="-914.24" r="61.935"/>
|
||||
<circle id="s10" cx="503.65" cy="914.24" r="61.935"/>
|
||||
<circle id="s11" cx="297.77" cy="997.9" r="61.935"/>
|
||||
<circle id="s12" cx="93.269" cy="581.37" r="61.935"/>
|
||||
<circle id="s25" cx="424.31" cy="581.37" r="61.935"/>
|
||||
<circle id="s27" cx="972.84" cy="581.37" r="61.935"/>
|
||||
<circle id="s01" cx="297.77" cy="151.16" r="61.935"/>
|
||||
<circle id="s26" cx="1339.4" cy="581.37" r="61.935"/>
|
||||
</g>
|
||||
<g id="layer3">
|
||||
<text id="p15" opacity="0" x="382.62802" y="1034.3463" fill="#fd0000" font-family="sans-serif"
|
||||
font-size="1696.9px" letter-spacing="0px" stroke-width="17.676" word-spacing="0px"
|
||||
style="line-height:5.25" xml:space="preserve"><tspan id="tspan4997" x="382.62802" y="1034.3463" fill="#fd0000" stroke-width="17.676">x</tspan></text>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="layer2" fill="#d00000">
|
||||
<circle id="p02" cx="503.65" cy="248.75" r="61.935" />
|
||||
<circle id="p03" cx="863.41" cy="248.75" r="61.935"/>
|
||||
<circle id="p04" cx="1181.5" cy="248.75" r="61.935"/>
|
||||
<circle id="p05" cx="1378.4" cy="151.16" r="61.935"/>
|
||||
<circle id="p06" cx="1535.1" cy="581.37" r="61.935"/>
|
||||
<circle id="p07" cx="1378.4" cy="997.9" r="61.935"/>
|
||||
<circle id="p08" cx="1181.5" cy="914.24" r="61.935"/>
|
||||
<circle id="p09" transform="scale(1,-1)" cx="863.41" cy="-914.24" r="61.935"/>
|
||||
<circle id="p10" cx="503.65" cy="914.24" r="61.935"/>
|
||||
<circle id="p11" cx="297.77" cy="997.9" r="61.935"/>
|
||||
<circle id="p12" cx="93.269" cy="581.37" r="61.935"/>
|
||||
<circle id="p25" cx="424.31" cy="581.37" r="61.935"/>
|
||||
<circle id="p27" cx="972.84" cy="581.37" r="61.935"/>
|
||||
<circle id="p01" cx="297.77" cy="151.16" r="61.935"/>
|
||||
<circle id="p26" cx="1339.4" cy="581.37" r="61.935"/>
|
||||
</g>
|
||||
<g id="g4994" fill="#ffef00">
|
||||
<circle id="s02" cx="503.65" cy="248.75" r="61.935"/>
|
||||
<circle id="s03" cx="863.41" cy="248.75" r="61.935"/>
|
||||
<circle id="s04" cx="1181.5" cy="248.75" r="61.935"/>
|
||||
<circle id="s05" cx="1378.4" cy="151.16" r="61.935"/>
|
||||
<circle id="s06" cx="1535.1" cy="581.37" r="61.935"/>
|
||||
<circle id="s07" cx="1378.4" cy="997.9" r="61.935"/>
|
||||
<circle id="s08" cx="1181.5" cy="914.24" r="61.935"/>
|
||||
<circle id="s09" transform="scale(1,-1)" cx="863.41" cy="-914.24" r="61.935"/>
|
||||
<circle id="s10" cx="503.65" cy="914.24" r="61.935"/>
|
||||
<circle id="s11" cx="297.77" cy="997.9" r="61.935"/>
|
||||
<circle id="s12" cx="93.269" cy="581.37" r="61.935"/>
|
||||
<circle id="s25" cx="424.31" cy="581.37" r="61.935"/>
|
||||
<circle id="s27" cx="972.84" cy="581.37" r="61.935"/>
|
||||
<circle id="s01" cx="297.77" cy="151.16" r="61.935"/>
|
||||
<circle id="s26" cx="1339.4" cy="581.37" r="61.935"/>
|
||||
</g>
|
||||
<g id="layer3">
|
||||
<text id="p15" opacity="0" x="382.62802" y="1034.3463" fill="#fd0000" font-family="sans-serif" font-size="1696.9px" letter-spacing="0px" stroke-width="17.676" word-spacing="0px" style="line-height:5.25" xml:space="preserve"><tspan id="tspan4997" x="382.62802" y="1034.3463" fill="#fd0000" stroke-width="17.676">x</tspan></text>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
@@ -16,31 +16,31 @@ import {UPDATE_DASHBOARD_LAYOUT} from "../../graphql/user.queries";
|
||||
import {selectBodyshop, selectCurrentUser,} from "../../redux/user/user.selectors";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import DashboardMonthlyEmployeeEfficiency, {
|
||||
DashboardMonthlyEmployeeEfficiencyGql,
|
||||
DashboardMonthlyEmployeeEfficiencyGql,
|
||||
} from "../dashboard-components/monthly-employee-efficiency/monthly-employee-efficiency.component";
|
||||
import DashboardMonthlyJobCosting from "../dashboard-components/monthly-job-costing/monthly-job-costing.component";
|
||||
import DashboardMonthlyLaborSales from "../dashboard-components/monthly-labor-sales/monthly-labor-sales.component";
|
||||
import DashboardMonthlyPartsSales from "../dashboard-components/monthly-parts-sales/monthly-parts-sales.component";
|
||||
import DashboardMonthlyRevenueGraph, {
|
||||
DashboardMonthlyRevenueGraphGql,
|
||||
DashboardMonthlyRevenueGraphGql,
|
||||
} from "../dashboard-components/monthly-revenue-graph/monthly-revenue-graph.component";
|
||||
import DashboardProjectedMonthlySales, {
|
||||
DashboardProjectedMonthlySalesGql,
|
||||
DashboardProjectedMonthlySalesGql,
|
||||
} from "../dashboard-components/pojected-monthly-sales/projected-monthly-sales.component";
|
||||
import DashboardTotalProductionDollars
|
||||
from "../dashboard-components/total-production-dollars/total-production-dollars.component";
|
||||
from "../dashboard-components/total-production-dollars/total-production-dollars.component";
|
||||
import DashboardTotalProductionHours, {
|
||||
DashboardTotalProductionHoursGql,
|
||||
DashboardTotalProductionHoursGql,
|
||||
} from "../dashboard-components/total-production-hours/total-production-hours.component";
|
||||
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
||||
//Combination of the following:
|
||||
// /node_modules/react-grid-layout/css/styles.css
|
||||
// /node_modules/react-resizable/css/styles.css
|
||||
import DashboardScheduledInToday, {
|
||||
DashboardScheduledInTodayGql,
|
||||
DashboardScheduledInTodayGql,
|
||||
} from "../dashboard-components/scheduled-in-today/scheduled-in-today.component";
|
||||
import DashboardScheduledOutToday, {
|
||||
DashboardScheduledOutTodayGql,
|
||||
DashboardScheduledOutTodayGql,
|
||||
} from "../dashboard-components/scheduled-out-today/scheduled-out-today.component";
|
||||
import "./dashboard-grid.styles.scss";
|
||||
import {GenerateDashboardData} from "./dashboard-grid.utils";
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
import {Button, Col, Collapse, Result, Row, Space} from "antd";
|
||||
import React from "react";
|
||||
import { withTranslation } from "react-i18next";
|
||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import {withTranslation} from "react-i18next";
|
||||
import {logImEXEvent} from "../../firebase/firebase.utils";
|
||||
import * as Sentry from "@sentry/react";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import {
|
||||
selectBodyshop,
|
||||
selectCurrentUser,
|
||||
} from "../../redux/user/user.selectors";
|
||||
import {connect} from "react-redux";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {selectBodyshop, selectCurrentUser,} from "../../redux/user/user.selectors";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
currentUser: selectCurrentUser,
|
||||
@@ -139,5 +136,5 @@ class ErrorBoundary extends React.Component {
|
||||
}
|
||||
|
||||
export default Sentry.withErrorBoundary(
|
||||
connect(mapStateToProps, mapDispatchToProps)(withTranslation()(ErrorBoundary))
|
||||
connect(mapStateToProps, mapDispatchToProps)(withTranslation()(ErrorBoundary))
|
||||
);
|
||||
|
||||
@@ -169,7 +169,8 @@ const EulaFormComponent = ({form, handleChange, onFinish, t}) => (
|
||||
value.trim() !== '' ? Promise.resolve() : Promise.reject(new Error(t('eula.messages.business_name'))),
|
||||
}]}
|
||||
>
|
||||
<Input placeholder={t('eula.labels.business_name')} aria-label={t('eula.labels.business_name')}/>
|
||||
<Input placeholder={t('eula.labels.business_name')}
|
||||
aria-label={t('eula.labels.business_name')}/>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
@@ -230,7 +231,8 @@ const EulaFormComponent = ({form, handleChange, onFinish, t}) => (
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Checkbox aria-label={t('eula.labels.accepted_terms')}>{t('eula.labels.accepted_terms')}</Checkbox>
|
||||
<Checkbox
|
||||
aria-label={t('eula.labels.accepted_terms')}>{t('eula.labels.accepted_terms')}</Checkbox>
|
||||
</Form.Item>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@@ -39,7 +39,7 @@ export default function JobBillsTotalComponent({
|
||||
);
|
||||
|
||||
if (pol.cm_received === null) {
|
||||
// Skip this calculation for bills posted prior to the CNR change.
|
||||
// Skip this calculation for bills posted prior to the CNR change.
|
||||
} else {
|
||||
if (pol.cm_received === false) {
|
||||
totalReturnsMarkedNotReceived = totalReturnsMarkedNotReceived.add(
|
||||
|
||||
@@ -179,7 +179,8 @@ export function JobLifecycleComponent({job, statuses, ...rest}) {
|
||||
style={{marginTop: '10px'}}>
|
||||
<div>
|
||||
{lifecycleData.durations.summations.map((key) => (
|
||||
<Tag key={key.status} color={key.color} style={{width: '13vh', padding: '4px', margin: '4px'}}>
|
||||
<Tag key={key.status} color={key.color}
|
||||
style={{width: '13vh', padding: '4px', margin: '4px'}}>
|
||||
<div
|
||||
aria-label={`${key.status} | ${key.roundedPercentage} | ${key.humanReadable}`}
|
||||
title={`${key.status} | ${key.roundedPercentage} | ${key.humanReadable}`}
|
||||
|
||||
@@ -1,54 +1,54 @@
|
||||
import { DownCircleFilled } from "@ant-design/icons";
|
||||
import { useMutation } from "@apollo/client";
|
||||
import { Button, Dropdown, notification } from "antd";
|
||||
import {DownCircleFilled} from "@ant-design/icons";
|
||||
import {useMutation} from "@apollo/client";
|
||||
import {Button, Dropdown, notification} from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { UPDATE_JOB_STATUS } from "../../graphql/jobs.queries";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {connect} from "react-redux";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {UPDATE_JOB_STATUS} from "../../graphql/jobs.queries";
|
||||
import {insertAuditTrail} from "../../redux/application/application.actions";
|
||||
import {selectBodyshop} from "../../redux/user/user.selectors";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
insertAuditTrail: ({jobid, operation}) =>
|
||||
dispatch(insertAuditTrail({jobid, operation})),
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobsAdminStatus);
|
||||
|
||||
export function JobsAdminStatus({ insertAuditTrail, bodyshop, job }) {
|
||||
const { t } = useTranslation();
|
||||
export function JobsAdminStatus({insertAuditTrail, bodyshop, job}) {
|
||||
const {t} = useTranslation();
|
||||
|
||||
const [mutationUpdateJobstatus] = useMutation(UPDATE_JOB_STATUS);
|
||||
const updateJobStatus = (status) => {
|
||||
mutationUpdateJobstatus({
|
||||
variables: { jobId: job.id, status: status },
|
||||
})
|
||||
.then((r) => {
|
||||
notification["success"]({ message: t("jobs.successes.save") });
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
operation: AuditTrailMapping.admin_jobstatuschange(status),
|
||||
});
|
||||
// refetch();
|
||||
})
|
||||
.catch((error) => {
|
||||
notification["error"]({ message: t("jobs.errors.saving") });
|
||||
});
|
||||
};
|
||||
const [mutationUpdateJobstatus] = useMutation(UPDATE_JOB_STATUS);
|
||||
const updateJobStatus = (status) => {
|
||||
mutationUpdateJobstatus({
|
||||
variables: {jobId: job.id, status: status},
|
||||
})
|
||||
.then((r) => {
|
||||
notification["success"]({message: t("jobs.successes.save")});
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
operation: AuditTrailMapping.admin_jobstatuschange(status),
|
||||
});
|
||||
// refetch();
|
||||
})
|
||||
.catch((error) => {
|
||||
notification["error"]({message: t("jobs.errors.saving")});
|
||||
});
|
||||
};
|
||||
|
||||
const statusMenu = {
|
||||
items: bodyshop.md_ro_statuses.statuses.map((item) => ({
|
||||
key: item,
|
||||
label: item,
|
||||
})),
|
||||
onClick: (e) => {
|
||||
updateJobStatus(e.key);
|
||||
},
|
||||
}
|
||||
const statusMenu = {
|
||||
items: bodyshop.md_ro_statuses.statuses.map((item) => ({
|
||||
key: item,
|
||||
label: item,
|
||||
})),
|
||||
onClick: (e) => {
|
||||
updateJobStatus(e.key);
|
||||
},
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -56,7 +56,7 @@ export function JobsAdminStatus({ insertAuditTrail, bodyshop, job }) {
|
||||
<Button shape="round">
|
||||
<span>{job.status}</span>
|
||||
|
||||
<DownCircleFilled />
|
||||
<DownCircleFilled/>
|
||||
</Button>
|
||||
</Dropdown>
|
||||
</>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import { useMutation } from "@apollo/client";
|
||||
import { Button, Space, notification } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import {useMutation} from "@apollo/client";
|
||||
import {Button, Space, notification} from "antd";
|
||||
import React, {useState} from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {
|
||||
DELETE_DELIVERY_CHECKLIST,
|
||||
DELETE_INTAKE_CHECKLIST,
|
||||
DELETE_DELIVERY_CHECKLIST,
|
||||
DELETE_INTAKE_CHECKLIST,
|
||||
} from "../../graphql/jobs.queries";
|
||||
|
||||
export default function JobAdminDeleteIntake({ job }) {
|
||||
const { t } = useTranslation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
export default function JobAdminDeleteIntake({job}) {
|
||||
const {t} = useTranslation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const [deleteIntake] = useMutation(DELETE_INTAKE_CHECKLIST);
|
||||
const [deleteDelivery] = useMutation(DELETE_DELIVERY_CHECKLIST);
|
||||
const [deleteIntake] = useMutation(DELETE_INTAKE_CHECKLIST);
|
||||
const [deleteDelivery] = useMutation(DELETE_DELIVERY_CHECKLIST);
|
||||
|
||||
const handleDelete = async (values) => {
|
||||
setLoading(true);
|
||||
@@ -32,11 +32,11 @@ export default function JobAdminDeleteIntake({ job }) {
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
const handleDeleteDelivery = async (values) => {
|
||||
setLoading(true);
|
||||
const result = await deleteDelivery({
|
||||
variables: { jobId: job.id },
|
||||
});
|
||||
const handleDeleteDelivery = async (values) => {
|
||||
setLoading(true);
|
||||
const result = await deleteDelivery({
|
||||
variables: {jobId: job.id},
|
||||
});
|
||||
|
||||
if (!!!result.errors) {
|
||||
notification["success"]({message: t("jobs.successes.save")});
|
||||
@@ -50,24 +50,24 @@ export default function JobAdminDeleteIntake({ job }) {
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Space wrap>
|
||||
<Button
|
||||
loading={loading}
|
||||
onClick={handleDelete}
|
||||
disabled={!job.intakechecklist}
|
||||
>
|
||||
{t("jobs.labels.deleteintake")}
|
||||
</Button>
|
||||
<Button
|
||||
loading={loading}
|
||||
onClick={handleDeleteDelivery}
|
||||
disabled={!job.deliverychecklist}
|
||||
>
|
||||
{t("jobs.labels.deletedelivery")}
|
||||
</Button>
|
||||
</Space>
|
||||
</>
|
||||
);
|
||||
return (
|
||||
<>
|
||||
<Space wrap>
|
||||
<Button
|
||||
loading={loading}
|
||||
onClick={handleDelete}
|
||||
disabled={!job.intakechecklist}
|
||||
>
|
||||
{t("jobs.labels.deleteintake")}
|
||||
</Button>
|
||||
<Button
|
||||
loading={loading}
|
||||
onClick={handleDeleteDelivery}
|
||||
disabled={!job.deliverychecklist}
|
||||
>
|
||||
{t("jobs.labels.deletedelivery")}
|
||||
</Button>
|
||||
</Space>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
import { useMutation } from "@apollo/client";
|
||||
import { Button, Space, notification } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import {useMutation} from "@apollo/client";
|
||||
import {Button, Space, notification} from "antd";
|
||||
import React, {useState} from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
|
||||
import moment from "moment";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
||||
import {connect} from "react-redux";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {INSERT_EXPORT_LOG} from "../../graphql/accounting.queries";
|
||||
import {
|
||||
MARK_JOB_AS_EXPORTED,
|
||||
MARK_JOB_AS_UNINVOICED,
|
||||
MARK_JOB_FOR_REEXPORT,
|
||||
MARK_JOB_AS_EXPORTED,
|
||||
MARK_JOB_AS_UNINVOICED,
|
||||
MARK_JOB_FOR_REEXPORT,
|
||||
} from "../../graphql/jobs.queries";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import {insertAuditTrail} from "../../redux/application/application.actions";
|
||||
import {
|
||||
selectBodyshop,
|
||||
selectCurrentUser,
|
||||
selectBodyshop,
|
||||
selectCurrentUser,
|
||||
} from "../../redux/user/user.selectors";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
|
||||
@@ -33,27 +33,27 @@ export default connect(
|
||||
)(JobAdminMarkReexport);
|
||||
|
||||
export function JobAdminMarkReexport({
|
||||
insertAuditTrail,
|
||||
bodyshop,
|
||||
currentUser,
|
||||
job,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||
insertAuditTrail,
|
||||
bodyshop,
|
||||
currentUser,
|
||||
job,
|
||||
}) {
|
||||
const {t} = useTranslation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||
|
||||
const [markJobForReexport] = useMutation(MARK_JOB_FOR_REEXPORT);
|
||||
const [markJobExported] = useMutation(MARK_JOB_AS_EXPORTED);
|
||||
const [markJobUninvoiced] = useMutation(MARK_JOB_AS_UNINVOICED);
|
||||
const [markJobForReexport] = useMutation(MARK_JOB_FOR_REEXPORT);
|
||||
const [markJobExported] = useMutation(MARK_JOB_AS_EXPORTED);
|
||||
const [markJobUninvoiced] = useMutation(MARK_JOB_AS_UNINVOICED);
|
||||
|
||||
const handleMarkForExport = async () => {
|
||||
setLoading(true);
|
||||
const result = await markJobForReexport({
|
||||
variables: {
|
||||
jobId: job.id,
|
||||
default_invoiced: bodyshop.md_ro_statuses.default_invoiced,
|
||||
},
|
||||
});
|
||||
const handleMarkForExport = async () => {
|
||||
setLoading(true);
|
||||
const result = await markJobForReexport({
|
||||
variables: {
|
||||
jobId: job.id,
|
||||
default_invoiced: bodyshop.md_ro_statuses.default_invoiced,
|
||||
},
|
||||
});
|
||||
|
||||
if (!result.errors) {
|
||||
notification["success"]({message: t("jobs.successes.save")});
|
||||
@@ -71,15 +71,15 @@ export function JobAdminMarkReexport({
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
const handleMarkExported = async () => {
|
||||
setLoading(true);
|
||||
const result = await markJobExported({
|
||||
variables: {
|
||||
jobId: job.id,
|
||||
date_exported: dayjs(),
|
||||
default_exported: bodyshop.md_ro_statuses.default_exported,
|
||||
},
|
||||
});
|
||||
const handleMarkExported = async () => {
|
||||
setLoading(true);
|
||||
const result = await markJobExported({
|
||||
variables: {
|
||||
jobId: job.id,
|
||||
date_exported: dayjs(),
|
||||
default_exported: bodyshop.md_ro_statuses.default_exported,
|
||||
},
|
||||
});
|
||||
|
||||
await insertExportLog({
|
||||
variables: {
|
||||
@@ -111,14 +111,14 @@ export function JobAdminMarkReexport({
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
const handleUninvoice = async () => {
|
||||
setLoading(true);
|
||||
const result = await markJobUninvoiced({
|
||||
variables: {
|
||||
jobId: job.id,
|
||||
default_delivered: bodyshop.md_ro_statuses.default_delivered,
|
||||
},
|
||||
});
|
||||
const handleUninvoice = async () => {
|
||||
setLoading(true);
|
||||
const result = await markJobUninvoiced({
|
||||
variables: {
|
||||
jobId: job.id,
|
||||
default_delivered: bodyshop.md_ro_statuses.default_delivered,
|
||||
},
|
||||
});
|
||||
|
||||
if (!result.errors) {
|
||||
notification["success"]({message: t("jobs.successes.save")});
|
||||
@@ -136,31 +136,31 @@ export function JobAdminMarkReexport({
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Space wrap>
|
||||
<Button
|
||||
loading={loading}
|
||||
disabled={!job.date_exported}
|
||||
onClick={handleMarkForExport}
|
||||
>
|
||||
{t("jobs.labels.markforreexport")}
|
||||
</Button>
|
||||
<Button
|
||||
loading={loading}
|
||||
disabled={job.date_exported}
|
||||
onClick={handleMarkExported}
|
||||
>
|
||||
{t("jobs.actions.markasexported")}
|
||||
</Button>
|
||||
<Button
|
||||
loading={loading}
|
||||
disabled={!job.date_invoiced || job.date_exported}
|
||||
onClick={handleUninvoice}
|
||||
>
|
||||
{t("jobs.actions.uninvoice")}
|
||||
</Button>
|
||||
</Space>
|
||||
</>
|
||||
);
|
||||
return (
|
||||
<>
|
||||
<Space wrap>
|
||||
<Button
|
||||
loading={loading}
|
||||
disabled={!job.date_exported}
|
||||
onClick={handleMarkForExport}
|
||||
>
|
||||
{t("jobs.labels.markforreexport")}
|
||||
</Button>
|
||||
<Button
|
||||
loading={loading}
|
||||
disabled={job.date_exported}
|
||||
onClick={handleMarkExported}
|
||||
>
|
||||
{t("jobs.actions.markasexported")}
|
||||
</Button>
|
||||
<Button
|
||||
loading={loading}
|
||||
disabled={!job.date_invoiced || job.date_exported}
|
||||
onClick={handleUninvoice}
|
||||
>
|
||||
{t("jobs.actions.uninvoice")}
|
||||
</Button>
|
||||
</Space>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,65 +1,65 @@
|
||||
import { useMutation } from "@apollo/client";
|
||||
import { Switch, notification } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { UPDATE_REMOVE_FROM_AR } from "../../graphql/jobs.queries";
|
||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||
import {useMutation} from "@apollo/client";
|
||||
import {Switch, notification} from "antd";
|
||||
import React, {useState} from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {connect} from "react-redux";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {UPDATE_REMOVE_FROM_AR} from "../../graphql/jobs.queries";
|
||||
import {insertAuditTrail} from "../../redux/application/application.actions";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
insertAuditTrail: ({jobid, operation}) =>
|
||||
dispatch(insertAuditTrail({jobid, operation})),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobsAdminRemoveAR);
|
||||
|
||||
export function JobsAdminRemoveAR({ insertAuditTrail, job }) {
|
||||
const { t } = useTranslation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [switchValue, setSwitchValue] = useState(job.remove_from_ar);
|
||||
export function JobsAdminRemoveAR({insertAuditTrail, job}) {
|
||||
const {t} = useTranslation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [switchValue, setSwitchValue] = useState(job.remove_from_ar);
|
||||
|
||||
const [mutationUpdateRemoveFromAR] = useMutation(UPDATE_REMOVE_FROM_AR);
|
||||
const [mutationUpdateRemoveFromAR] = useMutation(UPDATE_REMOVE_FROM_AR);
|
||||
|
||||
const handleChange = async (value) => {
|
||||
setLoading(true);
|
||||
const result = await mutationUpdateRemoveFromAR({
|
||||
variables: { jobId: job.id, remove_from_ar: value },
|
||||
});
|
||||
const handleChange = async (value) => {
|
||||
setLoading(true);
|
||||
const result = await mutationUpdateRemoveFromAR({
|
||||
variables: {jobId: job.id, remove_from_ar: value},
|
||||
});
|
||||
|
||||
if (!result.errors) {
|
||||
notification["success"]({ message: t("jobs.successes.save") });
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
operation: AuditTrailMapping.admin_job_remove_from_ar(value),
|
||||
});
|
||||
setSwitchValue(value);
|
||||
} else {
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.saving", {
|
||||
error: JSON.stringify(result.errors),
|
||||
}),
|
||||
});
|
||||
}
|
||||
setLoading(false);
|
||||
};
|
||||
if (!result.errors) {
|
||||
notification["success"]({message: t("jobs.successes.save")});
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
operation: AuditTrailMapping.admin_job_remove_from_ar(value),
|
||||
});
|
||||
setSwitchValue(value);
|
||||
} else {
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.saving", {
|
||||
error: JSON.stringify(result.errors),
|
||||
}),
|
||||
});
|
||||
}
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div style={{ display: "flex", alignItems: "center" }}>
|
||||
<div style={{ marginRight: "10px" }}>
|
||||
{t("jobs.labels.remove_from_ar")}:
|
||||
</div>
|
||||
<div>
|
||||
<Switch
|
||||
checked={switchValue}
|
||||
loading={loading}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
return (
|
||||
<>
|
||||
<div style={{display: "flex", alignItems: "center"}}>
|
||||
<div style={{marginRight: "10px"}}>
|
||||
{t("jobs.labels.remove_from_ar")}:
|
||||
</div>
|
||||
<div>
|
||||
<Switch
|
||||
checked={switchValue}
|
||||
loading={loading}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,68 +1,68 @@
|
||||
import {gql, useMutation} from "@apollo/client";
|
||||
import {useMutation} from "@apollo/client";
|
||||
import {Button, notification} from "antd";
|
||||
import React, {useState} from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {connect} from "react-redux";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import { UNVOID_JOB } from "../../graphql/jobs.queries";
|
||||
import {UNVOID_JOB} from "../../graphql/jobs.queries";
|
||||
import {insertAuditTrail} from "../../redux/application/application.actions";
|
||||
import {selectBodyshop, selectCurrentUser,} from "../../redux/user/user.selectors";
|
||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
currentUser: selectCurrentUser,
|
||||
bodyshop: selectBodyshop,
|
||||
currentUser: selectCurrentUser,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
insertAuditTrail: ({ jobid, operation }) =>
|
||||
dispatch(insertAuditTrail({ jobid, operation })),
|
||||
insertAuditTrail: ({jobid, operation}) =>
|
||||
dispatch(insertAuditTrail({jobid, operation})),
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobsAdminUnvoid);
|
||||
|
||||
export function JobsAdminUnvoid({
|
||||
insertAuditTrail,
|
||||
bodyshop,
|
||||
job,
|
||||
currentUser,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [mutationUnvoidJob] = useMutation(UNVOID_JOB);
|
||||
insertAuditTrail,
|
||||
bodyshop,
|
||||
job,
|
||||
currentUser,
|
||||
}) {
|
||||
const {t} = useTranslation();
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [mutationUnvoidJob] = useMutation(UNVOID_JOB);
|
||||
|
||||
const handleUpdate = async (values) => {
|
||||
setLoading(true);
|
||||
const result = await mutationUnvoidJob({
|
||||
variables: {
|
||||
jobId: job.id,
|
||||
default_imported: bodyshop.md_ro_statuses.default_imported,
|
||||
currentUserEmail: currentUser.email,
|
||||
text: t("jobs.labels.unvoidnote"),
|
||||
},
|
||||
});
|
||||
const handleUpdate = async (values) => {
|
||||
setLoading(true);
|
||||
const result = await mutationUnvoidJob({
|
||||
variables: {
|
||||
jobId: job.id,
|
||||
default_imported: bodyshop.md_ro_statuses.default_imported,
|
||||
currentUserEmail: currentUser.email,
|
||||
text: t("jobs.labels.unvoidnote"),
|
||||
},
|
||||
});
|
||||
|
||||
if (!result.errors) {
|
||||
notification["success"]({ message: t("jobs.successes.save") });
|
||||
if (!result.errors) {
|
||||
notification["success"]({message: t("jobs.successes.save")});
|
||||
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
operation: AuditTrailMapping.admin_jobunvoid(),
|
||||
});
|
||||
} else {
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.saving", {
|
||||
error: JSON.stringify(result.errors),
|
||||
}),
|
||||
});
|
||||
}
|
||||
setLoading(false);
|
||||
//Get the owner details, populate it all back into the job.
|
||||
};
|
||||
insertAuditTrail({
|
||||
jobid: job.id,
|
||||
operation: AuditTrailMapping.admin_jobunvoid(),
|
||||
});
|
||||
} else {
|
||||
notification["error"]({
|
||||
message: t("jobs.errors.saving", {
|
||||
error: JSON.stringify(result.errors),
|
||||
}),
|
||||
});
|
||||
}
|
||||
setLoading(false);
|
||||
//Get the owner details, populate it all back into the job.
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button loading={loading} disabled={!job.voided} onClick={handleUpdate}>
|
||||
{t("jobs.actions.unvoid")}
|
||||
</Button>
|
||||
</>
|
||||
);
|
||||
return (
|
||||
<>
|
||||
<Button loading={loading} disabled={!job.voided} onClick={handleUpdate}>
|
||||
{t("jobs.actions.unvoid")}
|
||||
</Button>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -220,12 +220,12 @@ export function PayableExportAll({
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
if (bodyshop.pbs_serialnumber)
|
||||
return (
|
||||
<Link to='/manage/dmsap' state={{ billids }}>
|
||||
<Button>{t("jobs.actions.export")}</Button>
|
||||
</Link>
|
||||
);
|
||||
if (bodyshop.pbs_serialnumber)
|
||||
return (
|
||||
<Link to='/manage/dmsap' state={{billids}}>
|
||||
<Button>{t("jobs.actions.export")}</Button>
|
||||
</Link>
|
||||
);
|
||||
|
||||
return (
|
||||
<Button onClick={handleQbxml} loading={loading} disabled={disabled}>
|
||||
|
||||
@@ -213,12 +213,12 @@ export function PayableExportButton({
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
if (bodyshop.pbs_serialnumber)
|
||||
return (
|
||||
<Link to='/manage/dmsap' state={{billids: [billId]}}>
|
||||
<Button>{t("jobs.actions.export")}</Button>
|
||||
</Link>
|
||||
);
|
||||
if (bodyshop.pbs_serialnumber)
|
||||
return (
|
||||
<Link to='/manage/dmsap' state={{billids: [billId]}}>
|
||||
<Button>{t("jobs.actions.export")}</Button>
|
||||
</Link>
|
||||
);
|
||||
|
||||
return (
|
||||
<Button onClick={handleQbxml} loading={loading} disabled={disabled}>
|
||||
|
||||
@@ -106,36 +106,36 @@ export function ProductionBoardKanbanComponent({
|
||||
|
||||
const oldChildCardNewParent = oldChildCard ? card.kanbanparent : null;
|
||||
|
||||
let movedCardNewKanbanParent;
|
||||
if (movedCardWillBeFirst) {
|
||||
//console.log("==> New Card is first.");
|
||||
movedCardNewKanbanParent = "-1";
|
||||
} else if (movedCardWillBeLast) {
|
||||
// console.log("==> New Card is last.");
|
||||
movedCardNewKanbanParent = lastCardInDestinationColumn.id;
|
||||
} else if (!!newChildCard) {
|
||||
// console.log("==> New Card is somewhere in the middle");
|
||||
movedCardNewKanbanParent = newChildCard.kanbanparent;
|
||||
} else {
|
||||
console.log("==> !!!!!!Couldn't find a parent.!!!! <==");
|
||||
}
|
||||
const newChildCardNewParent = newChildCard ? card.id : null;
|
||||
const update = await client.mutate({
|
||||
mutation: generate_UPDATE_JOB_KANBAN(
|
||||
oldChildCard ? oldChildCard.id : null,
|
||||
oldChildCardNewParent,
|
||||
card.id,
|
||||
movedCardNewKanbanParent,
|
||||
destination.toColumnId,
|
||||
newChildCard ? newChildCard.id : null,
|
||||
newChildCardNewParent
|
||||
),
|
||||
// TODO: optimisticResponse
|
||||
});
|
||||
insertAuditTrail({
|
||||
jobid: card.id,
|
||||
operation: AuditTrailMapping.jobstatuschange(destination.toColumnId),
|
||||
});
|
||||
let movedCardNewKanbanParent;
|
||||
if (movedCardWillBeFirst) {
|
||||
//console.log("==> New Card is first.");
|
||||
movedCardNewKanbanParent = "-1";
|
||||
} else if (movedCardWillBeLast) {
|
||||
// console.log("==> New Card is last.");
|
||||
movedCardNewKanbanParent = lastCardInDestinationColumn.id;
|
||||
} else if (!!newChildCard) {
|
||||
// console.log("==> New Card is somewhere in the middle");
|
||||
movedCardNewKanbanParent = newChildCard.kanbanparent;
|
||||
} else {
|
||||
console.log("==> !!!!!!Couldn't find a parent.!!!! <==");
|
||||
}
|
||||
const newChildCardNewParent = newChildCard ? card.id : null;
|
||||
const update = await client.mutate({
|
||||
mutation: generate_UPDATE_JOB_KANBAN(
|
||||
oldChildCard ? oldChildCard.id : null,
|
||||
oldChildCardNewParent,
|
||||
card.id,
|
||||
movedCardNewKanbanParent,
|
||||
destination.toColumnId,
|
||||
newChildCard ? newChildCard.id : null,
|
||||
newChildCardNewParent
|
||||
),
|
||||
// TODO: optimisticResponse
|
||||
});
|
||||
insertAuditTrail({
|
||||
jobid: card.id,
|
||||
operation: AuditTrailMapping.jobstatuschange(destination.toColumnId),
|
||||
});
|
||||
|
||||
if (update.errors) {
|
||||
notification["error"]({
|
||||
@@ -146,30 +146,30 @@ export function ProductionBoardKanbanComponent({
|
||||
}
|
||||
};
|
||||
|
||||
const totalHrs = data
|
||||
.reduce(
|
||||
(acc, val) =>
|
||||
acc +
|
||||
(val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0) +
|
||||
(val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
||||
0
|
||||
)
|
||||
.toFixed(1);
|
||||
const totalLAB = data
|
||||
.reduce(
|
||||
(acc, val) => acc + (val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
||||
0
|
||||
)
|
||||
.toFixed(1);
|
||||
const totalLAR = data
|
||||
.reduce(
|
||||
(acc, val) => acc + (val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
||||
0
|
||||
)
|
||||
.toFixed(1);
|
||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
||||
.filter((screen) => !!screen[1])
|
||||
.slice(-1)[0];
|
||||
const totalHrs = data
|
||||
.reduce(
|
||||
(acc, val) =>
|
||||
acc +
|
||||
(val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0) +
|
||||
(val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
||||
0
|
||||
)
|
||||
.toFixed(1);
|
||||
const totalLAB = data
|
||||
.reduce(
|
||||
(acc, val) => acc + (val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
||||
0
|
||||
)
|
||||
.toFixed(1);
|
||||
const totalLAR = data
|
||||
.reduce(
|
||||
(acc, val) => acc + (val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
||||
0
|
||||
)
|
||||
.toFixed(1);
|
||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
||||
.filter((screen) => !!screen[1])
|
||||
.slice(-1)[0];
|
||||
|
||||
const standardSizes = {
|
||||
xs: "250",
|
||||
|
||||
@@ -65,132 +65,132 @@ export function ProductionListDetail({
|
||||
nextFetchPolicy: "network-only",
|
||||
});
|
||||
|
||||
return (
|
||||
<Drawer
|
||||
title={
|
||||
<PageHeader
|
||||
title={theJob.ro_number}
|
||||
extra={
|
||||
<Space wrap>
|
||||
{!technician ? (
|
||||
<ProductionRemoveButton jobId={theJob.id} />
|
||||
) : null}
|
||||
<Button
|
||||
onClick={() => {
|
||||
setPrintCenterContext({
|
||||
actions: { refetch: refetch },
|
||||
context: {
|
||||
id: theJob.id,
|
||||
job: theJob,
|
||||
type: "job",
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
<PrinterFilled />
|
||||
{t("jobs.actions.printCenter")}
|
||||
</Button>
|
||||
{!technician ? (
|
||||
<ScoreboardAddButton job={data ? data.jobs_by_pk : {}} />
|
||||
) : null}
|
||||
</Space>
|
||||
}
|
||||
/>
|
||||
}
|
||||
placement="right"
|
||||
width={"50%"}
|
||||
onClose={handleClose}
|
||||
open={selected}
|
||||
>
|
||||
{loading && <LoadingSkeleton />}
|
||||
{error && <AlertComponent error={JSON.stringify(error)} />}
|
||||
{!loading && data && (
|
||||
<div>
|
||||
<CardTemplate
|
||||
title={t("jobs.labels.employeeassignments")}
|
||||
loading={loading}
|
||||
>
|
||||
<JobEmployeeAssignments job={data.jobs_by_pk} refetch={refetch} />
|
||||
</CardTemplate>
|
||||
<div style={{ height: "8px" }} />
|
||||
<Descriptions bordered column={1}>
|
||||
<Descriptions.Item label={t("jobs.fields.ro_number")}>
|
||||
{theJob.ro_number || ""}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.alt_transport")}>
|
||||
<Space>
|
||||
{data.jobs_by_pk.alt_transport || ""}
|
||||
<JobAtChange job={data.jobs_by_pk} />
|
||||
</Space>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.clm_no")}>
|
||||
{theJob.clm_no || ""}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.ins_co_nm")}>
|
||||
{theJob.ins_co_nm || ""}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.owner")}>
|
||||
<Space>
|
||||
<OwnerNameDisplay ownerObject={theJob} />
|
||||
{!technician ? (
|
||||
<>
|
||||
<StartChatButton
|
||||
phone={data.jobs_by_pk.ownr_ph1}
|
||||
jobid={data.jobs_by_pk.id}
|
||||
return (
|
||||
<Drawer
|
||||
title={
|
||||
<PageHeader
|
||||
title={theJob.ro_number}
|
||||
extra={
|
||||
<Space wrap>
|
||||
{!technician ? (
|
||||
<ProductionRemoveButton jobId={theJob.id}/>
|
||||
) : null}
|
||||
<Button
|
||||
onClick={() => {
|
||||
setPrintCenterContext({
|
||||
actions: {refetch: refetch},
|
||||
context: {
|
||||
id: theJob.id,
|
||||
job: theJob,
|
||||
type: "job",
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
<PrinterFilled/>
|
||||
{t("jobs.actions.printCenter")}
|
||||
</Button>
|
||||
{!technician ? (
|
||||
<ScoreboardAddButton job={data ? data.jobs_by_pk : {}}/>
|
||||
) : null}
|
||||
</Space>
|
||||
}
|
||||
/>
|
||||
}
|
||||
placement="right"
|
||||
width={"50%"}
|
||||
onClose={handleClose}
|
||||
open={selected}
|
||||
>
|
||||
{loading && <LoadingSkeleton/>}
|
||||
{error && <AlertComponent error={JSON.stringify(error)}/>}
|
||||
{!loading && data && (
|
||||
<div>
|
||||
<CardTemplate
|
||||
title={t("jobs.labels.employeeassignments")}
|
||||
loading={loading}
|
||||
>
|
||||
<JobEmployeeAssignments job={data.jobs_by_pk} refetch={refetch}/>
|
||||
</CardTemplate>
|
||||
<div style={{height: "8px"}}/>
|
||||
<Descriptions bordered column={1}>
|
||||
<Descriptions.Item label={t("jobs.fields.ro_number")}>
|
||||
{theJob.ro_number || ""}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.alt_transport")}>
|
||||
<Space>
|
||||
{data.jobs_by_pk.alt_transport || ""}
|
||||
<JobAtChange job={data.jobs_by_pk}/>
|
||||
</Space>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.clm_no")}>
|
||||
{theJob.clm_no || ""}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.ins_co_nm")}>
|
||||
{theJob.ins_co_nm || ""}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.owner")}>
|
||||
<Space>
|
||||
<OwnerNameDisplay ownerObject={theJob}/>
|
||||
{!technician ? (
|
||||
<>
|
||||
<StartChatButton
|
||||
phone={data.jobs_by_pk.ownr_ph1}
|
||||
jobid={data.jobs_by_pk.id}
|
||||
/>
|
||||
<StartChatButton
|
||||
phone={data.jobs_by_pk.ownr_ph2}
|
||||
jobid={data.jobs_by_pk.id}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<PhoneNumberFormatter>
|
||||
{data.jobs_by_pk.ownr_ph1}
|
||||
</PhoneNumberFormatter>
|
||||
<PhoneNumberFormatter>
|
||||
{data.jobs_by_pk.ownr_ph2}
|
||||
</PhoneNumberFormatter>
|
||||
</>
|
||||
)}
|
||||
</Space>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.vehicle")}>
|
||||
{`${theJob.v_model_yr || ""} ${theJob.v_color || ""} ${
|
||||
theJob.v_make_desc || ""
|
||||
} ${theJob.v_model_desc || ""}`}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.clm_total")}>
|
||||
<CurrencyFormatter>{theJob.clm_total}</CurrencyFormatter>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.actual_in")}>
|
||||
<DateFormatter>{theJob.actual_in}</DateFormatter>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.scheduled_completion")}>
|
||||
<DateFormatter>{theJob.scheduled_completion}</DateFormatter>
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
<div style={{height: "8px"}}/>
|
||||
<JobDetailCardsPartsComponent
|
||||
loading={loading}
|
||||
data={data ? data.jobs_by_pk : null}
|
||||
/>
|
||||
<StartChatButton
|
||||
phone={data.jobs_by_pk.ownr_ph2}
|
||||
jobid={data.jobs_by_pk.id}
|
||||
<div style={{height: "8px"}}/>
|
||||
<JobDetailCardsNotesComponent
|
||||
loading={loading}
|
||||
data={data ? data.jobs_by_pk : null}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<PhoneNumberFormatter>
|
||||
{data.jobs_by_pk.ownr_ph1}
|
||||
</PhoneNumberFormatter>
|
||||
<PhoneNumberFormatter>
|
||||
{data.jobs_by_pk.ownr_ph2}
|
||||
</PhoneNumberFormatter>
|
||||
</>
|
||||
)}
|
||||
</Space>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.vehicle")}>
|
||||
{`${theJob.v_model_yr || ""} ${theJob.v_color || ""} ${
|
||||
theJob.v_make_desc || ""
|
||||
} ${theJob.v_model_desc || ""}`}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.clm_total")}>
|
||||
<CurrencyFormatter>{theJob.clm_total}</CurrencyFormatter>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.actual_in")}>
|
||||
<DateFormatter>{theJob.actual_in}</DateFormatter>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label={t("jobs.fields.scheduled_completion")}>
|
||||
<DateFormatter>{theJob.scheduled_completion}</DateFormatter>
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
<div style={{ height: "8px" }} />
|
||||
<JobDetailCardsPartsComponent
|
||||
loading={loading}
|
||||
data={data ? data.jobs_by_pk : null}
|
||||
/>
|
||||
<div style={{ height: "8px" }} />
|
||||
<JobDetailCardsNotesComponent
|
||||
loading={loading}
|
||||
data={data ? data.jobs_by_pk : null}
|
||||
/>
|
||||
{!bodyshop.uselocalmediaserver && (
|
||||
<>
|
||||
<div style={{ height: "8px" }} />
|
||||
<JobDetailCardsDocumentsComponent
|
||||
loading={loading}
|
||||
data={data ? data.jobs_by_pk : null}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</Drawer>
|
||||
);
|
||||
{!bodyshop.uselocalmediaserver && (
|
||||
<>
|
||||
<div style={{height: "8px"}}/>
|
||||
<JobDetailCardsDocumentsComponent
|
||||
loading={loading}
|
||||
data={data ? data.jobs_by_pk : null}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</Drawer>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ export function ReportCenterModalComponent({reportCenterModal, bodyshop}) {
|
||||
setLoading(true);
|
||||
const start = values.dates ? values.dates[0] : null;
|
||||
const end = values.dates ? values.dates[1] : null;
|
||||
const { id } = values;
|
||||
const {id} = values;
|
||||
|
||||
await GenerateDocument(
|
||||
{
|
||||
@@ -257,7 +257,7 @@ export function ReportCenterModalComponent({reportCenterModal, bodyshop}) {
|
||||
else return null;
|
||||
}}
|
||||
</Form.Item>
|
||||
<Form.Item style={{ margin: 0, padding: 0 }} dependencies={["key"]}>
|
||||
<Form.Item style={{margin: 0, padding: 0}} dependencies={["key"]}>
|
||||
{() => {
|
||||
const key = form.getFieldValue("key");
|
||||
const datedisable = Templates[key] && Templates[key].datedisable;
|
||||
@@ -316,18 +316,18 @@ export function ReportCenterModalComponent({reportCenterModal, bodyshop}) {
|
||||
}}
|
||||
</Form.Item>
|
||||
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
marginTop: "1rem",
|
||||
}}
|
||||
>
|
||||
<Button onClick={() => form.submit()} style={{}} loading={loading}>
|
||||
{t("reportcenter.actions.generate")}
|
||||
</Button>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
marginTop: "1rem",
|
||||
}}
|
||||
>
|
||||
<Button onClick={() => form.submit()} style={{}} loading={loading}>
|
||||
{t("reportcenter.actions.generate")}
|
||||
</Button>
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import EmailInput from "../form-items-formatted/email-form-item.component";
|
||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||
import ScheduleDayViewContainer from "../schedule-day-view/schedule-day-view.container";
|
||||
import ScheduleExistingAppointmentsList
|
||||
from "../schedule-existing-appointments-list/schedule-existing-appointments-list.component";
|
||||
from "../schedule-existing-appointments-list/schedule-existing-appointments-list.component";
|
||||
import "./schedule-job-modal.scss";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
|
||||
@@ -6,7 +6,7 @@ import querystring from "query-string";
|
||||
import React, {useEffect} from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {connect} from "react-redux";
|
||||
import {useNavigate, useLocation} from "react-router-dom";
|
||||
import {useLocation, useNavigate} from "react-router-dom";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {logImEXEvent} from "../../firebase/firebase.utils";
|
||||
import {selectBodyshop} from "../../redux/user/user.selectors";
|
||||
|
||||
@@ -2,7 +2,7 @@ import {Button, Table} from "antd";
|
||||
import queryString from "query-string";
|
||||
import React from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {useNavigate, useLocation} from "react-router-dom";
|
||||
import {useLocation, useNavigate} from "react-router-dom";
|
||||
|
||||
export default function ShopEmployeeTeamsListComponent({
|
||||
loading,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {EditFilled, SyncOutlined} from "@ant-design/icons";
|
||||
import {Card, Space, Table, Checkbox, Button} from "antd";
|
||||
import {Button, Card, Checkbox, Space, Table} from "antd";
|
||||
import dayjs from "../../utils/day";
|
||||
import React, {useMemo, useState} from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
|
||||
@@ -5,7 +5,7 @@ import queryString from "query-string";
|
||||
import React, {useState} from "react";
|
||||
import {useTranslation} from "react-i18next";
|
||||
import {connect} from "react-redux";
|
||||
import {Link, useNavigate, useLocation} from "react-router-dom";
|
||||
import {Link, useLocation, useNavigate} from "react-router-dom";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {setModalContext} from "../../redux/modals/modals.actions";
|
||||
import {selectAuthLevel, selectBodyshop,} from "../../redux/user/user.selectors";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { getAnalytics, logEvent } from "firebase/analytics";
|
||||
import { initializeApp } from "firebase/app";
|
||||
import { getAuth, updatePassword, updateProfile } from "firebase/auth";
|
||||
import { getFirestore } from "firebase/firestore";
|
||||
import { getMessaging, getToken, onMessage } from "firebase/messaging";
|
||||
import { store } from "../redux/store";
|
||||
import {getAnalytics, logEvent} from "firebase/analytics";
|
||||
import {initializeApp} from "firebase/app";
|
||||
import {getAuth, updatePassword, updateProfile} from "firebase/auth";
|
||||
import {getFirestore} from "firebase/firestore";
|
||||
import {getMessaging, getToken, onMessage} from "firebase/messaging";
|
||||
import {store} from "../redux/store";
|
||||
|
||||
const config = JSON.parse(process.env.REACT_APP_FIREBASE_CONFIG);
|
||||
initializeApp(config);
|
||||
@@ -14,85 +14,85 @@ export const analytics = getAnalytics();
|
||||
|
||||
//export default firebase;
|
||||
export const getCurrentUser = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const unsubscribe = auth.onAuthStateChanged((userAuth) => {
|
||||
unsubscribe();
|
||||
resolve(userAuth);
|
||||
}, reject);
|
||||
});
|
||||
return new Promise((resolve, reject) => {
|
||||
const unsubscribe = auth.onAuthStateChanged((userAuth) => {
|
||||
unsubscribe();
|
||||
resolve(userAuth);
|
||||
}, reject);
|
||||
});
|
||||
};
|
||||
|
||||
export const updateCurrentUser = (userDetails) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const unsubscribe = auth.onAuthStateChanged((userAuth) => {
|
||||
updateProfile(userAuth, userDetails).then((r) => {
|
||||
unsubscribe();
|
||||
resolve(userAuth);
|
||||
});
|
||||
}, reject);
|
||||
});
|
||||
return new Promise((resolve, reject) => {
|
||||
const unsubscribe = auth.onAuthStateChanged((userAuth) => {
|
||||
updateProfile(userAuth, userDetails).then((r) => {
|
||||
unsubscribe();
|
||||
resolve(userAuth);
|
||||
});
|
||||
}, reject);
|
||||
});
|
||||
};
|
||||
|
||||
export const updateCurrentPassword = async (password) => {
|
||||
const currentUser = await getCurrentUser();
|
||||
const currentUser = await getCurrentUser();
|
||||
|
||||
return updatePassword(currentUser, password);
|
||||
return updatePassword(currentUser, password);
|
||||
};
|
||||
let messaging;
|
||||
try {
|
||||
messaging = getMessaging();
|
||||
messaging = getMessaging();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
export { messaging };
|
||||
export {messaging};
|
||||
|
||||
export const requestForToken = () => {
|
||||
return getToken(messaging, {
|
||||
vapidKey: process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY,
|
||||
})
|
||||
.then((currentToken) => {
|
||||
if (currentToken) {
|
||||
window.sessionStorage.setItem("fcmtoken", currentToken);
|
||||
// Perform any other necessary action with the token
|
||||
} else {
|
||||
// Show permission request UI
|
||||
console.log(
|
||||
"No registration token available. Request permission to generate one."
|
||||
);
|
||||
}
|
||||
return getToken(messaging, {
|
||||
vapidKey: process.env.REACT_APP_FIREBASE_PUBLIC_VAPID_KEY,
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("An error occurred while retrieving token. ", err);
|
||||
});
|
||||
.then((currentToken) => {
|
||||
if (currentToken) {
|
||||
window.sessionStorage.setItem("fcmtoken", currentToken);
|
||||
// Perform any other necessary action with the token
|
||||
} else {
|
||||
// Show permission request UI
|
||||
console.log(
|
||||
"No registration token available. Request permission to generate one."
|
||||
);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("An error occurred while retrieving token. ", err);
|
||||
});
|
||||
};
|
||||
|
||||
export const onMessageListener = () =>
|
||||
new Promise((resolve) => {
|
||||
onMessage(messaging, (payload) => {
|
||||
console.log("Inbound FCM Message", payload);
|
||||
resolve(payload);
|
||||
new Promise((resolve) => {
|
||||
onMessage(messaging, (payload) => {
|
||||
console.log("Inbound FCM Message", payload);
|
||||
resolve(payload);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
export const logImEXEvent = (eventName, additionalParams, stateProp = null) => {
|
||||
const state = stateProp || store.getState();
|
||||
const eventParams = {
|
||||
shop:
|
||||
(state.user && state.user.bodyshop && state.user.bodyshop.shopname) ||
|
||||
null,
|
||||
user:
|
||||
(state.user && state.user.currentUser && state.user.currentUser.email) ||
|
||||
null,
|
||||
...additionalParams,
|
||||
};
|
||||
// console.log(
|
||||
// "%c[Analytics]",
|
||||
// "background-color: green ;font-weight:bold;",
|
||||
// eventName,
|
||||
// eventParams
|
||||
// );
|
||||
logEvent(analytics, eventName, eventParams);
|
||||
const state = stateProp || store.getState();
|
||||
const eventParams = {
|
||||
shop:
|
||||
(state.user && state.user.bodyshop && state.user.bodyshop.shopname) ||
|
||||
null,
|
||||
user:
|
||||
(state.user && state.user.currentUser && state.user.currentUser.email) ||
|
||||
null,
|
||||
...additionalParams,
|
||||
};
|
||||
// console.log(
|
||||
// "%c[Analytics]",
|
||||
// "background-color: green ;font-weight:bold;",
|
||||
// eventName,
|
||||
// eventParams
|
||||
// );
|
||||
logEvent(analytics, eventName, eventParams);
|
||||
};
|
||||
|
||||
// if (messaging) {
|
||||
|
||||
@@ -1,174 +1,174 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_JOBS_FOR_EXPORT = gql`
|
||||
query QUERY_JOBS_FOR_EXPORT($invoicedStatus: String!) {
|
||||
jobs(
|
||||
where: {
|
||||
date_exported: { _is_null: true }
|
||||
status: { _eq: $invoicedStatus }
|
||||
}
|
||||
) {
|
||||
id
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
date_invoiced
|
||||
date_exported
|
||||
status
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_model_yr
|
||||
v_color
|
||||
query QUERY_JOBS_FOR_EXPORT($invoicedStatus: String!) {
|
||||
jobs(
|
||||
where: {
|
||||
date_exported: { _is_null: true }
|
||||
status: { _eq: $invoicedStatus }
|
||||
}
|
||||
) {
|
||||
id
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
date_invoiced
|
||||
date_exported
|
||||
status
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_model_yr
|
||||
v_color
|
||||
|
||||
clm_total
|
||||
clm_no
|
||||
ins_co_nm
|
||||
exportlogs {
|
||||
id
|
||||
successful
|
||||
}
|
||||
clm_total
|
||||
clm_no
|
||||
ins_co_nm
|
||||
exportlogs {
|
||||
id
|
||||
successful
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_BILLS_FOR_EXPORT = gql`
|
||||
query QUERY_BILLS_FOR_EXPORT {
|
||||
bills(where: { exported: { _eq: false }, isinhouse: { _eq: false } }) {
|
||||
id
|
||||
exported
|
||||
date
|
||||
invoice_number
|
||||
is_credit_memo
|
||||
total
|
||||
exportlogs {
|
||||
id
|
||||
successful
|
||||
}
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
vendor {
|
||||
name
|
||||
id
|
||||
}
|
||||
query QUERY_BILLS_FOR_EXPORT {
|
||||
bills(where: { exported: { _eq: false }, isinhouse: { _eq: false } }) {
|
||||
id
|
||||
exported
|
||||
date
|
||||
invoice_number
|
||||
is_credit_memo
|
||||
total
|
||||
exportlogs {
|
||||
id
|
||||
successful
|
||||
}
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
vendor {
|
||||
name
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_PAYMENTS_FOR_EXPORT = gql`
|
||||
query QUERY_PAYMENTS_FOR_EXPORT {
|
||||
payments(
|
||||
where: { exportedat: { _is_null: true } }
|
||||
order_by: { created_at: desc }
|
||||
) {
|
||||
id
|
||||
amount
|
||||
job {
|
||||
ro_number
|
||||
query QUERY_PAYMENTS_FOR_EXPORT {
|
||||
payments(
|
||||
where: { exportedat: { _is_null: true } }
|
||||
order_by: { created_at: desc }
|
||||
) {
|
||||
id
|
||||
amount
|
||||
job {
|
||||
ro_number
|
||||
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
}
|
||||
payer
|
||||
memo
|
||||
exportedat
|
||||
stripeid
|
||||
created_at
|
||||
transactionid
|
||||
paymentnum
|
||||
date
|
||||
exportlogs {
|
||||
id
|
||||
successful
|
||||
}
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
}
|
||||
payer
|
||||
memo
|
||||
exportedat
|
||||
stripeid
|
||||
created_at
|
||||
transactionid
|
||||
paymentnum
|
||||
date
|
||||
exportlogs {
|
||||
id
|
||||
successful
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const INSERT_EXPORT_LOG = gql`
|
||||
mutation INSERT_EXPORT_LOG($logs: [exportlog_insert_input!]!) {
|
||||
insert_exportlog(objects: $logs) {
|
||||
affected_rows
|
||||
mutation INSERT_EXPORT_LOG($logs: [exportlog_insert_input!]!) {
|
||||
insert_exportlog(objects: $logs) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_PHONEBOOK_PAGINATED = gql`
|
||||
query QUERY_PHONEBOOK_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [phonebook_order_by!]
|
||||
) {
|
||||
search_phonebook(
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
args: { search: $search }
|
||||
query QUERY_PHONEBOOK_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [phonebook_order_by!]
|
||||
) {
|
||||
id
|
||||
created_at
|
||||
firstname
|
||||
lastname
|
||||
phone1
|
||||
phone2
|
||||
state
|
||||
zip
|
||||
fax
|
||||
email
|
||||
country
|
||||
company
|
||||
city
|
||||
category
|
||||
address2
|
||||
address1
|
||||
search_phonebook(
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
args: { search: $search }
|
||||
) {
|
||||
id
|
||||
created_at
|
||||
firstname
|
||||
lastname
|
||||
phone1
|
||||
phone2
|
||||
state
|
||||
zip
|
||||
fax
|
||||
email
|
||||
country
|
||||
company
|
||||
city
|
||||
category
|
||||
address2
|
||||
address1
|
||||
}
|
||||
search_phonebook_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
search_phonebook_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_EXPORT_LOG_PAGINATED = gql`
|
||||
query QUERY_ALL_EXPORTLOG_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [exportlog_order_by!]
|
||||
) {
|
||||
search_exportlog(
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
args: { search: $search }
|
||||
query QUERY_ALL_EXPORTLOG_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [exportlog_order_by!]
|
||||
) {
|
||||
id
|
||||
job {
|
||||
ro_number
|
||||
id
|
||||
}
|
||||
payment {
|
||||
id
|
||||
paymentnum
|
||||
}
|
||||
bill {
|
||||
invoice_number
|
||||
id
|
||||
}
|
||||
successful
|
||||
message
|
||||
created_at
|
||||
useremail
|
||||
search_exportlog(
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
args: { search: $search }
|
||||
) {
|
||||
id
|
||||
job {
|
||||
ro_number
|
||||
id
|
||||
}
|
||||
payment {
|
||||
id
|
||||
paymentnum
|
||||
}
|
||||
bill {
|
||||
invoice_number
|
||||
id
|
||||
}
|
||||
successful
|
||||
message
|
||||
created_at
|
||||
useremail
|
||||
}
|
||||
search_exportlog_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
search_exportlog_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const INSERT_ALLOCATION = gql`
|
||||
mutation INSERT_ALLOCATION($alloc: [allocations_insert_input!]!) {
|
||||
insert_allocations(objects: $alloc) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation INSERT_ALLOCATION($alloc: [allocations_insert_input!]!) {
|
||||
insert_allocations(objects: $alloc) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_ALLOCATION = gql`
|
||||
mutation DELETE_ALLOCATION($id: uuid!) {
|
||||
delete_allocations(where: { id: { _eq: $id } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation DELETE_ALLOCATION($id: uuid!) {
|
||||
delete_allocations(where: { id: { _eq: $id } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
import { onError } from "@apollo/client/link/error";
|
||||
import {onError} from "@apollo/client/link/error";
|
||||
//https://stackoverflow.com/questions/57163454/refreshing-a-token-with-apollo-client-firebase-auth
|
||||
import * as Sentry from "@sentry/react";
|
||||
|
||||
const errorLink = onError(
|
||||
({ graphQLErrors, networkError, operation, forward }) => {
|
||||
if (graphQLErrors) {
|
||||
graphQLErrors.forEach(({ message, locations, path }) => {
|
||||
console.log(
|
||||
`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`
|
||||
);
|
||||
Sentry.captureException({ message, locations, path });
|
||||
});
|
||||
({graphQLErrors, networkError, operation, forward}) => {
|
||||
if (graphQLErrors) {
|
||||
graphQLErrors.forEach(({message, locations, path}) => {
|
||||
console.log(
|
||||
`[GraphQL error]: Message: ${message}, Location: ${locations}, Path: ${path}`
|
||||
);
|
||||
Sentry.captureException({message, locations, path});
|
||||
});
|
||||
}
|
||||
if (networkError)
|
||||
console.log(`[Network error]: ${JSON.stringify(networkError)}`);
|
||||
console.log(operation.getContext());
|
||||
return forward(operation);
|
||||
}
|
||||
if (networkError)
|
||||
console.log(`[Network error]: ${JSON.stringify(networkError)}`);
|
||||
console.log(operation.getContext());
|
||||
return forward(operation);
|
||||
}
|
||||
);
|
||||
|
||||
export default errorLink;
|
||||
|
||||
@@ -1,439 +1,439 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_ALL_ACTIVE_APPOINTMENTS = gql`
|
||||
query QUERY_ALL_ACTIVE_APPOINTMENTS(
|
||||
$start: timestamptz!
|
||||
$end: timestamptz!
|
||||
$startd: date!
|
||||
$endd: date!
|
||||
) {
|
||||
employee_vacation(
|
||||
where: {
|
||||
_or: [
|
||||
{ start: { _gte: $startd } }
|
||||
{ end: { _lte: $endd } }
|
||||
{ _and: [{ start: { _lte: $startd } }, { end: { _gte: $endd } }] }
|
||||
]
|
||||
}
|
||||
query QUERY_ALL_ACTIVE_APPOINTMENTS(
|
||||
$start: timestamptz!
|
||||
$end: timestamptz!
|
||||
$startd: date!
|
||||
$endd: date!
|
||||
) {
|
||||
id
|
||||
start
|
||||
end
|
||||
employee {
|
||||
id
|
||||
last_name
|
||||
first_name
|
||||
}
|
||||
}
|
||||
appointments(
|
||||
where: {
|
||||
canceled: { _eq: false }
|
||||
end: { _lte: $end }
|
||||
start: { _gte: $start }
|
||||
}
|
||||
) {
|
||||
start
|
||||
id
|
||||
end
|
||||
arrived
|
||||
title
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
job {
|
||||
alt_transport
|
||||
ro_number
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ph1
|
||||
ownr_ph2
|
||||
ownr_ea
|
||||
clm_total
|
||||
id
|
||||
clm_no
|
||||
ins_co_nm
|
||||
v_model_yr
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
est_ct_fn
|
||||
est_ct_ln
|
||||
labhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
employee_vacation(
|
||||
where: {
|
||||
_or: [
|
||||
{ start: { _gte: $startd } }
|
||||
{ end: { _lte: $endd } }
|
||||
{ _and: [{ start: { _lte: $startd } }, { end: { _gte: $endd } }] }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
larhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
id
|
||||
start
|
||||
end
|
||||
employee {
|
||||
id
|
||||
last_name
|
||||
first_name
|
||||
}
|
||||
}
|
||||
appointments(
|
||||
where: {
|
||||
canceled: { _eq: false }
|
||||
end: { _lte: $end }
|
||||
start: { _gte: $start }
|
||||
}
|
||||
) {
|
||||
start
|
||||
id
|
||||
end
|
||||
arrived
|
||||
title
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
job {
|
||||
alt_transport
|
||||
ro_number
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ph1
|
||||
ownr_ph2
|
||||
ownr_ea
|
||||
clm_total
|
||||
id
|
||||
clm_no
|
||||
ins_co_nm
|
||||
v_model_yr
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
est_ct_fn
|
||||
est_ct_ln
|
||||
labhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
larhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_APPOINTMENT_BLOCK = gql`
|
||||
mutation INSERT_APPOINTMENT_BLOCK($app: [appointments_insert_input!]!) {
|
||||
insert_appointments(objects: $app) {
|
||||
returning {
|
||||
id
|
||||
start
|
||||
end
|
||||
arrived
|
||||
title
|
||||
isintake
|
||||
block
|
||||
note
|
||||
}
|
||||
mutation INSERT_APPOINTMENT_BLOCK($app: [appointments_insert_input!]!) {
|
||||
insert_appointments(objects: $app) {
|
||||
returning {
|
||||
id
|
||||
start
|
||||
end
|
||||
arrived
|
||||
title
|
||||
isintake
|
||||
block
|
||||
note
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_MANUAL_APPT = gql`
|
||||
mutation INSERT_MANUAL_APPT($apt: appointments_insert_input!) {
|
||||
insert_appointments_one(object: $apt) {
|
||||
start
|
||||
id
|
||||
end
|
||||
arrived
|
||||
title
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
canceled
|
||||
job {
|
||||
id
|
||||
}
|
||||
mutation INSERT_MANUAL_APPT($apt: appointments_insert_input!) {
|
||||
insert_appointments_one(object: $apt) {
|
||||
start
|
||||
id
|
||||
end
|
||||
arrived
|
||||
title
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
canceled
|
||||
job {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_APPOINTMENT = gql`
|
||||
mutation INSERT_APPOINTMENT(
|
||||
$app: [appointments_insert_input!]!
|
||||
$jobId: uuid
|
||||
$altTransport: String
|
||||
) {
|
||||
insert_appointments(objects: $app) {
|
||||
returning {
|
||||
id
|
||||
start
|
||||
end
|
||||
arrived
|
||||
title
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
}
|
||||
}
|
||||
update_jobs(
|
||||
where: { id: { _eq: $jobId } }
|
||||
_set: { alt_transport: $altTransport }
|
||||
mutation INSERT_APPOINTMENT(
|
||||
$app: [appointments_insert_input!]!
|
||||
$jobId: uuid
|
||||
$altTransport: String
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
alt_transport
|
||||
}
|
||||
insert_appointments(objects: $app) {
|
||||
returning {
|
||||
id
|
||||
start
|
||||
end
|
||||
arrived
|
||||
title
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
}
|
||||
}
|
||||
update_jobs(
|
||||
where: { id: { _eq: $jobId } }
|
||||
_set: { alt_transport: $altTransport }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
alt_transport
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_APPOINTMENT_BY_DATE = gql`
|
||||
query QUERY_APPOINTMENT_BY_DATE(
|
||||
$start: timestamptz
|
||||
$end: timestamptz
|
||||
$startd: date!
|
||||
$endd: date!
|
||||
) {
|
||||
employee_vacation(
|
||||
where: { _or: [{ start: { _gte: $startd } }, { end: { _lte: $endd } }] }
|
||||
query QUERY_APPOINTMENT_BY_DATE(
|
||||
$start: timestamptz
|
||||
$end: timestamptz
|
||||
$startd: date!
|
||||
$endd: date!
|
||||
) {
|
||||
id
|
||||
start
|
||||
end
|
||||
employee {
|
||||
id
|
||||
last_name
|
||||
first_name
|
||||
}
|
||||
}
|
||||
appointments(
|
||||
where: { start: { _lte: $end, _gte: $start }, canceled: { _eq: false } }
|
||||
) {
|
||||
start
|
||||
id
|
||||
end
|
||||
title
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
job {
|
||||
alt_transport
|
||||
ro_number
|
||||
ownr_ln
|
||||
ownr_fn
|
||||
ownr_ph1
|
||||
ownr_ph2
|
||||
ownr_ea
|
||||
clm_total
|
||||
id
|
||||
clm_no
|
||||
vehicle {
|
||||
id
|
||||
v_model_yr
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
}
|
||||
labhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||
employee_vacation(
|
||||
where: { _or: [{ start: { _gte: $startd } }, { end: { _lte: $endd } }] }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
id
|
||||
start
|
||||
end
|
||||
employee {
|
||||
id
|
||||
last_name
|
||||
first_name
|
||||
}
|
||||
}
|
||||
}
|
||||
larhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||
appointments(
|
||||
where: { start: { _lte: $end, _gte: $start }, canceled: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
start
|
||||
id
|
||||
end
|
||||
title
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
job {
|
||||
alt_transport
|
||||
ro_number
|
||||
ownr_ln
|
||||
ownr_fn
|
||||
ownr_ph1
|
||||
ownr_ph2
|
||||
ownr_ea
|
||||
clm_total
|
||||
id
|
||||
clm_no
|
||||
vehicle {
|
||||
id
|
||||
v_model_yr
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
}
|
||||
labhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
larhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_APPOINTMENT = gql`
|
||||
mutation UPDATE_APPOINTMENT($appid: uuid!, $app: appointments_set_input) {
|
||||
update_appointments(where: { id: { _eq: $appid } }, _set: $app) {
|
||||
returning {
|
||||
id
|
||||
start
|
||||
id
|
||||
end
|
||||
arrived
|
||||
title
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
}
|
||||
mutation UPDATE_APPOINTMENT($appid: uuid!, $app: appointments_set_input) {
|
||||
update_appointments(where: { id: { _eq: $appid } }, _set: $app) {
|
||||
returning {
|
||||
id
|
||||
start
|
||||
id
|
||||
end
|
||||
arrived
|
||||
title
|
||||
isintake
|
||||
block
|
||||
color
|
||||
note
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CANCEL_APPOINTMENT_BY_ID = gql`
|
||||
mutation CANCEL_APPOINTMENT_BY_ID($appid: uuid!) {
|
||||
update_appointments(
|
||||
where: { id: { _eq: $appid } }
|
||||
_set: { canceled: true }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
canceled
|
||||
}
|
||||
mutation CANCEL_APPOINTMENT_BY_ID($appid: uuid!) {
|
||||
update_appointments(
|
||||
where: { id: { _eq: $appid } }
|
||||
_set: { canceled: true }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
canceled
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CANCEL_APPOINTMENTS_BY_JOB_ID = gql`
|
||||
mutation CANCEL_APPOINTMENTS_BY_JOB_ID($jobid: uuid!, $job: jobs_set_input) {
|
||||
update_appointments(
|
||||
where: { _and: { jobid: { _eq: $jobid }, arrived: { _eq: false } } }
|
||||
_set: { canceled: true }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
canceled
|
||||
}
|
||||
mutation CANCEL_APPOINTMENTS_BY_JOB_ID($jobid: uuid!, $job: jobs_set_input) {
|
||||
update_appointments(
|
||||
where: { _and: { jobid: { _eq: $jobid }, arrived: { _eq: false } } }
|
||||
_set: { canceled: true }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
canceled
|
||||
}
|
||||
}
|
||||
update_jobs_by_pk(pk_columns: { id: $jobid }, _set: $job) {
|
||||
date_scheduled
|
||||
id
|
||||
scheduled_in
|
||||
scheduled_completion
|
||||
status
|
||||
lost_sale_reason
|
||||
date_lost_sale
|
||||
}
|
||||
}
|
||||
update_jobs_by_pk(pk_columns: { id: $jobid }, _set: $job) {
|
||||
date_scheduled
|
||||
id
|
||||
scheduled_in
|
||||
scheduled_completion
|
||||
status
|
||||
lost_sale_reason
|
||||
date_lost_sale
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_APPOINTMENTS_BY_JOBID = gql`
|
||||
query QUERY_APPOINTMENTS_BY_JOBID($jobid: uuid!) {
|
||||
appointments(where: { jobid: { _eq: $jobid } }, order_by: { start: desc }) {
|
||||
start
|
||||
id
|
||||
end
|
||||
color
|
||||
isintake
|
||||
arrived
|
||||
canceled
|
||||
created_at
|
||||
block
|
||||
note
|
||||
query QUERY_APPOINTMENTS_BY_JOBID($jobid: uuid!) {
|
||||
appointments(where: { jobid: { _eq: $jobid } }, order_by: { start: desc }) {
|
||||
start
|
||||
id
|
||||
end
|
||||
color
|
||||
isintake
|
||||
arrived
|
||||
canceled
|
||||
created_at
|
||||
block
|
||||
note
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const QUERY_SCHEDULE_LOAD_DATA = gql`
|
||||
query QUERY_SCHEDULE_LOAD_DATA($start: timestamptz!, $end: timestamptz!) {
|
||||
prodJobs: jobs(
|
||||
where: { inproduction: { _eq: true }, suspended: { _eq: false } }
|
||||
) {
|
||||
id
|
||||
actual_in
|
||||
scheduled_in
|
||||
actual_completion
|
||||
scheduled_completion
|
||||
inproduction
|
||||
ro_number
|
||||
labhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
query QUERY_SCHEDULE_LOAD_DATA($start: timestamptz!, $end: timestamptz!) {
|
||||
prodJobs: jobs(
|
||||
where: { inproduction: { _eq: true }, suspended: { _eq: false } }
|
||||
) {
|
||||
id
|
||||
actual_in
|
||||
scheduled_in
|
||||
actual_completion
|
||||
scheduled_completion
|
||||
inproduction
|
||||
ro_number
|
||||
labhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
larhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
larhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
compJobs: jobs(
|
||||
where: {
|
||||
_and: [
|
||||
{ suspended: { _eq: false } }
|
||||
{
|
||||
_or: [
|
||||
{ scheduled_completion: { _gte: $start, _lte: $end } }
|
||||
{ actual_completion: { _gte: $start, _lte: $end } }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
) {
|
||||
id
|
||||
status
|
||||
ro_number
|
||||
scheduled_completion
|
||||
actual_completion
|
||||
scheduled_in
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
inproduction
|
||||
labhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
larhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
arrJobs: jobs(
|
||||
where: {
|
||||
scheduled_in: { _gte: $start, _lte: $end }
|
||||
suspended: { _eq: false }
|
||||
}
|
||||
) {
|
||||
id
|
||||
scheduled_in
|
||||
actual_in
|
||||
scheduled_completion
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
alt_transport
|
||||
actual_completion
|
||||
inproduction
|
||||
status
|
||||
labhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
larhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
compJobs: jobs(
|
||||
where: {
|
||||
_and: [
|
||||
{ suspended: { _eq: false } }
|
||||
{
|
||||
_or: [
|
||||
{ scheduled_completion: { _gte: $start, _lte: $end } }
|
||||
{ actual_completion: { _gte: $start, _lte: $end } }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
) {
|
||||
id
|
||||
status
|
||||
ro_number
|
||||
scheduled_completion
|
||||
actual_completion
|
||||
scheduled_in
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
inproduction
|
||||
labhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
larhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
arrJobs: jobs(
|
||||
where: {
|
||||
scheduled_in: { _gte: $start, _lte: $end }
|
||||
suspended: { _eq: false }
|
||||
}
|
||||
) {
|
||||
id
|
||||
scheduled_in
|
||||
actual_in
|
||||
scheduled_completion
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
alt_transport
|
||||
actual_completion
|
||||
inproduction
|
||||
status
|
||||
labhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _neq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
larhrs: joblines_aggregate(
|
||||
where: { mod_lbr_ty: { _eq: "LAR" }, removed: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const MARK_APPOINTMENT_ARRIVED = gql`
|
||||
mutation MARK_APPOINTMENT_ARRIVED($appointmentId: uuid!) {
|
||||
update_appointments(
|
||||
where: { id: { _eq: $appointmentId } }
|
||||
_set: { arrived: true }
|
||||
) {
|
||||
affected_rows
|
||||
returning {
|
||||
id
|
||||
arrived
|
||||
}
|
||||
mutation MARK_APPOINTMENT_ARRIVED($appointmentId: uuid!) {
|
||||
update_appointments(
|
||||
where: { id: { _eq: $appointmentId } }
|
||||
_set: { arrived: true }
|
||||
) {
|
||||
affected_rows
|
||||
returning {
|
||||
id
|
||||
arrived
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const MARK_LATEST_APPOINTMENT_ARRIVED = gql`
|
||||
mutation MARK_LATEST_APPOINTMENT_ARRIVED($jobId: uuid!) {
|
||||
update_appointments(
|
||||
where: {
|
||||
jobid: { _eq: $jobId }
|
||||
canceled: { _eq: false }
|
||||
isintake: { _eq: true }
|
||||
}
|
||||
_set: { arrived: true }
|
||||
) {
|
||||
affected_rows
|
||||
returning {
|
||||
id
|
||||
arrived
|
||||
}
|
||||
mutation MARK_LATEST_APPOINTMENT_ARRIVED($jobId: uuid!) {
|
||||
update_appointments(
|
||||
where: {
|
||||
jobid: { _eq: $jobId }
|
||||
canceled: { _eq: false }
|
||||
isintake: { _eq: true }
|
||||
}
|
||||
_set: { arrived: true }
|
||||
) {
|
||||
affected_rows
|
||||
returning {
|
||||
id
|
||||
arrived
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_ALL_ASSOCIATIONS = gql`
|
||||
query QUERY_ALL_ASSOCIATIONS($email: String) {
|
||||
associations(
|
||||
where: { useremail: { _eq: $email } }
|
||||
order_by: { bodyshop: { shopname: asc } }
|
||||
) {
|
||||
id
|
||||
active
|
||||
bodyshop {
|
||||
shopname
|
||||
}
|
||||
query QUERY_ALL_ASSOCIATIONS($email: String) {
|
||||
associations(
|
||||
where: { useremail: { _eq: $email } }
|
||||
order_by: { bodyshop: { shopname: asc } }
|
||||
) {
|
||||
id
|
||||
active
|
||||
bodyshop {
|
||||
shopname
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_ASSOCIATION = gql`
|
||||
mutation UPDATE_ASSOCIATION($assocId: uuid, $assocActive: Boolean) {
|
||||
update_associations(
|
||||
where: { id: { _eq: $assocId } }
|
||||
_set: { active: $assocActive }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
active
|
||||
authlevel
|
||||
default_prod_list_view
|
||||
}
|
||||
mutation UPDATE_ASSOCIATION($assocId: uuid, $assocActive: Boolean) {
|
||||
update_associations(
|
||||
where: { id: { _eq: $assocId } }
|
||||
_set: { active: $assocActive }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
active
|
||||
authlevel
|
||||
default_prod_list_view
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const UPDATE_ACTIVE_ASSOCIATION = gql`
|
||||
mutation UPDATE_ACTIVE_ASSOCIATION($newActiveAssocId: uuid) {
|
||||
nweActive: update_associations(
|
||||
where: { id: { _eq: $newActiveAssocId } }
|
||||
_set: { active: true }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
shopid
|
||||
active
|
||||
}
|
||||
mutation UPDATE_ACTIVE_ASSOCIATION($newActiveAssocId: uuid) {
|
||||
nweActive: update_associations(
|
||||
where: { id: { _eq: $newActiveAssocId } }
|
||||
_set: { active: true }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
shopid
|
||||
active
|
||||
}
|
||||
}
|
||||
inactive: update_associations(
|
||||
where: { id: { _neq: $newActiveAssocId } }
|
||||
_set: { active: false }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
shopid
|
||||
active
|
||||
}
|
||||
}
|
||||
}
|
||||
inactive: update_associations(
|
||||
where: { id: { _neq: $newActiveAssocId } }
|
||||
_set: { active: false }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
shopid
|
||||
active
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_ACTIVE_PROD_LIST_VIEW = gql`
|
||||
mutation UPDATE_ACTIVE_PROD_LIST_VIEW($assocId: uuid, $view: String) {
|
||||
update_associations(
|
||||
where: { id: { _eq: $assocId } }
|
||||
_set: { default_prod_list_view: $view }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
default_prod_list_view
|
||||
}
|
||||
mutation UPDATE_ACTIVE_PROD_LIST_VIEW($assocId: uuid, $view: String) {
|
||||
update_associations(
|
||||
where: { id: { _eq: $assocId } }
|
||||
_set: { default_prod_list_view: $view }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
default_prod_list_view
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_AUDIT_TRAIL = gql`
|
||||
query QUERY_AUDIT_TRAIL($jobid: uuid!) {
|
||||
audit_trail(
|
||||
where: { jobid: { _eq: $jobid } }
|
||||
order_by: { created: desc }
|
||||
) {
|
||||
useremail
|
||||
jobid
|
||||
operation
|
||||
id
|
||||
created
|
||||
bodyshopid
|
||||
query QUERY_AUDIT_TRAIL($jobid: uuid!) {
|
||||
audit_trail(
|
||||
where: { jobid: { _eq: $jobid } }
|
||||
order_by: { created: desc }
|
||||
) {
|
||||
useremail
|
||||
jobid
|
||||
operation
|
||||
id
|
||||
created
|
||||
bodyshopid
|
||||
}
|
||||
email_audit_trail(
|
||||
where: { jobid: { _eq: $jobid } }
|
||||
order_by: { created_at: desc }
|
||||
) {
|
||||
cc
|
||||
contents
|
||||
created_at
|
||||
id
|
||||
jobid
|
||||
noteid
|
||||
subject
|
||||
to
|
||||
useremail
|
||||
status
|
||||
}
|
||||
}
|
||||
email_audit_trail(
|
||||
where: { jobid: { _eq: $jobid } }
|
||||
order_by: { created_at: desc }
|
||||
) {
|
||||
cc
|
||||
contents
|
||||
created_at
|
||||
id
|
||||
jobid
|
||||
noteid
|
||||
subject
|
||||
to
|
||||
useremail
|
||||
status
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_AUDIT_TRAIL = gql`
|
||||
mutation INSERT_AUDIT_TRAIL($auditObj: audit_trail_insert_input!) {
|
||||
insert_audit_trail_one(object: $auditObj) {
|
||||
id
|
||||
jobid
|
||||
billid
|
||||
bodyshopid
|
||||
created
|
||||
operation
|
||||
useremail
|
||||
mutation INSERT_AUDIT_TRAIL($auditObj: audit_trail_insert_input!) {
|
||||
insert_audit_trail_one(object: $auditObj) {
|
||||
id
|
||||
jobid
|
||||
billid
|
||||
bodyshopid
|
||||
created
|
||||
operation
|
||||
useremail
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,118 +1,118 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_AVAILABLE_JOBS = gql`
|
||||
query QUERY_AVAILABLE_JOBS {
|
||||
available_jobs(order_by: { updated_at: desc }) {
|
||||
cieca_id
|
||||
clm_amt
|
||||
clm_no
|
||||
created_at
|
||||
id
|
||||
issupplement
|
||||
ownr_name
|
||||
source_system
|
||||
supplement_number
|
||||
updated_at
|
||||
uploaded_by
|
||||
ins_co_nm
|
||||
vehicle_info
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
status
|
||||
}
|
||||
query QUERY_AVAILABLE_JOBS {
|
||||
available_jobs(order_by: { updated_at: desc }) {
|
||||
cieca_id
|
||||
clm_amt
|
||||
clm_no
|
||||
created_at
|
||||
id
|
||||
issupplement
|
||||
ownr_name
|
||||
source_system
|
||||
supplement_number
|
||||
updated_at
|
||||
uploaded_by
|
||||
ins_co_nm
|
||||
vehicle_info
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_AVAILABLE_NEW_JOBS = gql`
|
||||
query QUERY_AVAILABLE_NEW_JOBS {
|
||||
available_jobs(
|
||||
where: { issupplement: { _eq: false } }
|
||||
order_by: { updated_at: desc }
|
||||
) {
|
||||
cieca_id
|
||||
clm_amt
|
||||
clm_no
|
||||
created_at
|
||||
id
|
||||
issupplement
|
||||
ownr_name
|
||||
source_system
|
||||
supplement_number
|
||||
updated_at
|
||||
uploaded_by
|
||||
ins_co_nm
|
||||
vehicle_info
|
||||
query QUERY_AVAILABLE_NEW_JOBS {
|
||||
available_jobs(
|
||||
where: { issupplement: { _eq: false } }
|
||||
order_by: { updated_at: desc }
|
||||
) {
|
||||
cieca_id
|
||||
clm_amt
|
||||
clm_no
|
||||
created_at
|
||||
id
|
||||
issupplement
|
||||
ownr_name
|
||||
source_system
|
||||
supplement_number
|
||||
updated_at
|
||||
uploaded_by
|
||||
ins_co_nm
|
||||
vehicle_info
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_AVAILABLE_SUPPLEMENT_JOBS = gql`
|
||||
query QUERY_AVAILABLE_SUPPLEMENT_JOBS {
|
||||
available_jobs(
|
||||
where: { issupplement: { _eq: true } }
|
||||
order_by: { updated_at: desc }
|
||||
) {
|
||||
cieca_id
|
||||
clm_amt
|
||||
clm_no
|
||||
created_at
|
||||
id
|
||||
issupplement
|
||||
ownr_name
|
||||
source_system
|
||||
supplement_number
|
||||
updated_at
|
||||
uploaded_by
|
||||
ins_co_nm
|
||||
vehicle_info
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
query QUERY_AVAILABLE_SUPPLEMENT_JOBS {
|
||||
available_jobs(
|
||||
where: { issupplement: { _eq: true } }
|
||||
order_by: { updated_at: desc }
|
||||
) {
|
||||
cieca_id
|
||||
clm_amt
|
||||
clm_no
|
||||
created_at
|
||||
id
|
||||
issupplement
|
||||
ownr_name
|
||||
source_system
|
||||
supplement_number
|
||||
updated_at
|
||||
uploaded_by
|
||||
ins_co_nm
|
||||
vehicle_info
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_AVAILABLE_JOB = gql`
|
||||
mutation DELETE_AVAILABLE_JOB($id: uuid) {
|
||||
delete_available_jobs(where: { id: { _eq: $id } }) {
|
||||
affected_rows
|
||||
mutation DELETE_AVAILABLE_JOB($id: uuid) {
|
||||
delete_available_jobs(where: { id: { _eq: $id } }) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_ALL_AVAILABLE_JOBS = gql`
|
||||
mutation DELETE_ALL_AVAILABLE_JOBS {
|
||||
delete_available_jobs(where: {}) {
|
||||
affected_rows
|
||||
mutation DELETE_ALL_AVAILABLE_JOBS {
|
||||
delete_available_jobs(where: {}) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_ALL_AVAILABLE_NEW_JOBS = gql`
|
||||
mutation DELETE_ALL_AVAILABLE_NEW_JOBS {
|
||||
delete_available_jobs(where: { issupplement: { _eq: false } }) {
|
||||
affected_rows
|
||||
mutation DELETE_ALL_AVAILABLE_NEW_JOBS {
|
||||
delete_available_jobs(where: { issupplement: { _eq: false } }) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_ALL_AVAILABLE_SUPPLEMENT_JOBS = gql`
|
||||
mutation DELETE_ALL_AVAILABLE_NEW_JOBS {
|
||||
delete_available_jobs(where: { issupplement: { _eq: true } }) {
|
||||
affected_rows
|
||||
mutation DELETE_ALL_AVAILABLE_NEW_JOBS {
|
||||
delete_available_jobs(where: { issupplement: { _eq: true } }) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_AVAILABLE_NEW_JOBS_EST_DATA_BY_PK = gql`
|
||||
query QUERY_AVAILABLE_NEW_JOBS_EST_DATA_BY_PK($id: uuid!) {
|
||||
available_jobs_by_pk(id: $id) {
|
||||
id
|
||||
issupplement
|
||||
est_data
|
||||
query QUERY_AVAILABLE_NEW_JOBS_EST_DATA_BY_PK($id: uuid!) {
|
||||
available_jobs_by_pk(id: $id) {
|
||||
id
|
||||
issupplement
|
||||
est_data
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const UPDATE_BILL_LINE = gql`
|
||||
mutation UPDATE_BILL_LINE(
|
||||
$billLineId: uuid!
|
||||
$billLine: billlines_set_input!
|
||||
) {
|
||||
update_billlines(where: { id: { _eq: $billLineId } }, _set: $billLine) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation UPDATE_BILL_LINE(
|
||||
$billLineId: uuid!
|
||||
$billLine: billlines_set_input!
|
||||
) {
|
||||
update_billlines(where: { id: { _eq: $billLineId } }, _set: $billLine) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const DELETE_BILL_LINE = gql`
|
||||
mutation DELETE_BILL_LINE($id: uuid!) {
|
||||
delete_billlines_by_pk(id: $id) {
|
||||
id
|
||||
mutation DELETE_BILL_LINE($id: uuid!) {
|
||||
delete_billlines_by_pk(id: $id) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_NEW_BILL_LINES = gql`
|
||||
mutation INSERT_NEW_BILL_LINES($billLines: [billlines_insert_input!]!) {
|
||||
insert_billlines(objects: $billLines) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation INSERT_NEW_BILL_LINES($billLines: [billlines_insert_input!]!) {
|
||||
insert_billlines(objects: $billLines) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,250 +1,250 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const INSERT_NEW_BILL = gql`
|
||||
mutation INSERT_NEW_BILL($bill: [bills_insert_input!]!) {
|
||||
insert_bills(objects: $bill) {
|
||||
returning {
|
||||
id
|
||||
invoice_number
|
||||
}
|
||||
mutation INSERT_NEW_BILL($bill: [bills_insert_input!]!) {
|
||||
insert_bills(objects: $bill) {
|
||||
returning {
|
||||
id
|
||||
invoice_number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_BILL = gql`
|
||||
mutation DELETE_BILL($billId: uuid!) {
|
||||
delete_bills_by_pk(id: $billId) {
|
||||
id
|
||||
mutation DELETE_BILL($billId: uuid!) {
|
||||
delete_bills_by_pk(id: $billId) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_ALL_BILLS_PAGINATED = gql`
|
||||
query QUERY_ALL_BILLS_PAGINATED(
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [bills_order_by!]!
|
||||
) {
|
||||
bills(offset: $offset, limit: $limit, order_by: $order) {
|
||||
id
|
||||
vendorid
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
}
|
||||
federal_tax_rate
|
||||
local_tax_rate
|
||||
state_tax_rate
|
||||
is_credit_memo
|
||||
total
|
||||
invoice_number
|
||||
date
|
||||
isinhouse
|
||||
exported
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
query QUERY_ALL_BILLS_PAGINATED(
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [bills_order_by!]!
|
||||
) {
|
||||
bills(offset: $offset, limit: $limit, order_by: $order) {
|
||||
id
|
||||
vendorid
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
}
|
||||
federal_tax_rate
|
||||
local_tax_rate
|
||||
state_tax_rate
|
||||
is_credit_memo
|
||||
total
|
||||
invoice_number
|
||||
date
|
||||
isinhouse
|
||||
exported
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
}
|
||||
bills_aggregate {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
bills_aggregate {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_BILLS_BY_JOBID = gql`
|
||||
query QUERY_PARTS_BILLS_BY_JOBID($jobid: uuid!) {
|
||||
parts_orders(
|
||||
where: { jobid: { _eq: $jobid } }
|
||||
order_by: { order_date: desc }
|
||||
) {
|
||||
id
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
email
|
||||
}
|
||||
order_date
|
||||
deliver_by
|
||||
return
|
||||
orderedby
|
||||
parts_order_lines {
|
||||
id
|
||||
act_price
|
||||
db_price
|
||||
line_desc
|
||||
oem_partno
|
||||
status
|
||||
line_remarks
|
||||
quantity
|
||||
job_line_id
|
||||
part_type
|
||||
cost
|
||||
cm_received
|
||||
jobline {
|
||||
id
|
||||
part_type
|
||||
query QUERY_PARTS_BILLS_BY_JOBID($jobid: uuid!) {
|
||||
parts_orders(
|
||||
where: { jobid: { _eq: $jobid } }
|
||||
order_by: { order_date: desc }
|
||||
) {
|
||||
id
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
email
|
||||
}
|
||||
order_date
|
||||
deliver_by
|
||||
return
|
||||
orderedby
|
||||
parts_order_lines {
|
||||
id
|
||||
act_price
|
||||
db_price
|
||||
line_desc
|
||||
oem_partno
|
||||
status
|
||||
line_remarks
|
||||
quantity
|
||||
job_line_id
|
||||
part_type
|
||||
cost
|
||||
cm_received
|
||||
jobline {
|
||||
id
|
||||
part_type
|
||||
}
|
||||
backordered_eta
|
||||
backordered_on
|
||||
}
|
||||
order_number
|
||||
comments
|
||||
user_email
|
||||
}
|
||||
backordered_eta
|
||||
backordered_on
|
||||
}
|
||||
order_number
|
||||
comments
|
||||
user_email
|
||||
}
|
||||
parts_dispatch(where: { jobid: { _eq: $jobid } }) {
|
||||
id
|
||||
dispatched_at
|
||||
dispatched_by
|
||||
employeeid
|
||||
number
|
||||
parts_dispatch_lines {
|
||||
joblineid
|
||||
id
|
||||
quantity
|
||||
accepted_at
|
||||
jobline {
|
||||
id
|
||||
line_desc
|
||||
parts_dispatch(where: { jobid: { _eq: $jobid } }) {
|
||||
id
|
||||
dispatched_at
|
||||
dispatched_by
|
||||
employeeid
|
||||
number
|
||||
parts_dispatch_lines {
|
||||
joblineid
|
||||
id
|
||||
quantity
|
||||
accepted_at
|
||||
jobline {
|
||||
id
|
||||
line_desc
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
bills(where: { jobid: { _eq: $jobid } }, order_by: { date: desc }) {
|
||||
id
|
||||
vendorid
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
email
|
||||
}
|
||||
total
|
||||
invoice_number
|
||||
date
|
||||
federal_tax_rate
|
||||
state_tax_rate
|
||||
local_tax_rate
|
||||
is_credit_memo
|
||||
isinhouse
|
||||
exported
|
||||
billlines {
|
||||
actual_price
|
||||
quantity
|
||||
actual_cost
|
||||
cost_center
|
||||
id
|
||||
joblineid
|
||||
line_desc
|
||||
applicable_taxes
|
||||
deductedfromlbr
|
||||
lbr_adjustment
|
||||
jobline {
|
||||
oem_partno
|
||||
part_type
|
||||
bills(where: { jobid: { _eq: $jobid } }, order_by: { date: desc }) {
|
||||
id
|
||||
vendorid
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
email
|
||||
}
|
||||
total
|
||||
invoice_number
|
||||
date
|
||||
federal_tax_rate
|
||||
state_tax_rate
|
||||
local_tax_rate
|
||||
is_credit_memo
|
||||
isinhouse
|
||||
exported
|
||||
billlines {
|
||||
actual_price
|
||||
quantity
|
||||
actual_cost
|
||||
cost_center
|
||||
id
|
||||
joblineid
|
||||
line_desc
|
||||
applicable_taxes
|
||||
deductedfromlbr
|
||||
lbr_adjustment
|
||||
jobline {
|
||||
oem_partno
|
||||
part_type
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_BILL_BY_PK = gql`
|
||||
query QUERY_BILL_BY_PK($billid: uuid!) {
|
||||
bills_by_pk(id: $billid) {
|
||||
due_date
|
||||
exported
|
||||
exported_at
|
||||
id
|
||||
invoice_number
|
||||
date
|
||||
is_credit_memo
|
||||
jobid
|
||||
total
|
||||
updated_at
|
||||
vendorid
|
||||
local_tax_rate
|
||||
state_tax_rate
|
||||
federal_tax_rate
|
||||
isinhouse
|
||||
inventories {
|
||||
id
|
||||
line_desc
|
||||
}
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
discount
|
||||
}
|
||||
billlines {
|
||||
id
|
||||
line_desc
|
||||
actual_price
|
||||
actual_cost
|
||||
cost_center
|
||||
quantity
|
||||
joblineid
|
||||
inventories {
|
||||
id
|
||||
query QUERY_BILL_BY_PK($billid: uuid!) {
|
||||
bills_by_pk(id: $billid) {
|
||||
due_date
|
||||
exported
|
||||
exported_at
|
||||
id
|
||||
invoice_number
|
||||
date
|
||||
is_credit_memo
|
||||
jobid
|
||||
total
|
||||
updated_at
|
||||
vendorid
|
||||
local_tax_rate
|
||||
state_tax_rate
|
||||
federal_tax_rate
|
||||
isinhouse
|
||||
inventories {
|
||||
id
|
||||
line_desc
|
||||
}
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
discount
|
||||
}
|
||||
billlines {
|
||||
id
|
||||
line_desc
|
||||
actual_price
|
||||
actual_cost
|
||||
cost_center
|
||||
quantity
|
||||
joblineid
|
||||
inventories {
|
||||
id
|
||||
}
|
||||
jobline {
|
||||
oem_partno
|
||||
part_type
|
||||
}
|
||||
applicable_taxes
|
||||
deductedfromlbr
|
||||
lbr_adjustment
|
||||
}
|
||||
documents {
|
||||
id
|
||||
key
|
||||
name
|
||||
type
|
||||
size
|
||||
}
|
||||
}
|
||||
jobline {
|
||||
oem_partno
|
||||
part_type
|
||||
}
|
||||
applicable_taxes
|
||||
deductedfromlbr
|
||||
lbr_adjustment
|
||||
}
|
||||
documents {
|
||||
id
|
||||
key
|
||||
name
|
||||
type
|
||||
size
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_BILL = gql`
|
||||
mutation UPDATE_BILL($billId: uuid!, $bill: bills_set_input!) {
|
||||
update_bills(where: { id: { _eq: $billId } }, _set: $bill) {
|
||||
returning {
|
||||
id
|
||||
exported
|
||||
exported_at
|
||||
}
|
||||
mutation UPDATE_BILL($billId: uuid!, $bill: bills_set_input!) {
|
||||
update_bills(where: { id: { _eq: $billId } }, _set: $bill) {
|
||||
returning {
|
||||
id
|
||||
exported
|
||||
exported_at
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_BILLS = gql`
|
||||
mutation UPDATE_BILLS($billIdList: [uuid!]!, $bill: bills_set_input!) {
|
||||
update_bills(where: { id: { _in: $billIdList } }, _set: $bill) {
|
||||
returning {
|
||||
id
|
||||
exported
|
||||
exported_at
|
||||
}
|
||||
mutation UPDATE_BILLS($billIdList: [uuid!]!, $bill: bills_set_input!) {
|
||||
update_bills(where: { id: { _in: $billIdList } }, _set: $bill) {
|
||||
returning {
|
||||
id
|
||||
exported
|
||||
exported_at
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CHECK_BILL_INVOICE_NUMBER = gql`
|
||||
query CHECK_BILL_INVOICE_NUMBER($invoice_number: String!, $vendorid: uuid!) {
|
||||
bills_aggregate(
|
||||
where: {
|
||||
_and: {
|
||||
invoice_number: { _ilike: $invoice_number }
|
||||
vendorid: { _eq: $vendorid }
|
||||
query CHECK_BILL_INVOICE_NUMBER($invoice_number: String!, $vendorid: uuid!) {
|
||||
bills_aggregate(
|
||||
where: {
|
||||
_and: {
|
||||
invoice_number: { _ilike: $invoice_number }
|
||||
vendorid: { _eq: $vendorid }
|
||||
}
|
||||
}
|
||||
) {
|
||||
aggregate {
|
||||
count
|
||||
}
|
||||
nodes {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
) {
|
||||
aggregate {
|
||||
count
|
||||
}
|
||||
nodes {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,358 +1,359 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const INTROSPECTION = gql`
|
||||
query INTROSPECTION {
|
||||
__schema {
|
||||
types {
|
||||
name
|
||||
}
|
||||
query INTROSPECTION {
|
||||
__schema {
|
||||
types {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_EULA = gql`
|
||||
query QUERY_EULA($now: timestamptz!) {
|
||||
eulas(where: {effective_date: {_lte: $now}, _or: [{end_date: {_is_null: true}}, {end_date: {_gt: $now}}]}) {
|
||||
id
|
||||
content
|
||||
query QUERY_EULA($now: timestamptz!) {
|
||||
eulas(where: {effective_date: {_lte: $now}, _or: [{end_date: {_is_null: true}}, {end_date: {_gt: $now}}]}) {
|
||||
id
|
||||
content
|
||||
|
||||
eula_acceptances {
|
||||
id
|
||||
date_accepted
|
||||
}
|
||||
eula_acceptances {
|
||||
id
|
||||
date_accepted
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_BODYSHOP = gql`
|
||||
query QUERY_BODYSHOP {
|
||||
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||
associations {
|
||||
id
|
||||
authlevel
|
||||
useremail
|
||||
default_prod_list_view
|
||||
user {
|
||||
authid
|
||||
email
|
||||
dashboardlayout
|
||||
validemail
|
||||
employee {
|
||||
query QUERY_BODYSHOP {
|
||||
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||
associations {
|
||||
id
|
||||
authlevel
|
||||
useremail
|
||||
default_prod_list_view
|
||||
user {
|
||||
authid
|
||||
email
|
||||
dashboardlayout
|
||||
validemail
|
||||
employee {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
address1
|
||||
address2
|
||||
city
|
||||
country
|
||||
created_at
|
||||
email
|
||||
phone
|
||||
federal_tax_id
|
||||
id
|
||||
}
|
||||
insurance_vendor_id
|
||||
logo_img_path
|
||||
md_ro_statuses
|
||||
md_order_statuses
|
||||
md_functionality_toggles
|
||||
shopname
|
||||
state
|
||||
state_tax_id
|
||||
updated_at
|
||||
zip_post
|
||||
shoprates
|
||||
region_config
|
||||
md_responsibility_centers
|
||||
messagingservicesid
|
||||
template_header
|
||||
textid
|
||||
production_config
|
||||
bill_tax_rates
|
||||
inhousevendorid
|
||||
accountingconfig
|
||||
appt_length
|
||||
stripe_acct_id
|
||||
ssbuckets
|
||||
scoreboard_target
|
||||
md_referral_sources
|
||||
md_messaging_presets
|
||||
intakechecklist
|
||||
speedprint
|
||||
md_parts_locations
|
||||
md_notes_presets
|
||||
md_rbac
|
||||
prodtargethrs
|
||||
md_classes
|
||||
md_ins_cos
|
||||
md_categories
|
||||
enforce_class
|
||||
md_labor_rates
|
||||
deliverchecklist
|
||||
target_touchtime
|
||||
appt_colors
|
||||
appt_alt_transport
|
||||
schedule_start_time
|
||||
schedule_end_time
|
||||
imexshopid
|
||||
default_adjustment_rate
|
||||
workingdays
|
||||
use_fippa
|
||||
md_payment_types
|
||||
md_hour_split
|
||||
sub_status
|
||||
jobsizelimit
|
||||
md_ccc_rates
|
||||
enforce_referral
|
||||
website
|
||||
jc_hourly_rates
|
||||
md_jobline_presets
|
||||
cdk_dealerid
|
||||
features
|
||||
attach_pdf_to_email
|
||||
tt_allow_post_to_invoiced
|
||||
cdk_configuration
|
||||
md_estimators
|
||||
md_ded_notes
|
||||
pbs_configuration
|
||||
pbs_serialnumber
|
||||
md_filehandlers
|
||||
md_email_cc
|
||||
timezone
|
||||
ss_configuration
|
||||
md_from_emails
|
||||
last_name_first
|
||||
md_parts_order_comment
|
||||
bill_allow_post_to_closed
|
||||
md_to_emails
|
||||
uselocalmediaserver
|
||||
localmediaserverhttp
|
||||
localmediaservernetwork
|
||||
localmediatoken
|
||||
enforce_conversion_csr
|
||||
md_lost_sale_reasons
|
||||
md_parts_scan
|
||||
enforce_conversion_category
|
||||
tt_enforce_hours_for_tech_console
|
||||
md_tasks_presets
|
||||
use_paint_scale_data
|
||||
employee_teams(
|
||||
order_by: { name: asc }
|
||||
where: { active: { _eq: true } }
|
||||
) {
|
||||
id
|
||||
name
|
||||
employee_team_members {
|
||||
id
|
||||
employeeid
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
}
|
||||
employees {
|
||||
user_email
|
||||
id
|
||||
active
|
||||
first_name
|
||||
last_name
|
||||
employee_number
|
||||
rates
|
||||
external_id
|
||||
flat_rate
|
||||
}
|
||||
}
|
||||
}
|
||||
address1
|
||||
address2
|
||||
city
|
||||
country
|
||||
created_at
|
||||
email
|
||||
phone
|
||||
federal_tax_id
|
||||
id
|
||||
insurance_vendor_id
|
||||
logo_img_path
|
||||
md_ro_statuses
|
||||
md_order_statuses
|
||||
md_functionality_toggles
|
||||
shopname
|
||||
state
|
||||
state_tax_id
|
||||
updated_at
|
||||
zip_post
|
||||
shoprates
|
||||
region_config
|
||||
md_responsibility_centers
|
||||
messagingservicesid
|
||||
template_header
|
||||
textid
|
||||
production_config
|
||||
bill_tax_rates
|
||||
inhousevendorid
|
||||
accountingconfig
|
||||
appt_length
|
||||
stripe_acct_id
|
||||
ssbuckets
|
||||
scoreboard_target
|
||||
md_referral_sources
|
||||
md_messaging_presets
|
||||
intakechecklist
|
||||
speedprint
|
||||
md_parts_locations
|
||||
md_notes_presets
|
||||
md_rbac
|
||||
prodtargethrs
|
||||
md_classes
|
||||
md_ins_cos
|
||||
md_categories
|
||||
enforce_class
|
||||
md_labor_rates
|
||||
deliverchecklist
|
||||
target_touchtime
|
||||
appt_colors
|
||||
appt_alt_transport
|
||||
schedule_start_time
|
||||
schedule_end_time
|
||||
imexshopid
|
||||
default_adjustment_rate
|
||||
workingdays
|
||||
use_fippa
|
||||
md_payment_types
|
||||
md_hour_split
|
||||
sub_status
|
||||
jobsizelimit
|
||||
md_ccc_rates
|
||||
enforce_referral
|
||||
website
|
||||
jc_hourly_rates
|
||||
md_jobline_presets
|
||||
cdk_dealerid
|
||||
features
|
||||
attach_pdf_to_email
|
||||
tt_allow_post_to_invoiced
|
||||
cdk_configuration
|
||||
md_estimators
|
||||
md_ded_notes
|
||||
pbs_configuration
|
||||
pbs_serialnumber
|
||||
md_filehandlers
|
||||
md_email_cc
|
||||
timezone
|
||||
ss_configuration
|
||||
md_from_emails
|
||||
last_name_first
|
||||
md_parts_order_comment
|
||||
bill_allow_post_to_closed
|
||||
md_to_emails
|
||||
uselocalmediaserver
|
||||
localmediaserverhttp
|
||||
localmediaservernetwork
|
||||
localmediatoken
|
||||
enforce_conversion_csr
|
||||
md_lost_sale_reasons
|
||||
md_parts_scan
|
||||
enforce_conversion_category
|
||||
tt_enforce_hours_for_tech_console
|
||||
md_tasks_presets
|
||||
use_paint_scale_data
|
||||
employee_teams(
|
||||
order_by: { name: asc }
|
||||
where: { active: { _eq: true } }
|
||||
) {
|
||||
id
|
||||
name
|
||||
employee_team_members {
|
||||
id
|
||||
employeeid
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
}
|
||||
employees {
|
||||
user_email
|
||||
id
|
||||
active
|
||||
first_name
|
||||
last_name
|
||||
employee_number
|
||||
rates
|
||||
external_id
|
||||
flat_rate
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_SHOP_ID = gql`
|
||||
query QUERY_SHOP_ID {
|
||||
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||
id
|
||||
query QUERY_SHOP_ID {
|
||||
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_SHOP = gql`
|
||||
mutation UPDATE_SHOP($id: uuid, $shop: bodyshops_set_input!) {
|
||||
update_bodyshops(where: { id: { _eq: $id } }, _set: $shop) {
|
||||
returning {
|
||||
address1
|
||||
address2
|
||||
city
|
||||
country
|
||||
created_at
|
||||
email
|
||||
phone
|
||||
federal_tax_id
|
||||
id
|
||||
insurance_vendor_id
|
||||
logo_img_path
|
||||
md_ro_statuses
|
||||
md_order_statuses
|
||||
md_functionality_toggles
|
||||
shopname
|
||||
state
|
||||
state_tax_id
|
||||
updated_at
|
||||
zip_post
|
||||
shoprates
|
||||
region_config
|
||||
md_responsibility_centers
|
||||
messagingservicesid
|
||||
template_header
|
||||
textid
|
||||
production_config
|
||||
bill_tax_rates
|
||||
appt_length
|
||||
stripe_acct_id
|
||||
ssbuckets
|
||||
scoreboard_target
|
||||
md_referral_sources
|
||||
md_messaging_presets
|
||||
intakechecklist
|
||||
speedprint
|
||||
md_parts_locations
|
||||
md_notes_presets
|
||||
md_rbac
|
||||
prodtargethrs
|
||||
md_classes
|
||||
md_ins_cos
|
||||
md_categories
|
||||
enforce_class
|
||||
md_labor_rates
|
||||
deliverchecklist
|
||||
target_touchtime
|
||||
appt_colors
|
||||
appt_alt_transport
|
||||
schedule_start_time
|
||||
schedule_end_time
|
||||
imexshopid
|
||||
default_adjustment_rate
|
||||
workingdays
|
||||
use_fippa
|
||||
md_payment_types
|
||||
md_hour_split
|
||||
sub_status
|
||||
jobsizelimit
|
||||
md_ccc_rates
|
||||
enforce_referral
|
||||
website
|
||||
jc_hourly_rates
|
||||
md_jobline_presets
|
||||
cdk_dealerid
|
||||
attach_pdf_to_email
|
||||
tt_allow_post_to_invoiced
|
||||
cdk_configuration
|
||||
md_estimators
|
||||
md_ded_notes
|
||||
pbs_configuration
|
||||
pbs_serialnumber
|
||||
md_filehandlers
|
||||
md_email_cc
|
||||
timezone
|
||||
ss_configuration
|
||||
md_from_emails
|
||||
last_name_first
|
||||
md_parts_order_comment
|
||||
bill_allow_post_to_closed
|
||||
md_to_emails
|
||||
uselocalmediaserver
|
||||
localmediaserverhttp
|
||||
localmediaservernetwork
|
||||
localmediatoken
|
||||
enforce_conversion_csr
|
||||
md_lost_sale_reasons
|
||||
md_parts_scan
|
||||
enforce_conversion_category
|
||||
tt_enforce_hours_for_tech_console
|
||||
md_tasks_presets
|
||||
employee_teams(
|
||||
order_by: { name: asc }
|
||||
where: { active: { _eq: true } }
|
||||
) {
|
||||
id
|
||||
name
|
||||
employee_team_members {
|
||||
id
|
||||
employeeid
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
mutation UPDATE_SHOP($id: uuid, $shop: bodyshops_set_input!) {
|
||||
update_bodyshops(where: { id: { _eq: $id } }, _set: $shop) {
|
||||
returning {
|
||||
address1
|
||||
address2
|
||||
city
|
||||
country
|
||||
created_at
|
||||
email
|
||||
phone
|
||||
federal_tax_id
|
||||
id
|
||||
insurance_vendor_id
|
||||
logo_img_path
|
||||
md_ro_statuses
|
||||
md_order_statuses
|
||||
md_functionality_toggles
|
||||
shopname
|
||||
state
|
||||
state_tax_id
|
||||
updated_at
|
||||
zip_post
|
||||
shoprates
|
||||
region_config
|
||||
md_responsibility_centers
|
||||
messagingservicesid
|
||||
template_header
|
||||
textid
|
||||
production_config
|
||||
bill_tax_rates
|
||||
appt_length
|
||||
stripe_acct_id
|
||||
ssbuckets
|
||||
scoreboard_target
|
||||
md_referral_sources
|
||||
md_messaging_presets
|
||||
intakechecklist
|
||||
speedprint
|
||||
md_parts_locations
|
||||
md_notes_presets
|
||||
md_rbac
|
||||
prodtargethrs
|
||||
md_classes
|
||||
md_ins_cos
|
||||
md_categories
|
||||
enforce_class
|
||||
md_labor_rates
|
||||
deliverchecklist
|
||||
target_touchtime
|
||||
appt_colors
|
||||
appt_alt_transport
|
||||
schedule_start_time
|
||||
schedule_end_time
|
||||
imexshopid
|
||||
default_adjustment_rate
|
||||
workingdays
|
||||
use_fippa
|
||||
md_payment_types
|
||||
md_hour_split
|
||||
sub_status
|
||||
jobsizelimit
|
||||
md_ccc_rates
|
||||
enforce_referral
|
||||
website
|
||||
jc_hourly_rates
|
||||
md_jobline_presets
|
||||
cdk_dealerid
|
||||
attach_pdf_to_email
|
||||
tt_allow_post_to_invoiced
|
||||
cdk_configuration
|
||||
md_estimators
|
||||
md_ded_notes
|
||||
pbs_configuration
|
||||
pbs_serialnumber
|
||||
md_filehandlers
|
||||
md_email_cc
|
||||
timezone
|
||||
ss_configuration
|
||||
md_from_emails
|
||||
last_name_first
|
||||
md_parts_order_comment
|
||||
bill_allow_post_to_closed
|
||||
md_to_emails
|
||||
uselocalmediaserver
|
||||
localmediaserverhttp
|
||||
localmediaservernetwork
|
||||
localmediatoken
|
||||
enforce_conversion_csr
|
||||
md_lost_sale_reasons
|
||||
md_parts_scan
|
||||
enforce_conversion_category
|
||||
tt_enforce_hours_for_tech_console
|
||||
md_tasks_presets
|
||||
employee_teams(
|
||||
order_by: { name: asc }
|
||||
where: { active: { _eq: true } }
|
||||
) {
|
||||
id
|
||||
name
|
||||
employee_team_members {
|
||||
id
|
||||
employeeid
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
}
|
||||
employees {
|
||||
id
|
||||
first_name
|
||||
active
|
||||
last_name
|
||||
employee_number
|
||||
rates
|
||||
user_email
|
||||
external_id
|
||||
}
|
||||
}
|
||||
}
|
||||
employees {
|
||||
id
|
||||
first_name
|
||||
active
|
||||
last_name
|
||||
employee_number
|
||||
rates
|
||||
user_email
|
||||
external_id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const QUERY_INTAKE_CHECKLIST = gql`
|
||||
query QUERY_INTAKE_CHECKLIST($shopId: uuid!, $jobId: uuid!) {
|
||||
bodyshops_by_pk(id: $shopId) {
|
||||
id
|
||||
intakechecklist
|
||||
query QUERY_INTAKE_CHECKLIST($shopId: uuid!, $jobId: uuid!) {
|
||||
bodyshops_by_pk(id: $shopId) {
|
||||
id
|
||||
intakechecklist
|
||||
}
|
||||
jobs_by_pk(id: $jobId) {
|
||||
id
|
||||
ro_number
|
||||
production_vars
|
||||
scheduled_completion
|
||||
scheduled_delivery
|
||||
intakechecklist
|
||||
status
|
||||
owner {
|
||||
allow_text_message
|
||||
id
|
||||
}
|
||||
labhrs: joblines_aggregate(
|
||||
where: {
|
||||
_and: [{ mod_lbr_ty: { _neq: "LAR" } }, { removed: { _eq: false } }]
|
||||
}
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
larhrs: joblines_aggregate(
|
||||
where: {
|
||||
_and: [{ mod_lbr_ty: { _eq: "LAR" } }, { removed: { _eq: false } }]
|
||||
}
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
jobs_by_pk(id: $jobId) {
|
||||
id
|
||||
ro_number
|
||||
production_vars
|
||||
scheduled_completion
|
||||
scheduled_delivery
|
||||
intakechecklist
|
||||
status
|
||||
owner {
|
||||
allow_text_message
|
||||
id
|
||||
}
|
||||
labhrs: joblines_aggregate(
|
||||
where: {
|
||||
_and: [{ mod_lbr_ty: { _neq: "LAR" } }, { removed: { _eq: false } }]
|
||||
}
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
larhrs: joblines_aggregate(
|
||||
where: {
|
||||
_and: [{ mod_lbr_ty: { _eq: "LAR" } }, { removed: { _eq: false } }]
|
||||
}
|
||||
) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const QUERY_DELIVER_CHECKLIST = gql`
|
||||
query QUERY_DELIVER_CHECKLIST($shopId: uuid!, $jobId: uuid!) {
|
||||
bodyshops_by_pk(id: $shopId) {
|
||||
id
|
||||
deliverchecklist
|
||||
query QUERY_DELIVER_CHECKLIST($shopId: uuid!, $jobId: uuid!) {
|
||||
bodyshops_by_pk(id: $shopId) {
|
||||
id
|
||||
deliverchecklist
|
||||
}
|
||||
jobs_by_pk(id: $jobId) {
|
||||
id
|
||||
ro_number
|
||||
actual_completion
|
||||
actual_delivery
|
||||
}
|
||||
}
|
||||
jobs_by_pk(id: $jobId) {
|
||||
id
|
||||
ro_number
|
||||
actual_completion
|
||||
actual_delivery
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const QUERY_STRIPE_ID = gql`
|
||||
query QUERY_STRIPE_ID {
|
||||
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||
stripe_acct_id
|
||||
query QUERY_STRIPE_ID {
|
||||
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||
stripe_acct_id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,233 +1,233 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const INSERT_NEW_CONTRACT = gql`
|
||||
mutation INSERT_NEW_CONTRACT(
|
||||
$contract: [cccontracts_insert_input!]!
|
||||
$ccId: uuid!
|
||||
$damage: String
|
||||
$mileage: numeric
|
||||
) {
|
||||
insert_cccontracts(objects: $contract) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
update_courtesycars_by_pk(
|
||||
pk_columns: { id: $ccId }
|
||||
_set: {
|
||||
status: "courtesycars.status.out"
|
||||
mileage: $mileage
|
||||
damage: $damage
|
||||
}
|
||||
mutation INSERT_NEW_CONTRACT(
|
||||
$contract: [cccontracts_insert_input!]!
|
||||
$ccId: uuid!
|
||||
$damage: String
|
||||
$mileage: numeric
|
||||
) {
|
||||
status
|
||||
id
|
||||
damage
|
||||
mileage
|
||||
insert_cccontracts(objects: $contract) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
update_courtesycars_by_pk(
|
||||
pk_columns: { id: $ccId }
|
||||
_set: {
|
||||
status: "courtesycars.status.out"
|
||||
mileage: $mileage
|
||||
damage: $damage
|
||||
}
|
||||
) {
|
||||
status
|
||||
id
|
||||
damage
|
||||
mileage
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_CONTRACT = gql`
|
||||
mutation UPDATE_CONTRACT(
|
||||
$contractId: uuid!
|
||||
$cccontract: cccontracts_set_input!
|
||||
) {
|
||||
update_cccontracts(where: { id: { _eq: $contractId } }, _set: $cccontract) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation UPDATE_CONTRACT(
|
||||
$contractId: uuid!
|
||||
$cccontract: cccontracts_set_input!
|
||||
) {
|
||||
update_cccontracts(where: { id: { _eq: $contractId } }, _set: $cccontract) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const RETURN_CONTRACT = gql`
|
||||
mutation RETURN_CONTRACT(
|
||||
$contractId: uuid!
|
||||
$cccontract: cccontracts_set_input!
|
||||
$courtesycarid: uuid!
|
||||
$courtesycar: courtesycars_set_input!
|
||||
) {
|
||||
update_cccontracts(where: { id: { _eq: $contractId } }, _set: $cccontract) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
update_courtesycars(
|
||||
where: { id: { _eq: $courtesycarid } }
|
||||
_set: $courtesycar
|
||||
mutation RETURN_CONTRACT(
|
||||
$contractId: uuid!
|
||||
$cccontract: cccontracts_set_input!
|
||||
$courtesycarid: uuid!
|
||||
$courtesycar: courtesycars_set_input!
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
update_cccontracts(where: { id: { _eq: $contractId } }, _set: $cccontract) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
update_courtesycars(
|
||||
where: { id: { _eq: $courtesycarid } }
|
||||
_set: $courtesycar
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_CONTRACT_BY_PK = gql`
|
||||
query QUERY_CONTRACT_BY_PK($id: uuid!) {
|
||||
cccontracts_by_pk(id: $id) {
|
||||
actualreturn
|
||||
agreementnumber
|
||||
courtesycarid
|
||||
driver_addr1
|
||||
driver_city
|
||||
driver_addr2
|
||||
driver_dlexpiry
|
||||
driver_dlnumber
|
||||
driver_dlst
|
||||
driver_dob
|
||||
driver_fn
|
||||
driver_ln
|
||||
driver_ph1
|
||||
driver_state
|
||||
driver_zip
|
||||
id
|
||||
jobid
|
||||
dailyrate
|
||||
actax
|
||||
dailyfreekm
|
||||
refuelcharge
|
||||
excesskmrate
|
||||
cleanupcharge
|
||||
damagewaiver
|
||||
federaltax
|
||||
statetax
|
||||
localtax
|
||||
coverage
|
||||
fuelin
|
||||
fuelout
|
||||
damage
|
||||
job {
|
||||
id
|
||||
query QUERY_CONTRACT_BY_PK($id: uuid!) {
|
||||
cccontracts_by_pk(id: $id) {
|
||||
actualreturn
|
||||
agreementnumber
|
||||
courtesycarid
|
||||
driver_addr1
|
||||
driver_city
|
||||
driver_addr2
|
||||
driver_dlexpiry
|
||||
driver_dlnumber
|
||||
driver_dlst
|
||||
driver_dob
|
||||
driver_fn
|
||||
driver_ln
|
||||
driver_ph1
|
||||
driver_state
|
||||
driver_zip
|
||||
id
|
||||
jobid
|
||||
dailyrate
|
||||
actax
|
||||
dailyfreekm
|
||||
refuelcharge
|
||||
excesskmrate
|
||||
cleanupcharge
|
||||
damagewaiver
|
||||
federaltax
|
||||
statetax
|
||||
localtax
|
||||
coverage
|
||||
fuelin
|
||||
fuelout
|
||||
damage
|
||||
job {
|
||||
id
|
||||
|
||||
ro_number
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
clm_no
|
||||
scheduled_completion
|
||||
ownerid
|
||||
vehicleid
|
||||
owner {
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
id
|
||||
ownr_co_nm
|
||||
ro_number
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
clm_no
|
||||
scheduled_completion
|
||||
ownerid
|
||||
vehicleid
|
||||
owner {
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
id
|
||||
ownr_co_nm
|
||||
}
|
||||
vehicle {
|
||||
id
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
v_vin
|
||||
}
|
||||
}
|
||||
kmend
|
||||
kmstart
|
||||
scheduledreturn
|
||||
start
|
||||
status
|
||||
updated_at
|
||||
courtesycar {
|
||||
id
|
||||
fleetnumber
|
||||
make
|
||||
model
|
||||
year
|
||||
plate
|
||||
}
|
||||
}
|
||||
vehicle {
|
||||
id
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
v_vin
|
||||
}
|
||||
}
|
||||
kmend
|
||||
kmstart
|
||||
scheduledreturn
|
||||
start
|
||||
status
|
||||
updated_at
|
||||
courtesycar {
|
||||
id
|
||||
fleetnumber
|
||||
make
|
||||
model
|
||||
year
|
||||
plate
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_ACTIVE_CONTRACTS_PAGINATED = gql`
|
||||
query QUERY_ACTIVE_CONTRACTS_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [cccontracts_order_by!]!
|
||||
) {
|
||||
search_cccontracts(
|
||||
args: { search: $search }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
query QUERY_ACTIVE_CONTRACTS_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [cccontracts_order_by!]!
|
||||
) {
|
||||
agreementnumber
|
||||
courtesycarid
|
||||
driver_fn
|
||||
driver_ln
|
||||
driver_ph1
|
||||
id
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
}
|
||||
scheduledreturn
|
||||
actualreturn
|
||||
start
|
||||
status
|
||||
courtesycar {
|
||||
id
|
||||
fleetnumber
|
||||
make
|
||||
model
|
||||
year
|
||||
plate
|
||||
}
|
||||
search_cccontracts(
|
||||
args: { search: $search }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
) {
|
||||
agreementnumber
|
||||
courtesycarid
|
||||
driver_fn
|
||||
driver_ln
|
||||
driver_ph1
|
||||
id
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
}
|
||||
scheduledreturn
|
||||
actualreturn
|
||||
start
|
||||
status
|
||||
courtesycar {
|
||||
id
|
||||
fleetnumber
|
||||
make
|
||||
model
|
||||
year
|
||||
plate
|
||||
}
|
||||
}
|
||||
search_cccontracts_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
search_cccontracts_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const FIND_CONTRACT = gql`
|
||||
query FIND_CONTRACT($plate: String, $time: timestamptz!) {
|
||||
cccontracts(
|
||||
where: {
|
||||
_or: [
|
||||
{ actualreturn: { _gte: $time } }
|
||||
{ actualreturn: { _is_null: true } }
|
||||
]
|
||||
start: { _lte: $time }
|
||||
courtesycar: { plate: { _eq: $plate } }
|
||||
}
|
||||
) {
|
||||
agreementnumber
|
||||
courtesycarid
|
||||
driver_fn
|
||||
driver_ln
|
||||
driver_ph1
|
||||
id
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
}
|
||||
scheduledreturn
|
||||
actualreturn
|
||||
start
|
||||
status
|
||||
courtesycar {
|
||||
id
|
||||
fleetnumber
|
||||
make
|
||||
model
|
||||
year
|
||||
plate
|
||||
}
|
||||
query FIND_CONTRACT($plate: String, $time: timestamptz!) {
|
||||
cccontracts(
|
||||
where: {
|
||||
_or: [
|
||||
{ actualreturn: { _gte: $time } }
|
||||
{ actualreturn: { _is_null: true } }
|
||||
]
|
||||
start: { _lte: $time }
|
||||
courtesycar: { plate: { _eq: $plate } }
|
||||
}
|
||||
) {
|
||||
agreementnumber
|
||||
courtesycarid
|
||||
driver_fn
|
||||
driver_ln
|
||||
driver_ph1
|
||||
id
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
}
|
||||
scheduledreturn
|
||||
actualreturn
|
||||
start
|
||||
status
|
||||
courtesycar {
|
||||
id
|
||||
fleetnumber
|
||||
make
|
||||
model
|
||||
year
|
||||
plate
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,134 +1,134 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const UNREAD_CONVERSATION_COUNT = gql`
|
||||
query UNREAD_CONVERSATION_COUNT {
|
||||
messages_aggregate(
|
||||
where: { read: { _eq: false }, isoutbound: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
count
|
||||
}
|
||||
query UNREAD_CONVERSATION_COUNT {
|
||||
messages_aggregate(
|
||||
where: { read: { _eq: false }, isoutbound: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
count
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CONVERSATION_LIST_QUERY = gql`
|
||||
query CONVERSATION_LIST_QUERY($offset: Int!) {
|
||||
conversations(
|
||||
order_by: { updated_at: desc }
|
||||
limit: 50
|
||||
offset: $offset
|
||||
where: { archived: { _eq: false } }
|
||||
) {
|
||||
phone_num
|
||||
id
|
||||
updated_at
|
||||
unreadcnt
|
||||
archived
|
||||
label
|
||||
messages_aggregate(
|
||||
where: { read: { _eq: false }, isoutbound: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
count
|
||||
query CONVERSATION_LIST_QUERY($offset: Int!) {
|
||||
conversations(
|
||||
order_by: { updated_at: desc }
|
||||
limit: 50
|
||||
offset: $offset
|
||||
where: { archived: { _eq: false } }
|
||||
) {
|
||||
phone_num
|
||||
id
|
||||
updated_at
|
||||
unreadcnt
|
||||
archived
|
||||
label
|
||||
messages_aggregate(
|
||||
where: { read: { _eq: false }, isoutbound: { _eq: false } }
|
||||
) {
|
||||
aggregate {
|
||||
count
|
||||
}
|
||||
}
|
||||
job_conversations {
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
job_conversations {
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CONVERSATION_SUBSCRIPTION_BY_PK = gql`
|
||||
subscription CONVERSATION_SUBSCRIPTION_BY_PK($conversationId: uuid!) {
|
||||
messages(
|
||||
order_by: { created_at: asc_nulls_first }
|
||||
where: { conversationid: { _eq: $conversationId } }
|
||||
) {
|
||||
id
|
||||
status
|
||||
text
|
||||
isoutbound
|
||||
image
|
||||
image_path
|
||||
userid
|
||||
created_at
|
||||
read
|
||||
subscription CONVERSATION_SUBSCRIPTION_BY_PK($conversationId: uuid!) {
|
||||
messages(
|
||||
order_by: { created_at: asc_nulls_first }
|
||||
where: { conversationid: { _eq: $conversationId } }
|
||||
) {
|
||||
id
|
||||
status
|
||||
text
|
||||
isoutbound
|
||||
image
|
||||
image_path
|
||||
userid
|
||||
created_at
|
||||
read
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_CONVERSATION_DETAILS = gql`
|
||||
query GET_CONVERSATION_DETAILS($conversationId: uuid!) {
|
||||
conversations_by_pk(id: $conversationId) {
|
||||
id
|
||||
phone_num
|
||||
archived
|
||||
label
|
||||
job_conversations {
|
||||
jobid
|
||||
conversationid
|
||||
job {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ro_number
|
||||
query GET_CONVERSATION_DETAILS($conversationId: uuid!) {
|
||||
conversations_by_pk(id: $conversationId) {
|
||||
id
|
||||
phone_num
|
||||
archived
|
||||
label
|
||||
job_conversations {
|
||||
jobid
|
||||
conversationid
|
||||
job {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ro_number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CONVERSATION_ID_BY_PHONE = gql`
|
||||
query CONVERSATION_ID_BY_PHONE($phone: String!) {
|
||||
conversations(where: { phone_num: { _eq: $phone } }) {
|
||||
id
|
||||
job_conversations {
|
||||
jobid
|
||||
id
|
||||
}
|
||||
query CONVERSATION_ID_BY_PHONE($phone: String!) {
|
||||
conversations(where: { phone_num: { _eq: $phone } }) {
|
||||
id
|
||||
job_conversations {
|
||||
jobid
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CREATE_CONVERSATION = gql`
|
||||
mutation CREATE_CONVERSATION($conversation: [conversations_insert_input!]!) {
|
||||
insert_conversations(objects: $conversation) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation CREATE_CONVERSATION($conversation: [conversations_insert_input!]!) {
|
||||
insert_conversations(objects: $conversation) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const TOGGLE_CONVERSATION_ARCHIVE = gql`
|
||||
mutation TOGGLE_CONVERSATION_ARCHIVE($id: uuid!, $archived: Boolean) {
|
||||
update_conversations_by_pk(
|
||||
pk_columns: { id: $id }
|
||||
_set: { archived: $archived }
|
||||
) {
|
||||
archived
|
||||
id
|
||||
mutation TOGGLE_CONVERSATION_ARCHIVE($id: uuid!, $archived: Boolean) {
|
||||
update_conversations_by_pk(
|
||||
pk_columns: { id: $id }
|
||||
_set: { archived: $archived }
|
||||
) {
|
||||
archived
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_CONVERSATION_LABEL = gql`
|
||||
mutation UPDATE_CONVERSATION_LABEL($id: uuid!, $label: String) {
|
||||
update_conversations_by_pk(
|
||||
pk_columns: { id: $id }
|
||||
_set: { label: $label }
|
||||
) {
|
||||
label
|
||||
id
|
||||
mutation UPDATE_CONVERSATION_LABEL($id: uuid!, $label: String) {
|
||||
update_conversations_by_pk(
|
||||
pk_columns: { id: $id }
|
||||
_set: { label: $label }
|
||||
) {
|
||||
label
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,172 +1,172 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const INSERT_NEW_COURTESY_CAR = gql`
|
||||
mutation INSERT_NEW_COURTESY_CAR(
|
||||
$courtesycar: [courtesycars_insert_input!]!
|
||||
) {
|
||||
insert_courtesycars(objects: $courtesycar) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation INSERT_NEW_COURTESY_CAR(
|
||||
$courtesycar: [courtesycars_insert_input!]!
|
||||
) {
|
||||
insert_courtesycars(objects: $courtesycar) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_AVAILABLE_CC = gql`
|
||||
query QUERY_AVAILABLE_CC($today: date) {
|
||||
courtesycars(
|
||||
where: {
|
||||
_or: [
|
||||
{ serviceenddate: { _is_null: true } }
|
||||
{ serviceenddate: { _gt: $today } }
|
||||
]
|
||||
status: { _eq: "courtesycars.status.in" }
|
||||
}
|
||||
) {
|
||||
color
|
||||
dailycost
|
||||
damage
|
||||
fleetnumber
|
||||
fuel
|
||||
id
|
||||
make
|
||||
mileage
|
||||
model
|
||||
notes
|
||||
nextservicekm
|
||||
nextservicedate
|
||||
plate
|
||||
readiness
|
||||
status
|
||||
year
|
||||
query QUERY_AVAILABLE_CC($today: date) {
|
||||
courtesycars(
|
||||
where: {
|
||||
_or: [
|
||||
{ serviceenddate: { _is_null: true } }
|
||||
{ serviceenddate: { _gt: $today } }
|
||||
]
|
||||
status: { _eq: "courtesycars.status.in" }
|
||||
}
|
||||
) {
|
||||
color
|
||||
dailycost
|
||||
damage
|
||||
fleetnumber
|
||||
fuel
|
||||
id
|
||||
make
|
||||
mileage
|
||||
model
|
||||
notes
|
||||
nextservicekm
|
||||
nextservicedate
|
||||
plate
|
||||
readiness
|
||||
status
|
||||
year
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const CHECK_CC_FLEET_NUMBER = gql`
|
||||
query CHECK_VENDOR_NAME($name: String!) {
|
||||
courtesycars_aggregate(where: { fleetnumber: { _ilike: $name } }) {
|
||||
aggregate {
|
||||
count
|
||||
}
|
||||
nodes {
|
||||
id
|
||||
}
|
||||
query CHECK_VENDOR_NAME($name: String!) {
|
||||
courtesycars_aggregate(where: { fleetnumber: { _ilike: $name } }) {
|
||||
aggregate {
|
||||
count
|
||||
}
|
||||
nodes {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const QUERY_ALL_CC = gql`
|
||||
query QUERY_ALL_CC {
|
||||
courtesycars {
|
||||
color
|
||||
created_at
|
||||
dailycost
|
||||
damage
|
||||
fleetnumber
|
||||
fuel
|
||||
id
|
||||
insuranceexpires
|
||||
leaseenddate
|
||||
make
|
||||
mileage
|
||||
model
|
||||
nextservicedate
|
||||
nextservicekm
|
||||
notes
|
||||
plate
|
||||
purchasedate
|
||||
readiness
|
||||
registrationexpires
|
||||
serviceenddate
|
||||
servicestartdate
|
||||
status
|
||||
vin
|
||||
year
|
||||
cccontracts(
|
||||
where: { status: { _eq: "contracts.status.out" } }
|
||||
order_by: { contract_date: desc }
|
||||
limit: 1
|
||||
) {
|
||||
id
|
||||
scheduledreturn
|
||||
job {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ro_number
|
||||
query QUERY_ALL_CC {
|
||||
courtesycars {
|
||||
color
|
||||
created_at
|
||||
dailycost
|
||||
damage
|
||||
fleetnumber
|
||||
fuel
|
||||
id
|
||||
insuranceexpires
|
||||
leaseenddate
|
||||
make
|
||||
mileage
|
||||
model
|
||||
nextservicedate
|
||||
nextservicekm
|
||||
notes
|
||||
plate
|
||||
purchasedate
|
||||
readiness
|
||||
registrationexpires
|
||||
serviceenddate
|
||||
servicestartdate
|
||||
status
|
||||
vin
|
||||
year
|
||||
cccontracts(
|
||||
where: { status: { _eq: "contracts.status.out" } }
|
||||
order_by: { contract_date: desc }
|
||||
limit: 1
|
||||
) {
|
||||
id
|
||||
scheduledreturn
|
||||
job {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ro_number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_CC_BY_PK = gql`
|
||||
query QUERY_CC_BY_PK(
|
||||
$id: uuid!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [cccontracts_order_by!]!
|
||||
) {
|
||||
courtesycars_by_pk(id: $id) {
|
||||
bodyshopid
|
||||
color
|
||||
created_at
|
||||
dailycost
|
||||
damage
|
||||
fleetnumber
|
||||
fuel
|
||||
id
|
||||
insuranceexpires
|
||||
leaseenddate
|
||||
make
|
||||
mileage
|
||||
model
|
||||
nextservicedate
|
||||
nextservicekm
|
||||
notes
|
||||
plate
|
||||
purchasedate
|
||||
readiness
|
||||
registrationexpires
|
||||
serviceenddate
|
||||
servicestartdate
|
||||
status
|
||||
vin
|
||||
year
|
||||
cccontracts_aggregate {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
query QUERY_CC_BY_PK(
|
||||
$id: uuid!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [cccontracts_order_by!]!
|
||||
) {
|
||||
courtesycars_by_pk(id: $id) {
|
||||
bodyshopid
|
||||
color
|
||||
created_at
|
||||
dailycost
|
||||
damage
|
||||
fleetnumber
|
||||
fuel
|
||||
id
|
||||
insuranceexpires
|
||||
leaseenddate
|
||||
make
|
||||
mileage
|
||||
model
|
||||
nextservicedate
|
||||
nextservicekm
|
||||
notes
|
||||
plate
|
||||
purchasedate
|
||||
readiness
|
||||
registrationexpires
|
||||
serviceenddate
|
||||
servicestartdate
|
||||
status
|
||||
vin
|
||||
year
|
||||
cccontracts_aggregate {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
cccontracts(offset: $offset, limit: $limit, order_by: $order) {
|
||||
agreementnumber
|
||||
driver_fn
|
||||
driver_ln
|
||||
id
|
||||
kmstart
|
||||
kmend
|
||||
scheduledreturn
|
||||
start
|
||||
status
|
||||
job {
|
||||
id
|
||||
ownr_ln
|
||||
ownr_fn
|
||||
ownr_co_nm
|
||||
ro_number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cccontracts(offset: $offset, limit: $limit, order_by: $order) {
|
||||
agreementnumber
|
||||
driver_fn
|
||||
driver_ln
|
||||
id
|
||||
kmstart
|
||||
kmend
|
||||
scheduledreturn
|
||||
start
|
||||
status
|
||||
job {
|
||||
id
|
||||
ownr_ln
|
||||
ownr_fn
|
||||
ownr_co_nm
|
||||
ro_number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_CC = gql`
|
||||
mutation UPDATE_CC($ccId: uuid!, $cc: courtesycars_set_input!) {
|
||||
update_courtesycars(where: { id: { _eq: $ccId } }, _set: $cc) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation UPDATE_CC($ccId: uuid!, $cc: courtesycars_set_input!) {
|
||||
update_courtesycars(where: { id: { _eq: $ccId } }, _set: $cc) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,97 +1,97 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_SURVEY = gql`
|
||||
query QUERY_SURVEY($surveyId: uuid!) {
|
||||
csi_by_pk(id: $surveyId) {
|
||||
relateddata
|
||||
valid
|
||||
validuntil
|
||||
id
|
||||
csiquestion {
|
||||
id
|
||||
config
|
||||
}
|
||||
query QUERY_SURVEY($surveyId: uuid!) {
|
||||
csi_by_pk(id: $surveyId) {
|
||||
relateddata
|
||||
valid
|
||||
validuntil
|
||||
id
|
||||
csiquestion {
|
||||
id
|
||||
config
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const COMPLETE_SURVEY = gql`
|
||||
mutation COMPLETE_SURVEY($surveyId: uuid!, $survey: csi_set_input) {
|
||||
update_csi(where: { id: { _eq: $surveyId } }, _set: $survey) {
|
||||
affected_rows
|
||||
mutation COMPLETE_SURVEY($surveyId: uuid!, $survey: csi_set_input) {
|
||||
update_csi(where: { id: { _eq: $surveyId } }, _set: $survey) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_ALL_QUESTION_SETS = gql`
|
||||
query GET_ALL_QUESTION_SETS {
|
||||
csiquestions(order_by: { created_at: desc }) {
|
||||
id
|
||||
created_at
|
||||
config
|
||||
current
|
||||
csis_aggregate {
|
||||
aggregate {
|
||||
count
|
||||
query GET_ALL_QUESTION_SETS {
|
||||
csiquestions(order_by: { created_at: desc }) {
|
||||
id
|
||||
created_at
|
||||
config
|
||||
current
|
||||
csis_aggregate {
|
||||
aggregate {
|
||||
count
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_CURRENT_QUESTIONSET_ID = gql`
|
||||
query GET_CURRENT_QUESTIONSET_ID {
|
||||
csiquestions(where: { current: { _eq: true } }) {
|
||||
id
|
||||
query GET_CURRENT_QUESTIONSET_ID {
|
||||
csiquestions(where: { current: { _eq: true } }) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_CSI = gql`
|
||||
mutation INSERT_CSI($csiInput: [csi_insert_input!]!) {
|
||||
insert_csi(objects: $csiInput) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation INSERT_CSI($csiInput: [csi_insert_input!]!) {
|
||||
insert_csi(objects: $csiInput) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_CSI_RESPONSE_PAGINATED = gql`
|
||||
query QUERY_CSI_RESPONSE_PAGINATED(
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [csi_order_by!]!
|
||||
) {
|
||||
csi(offset: $offset, limit: $limit, order_by: $order) {
|
||||
id
|
||||
completedon
|
||||
job {
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ro_number
|
||||
query QUERY_CSI_RESPONSE_PAGINATED(
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [csi_order_by!]!
|
||||
) {
|
||||
csi(offset: $offset, limit: $limit, order_by: $order) {
|
||||
id
|
||||
completedon
|
||||
job {
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ro_number
|
||||
|
||||
id
|
||||
}
|
||||
id
|
||||
}
|
||||
}
|
||||
csi_aggregate {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
csi_aggregate {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const QUERY_CSI_RESPONSE_BY_PK = gql`
|
||||
query QUERY_CSI_RESPONSE_BY_PK($id: uuid!) {
|
||||
csi_by_pk(id: $id) {
|
||||
relateddata
|
||||
valid
|
||||
validuntil
|
||||
id
|
||||
response
|
||||
csiquestion {
|
||||
id
|
||||
config
|
||||
}
|
||||
query QUERY_CSI_RESPONSE_BY_PK($id: uuid!) {
|
||||
csi_by_pk(id: $id) {
|
||||
relateddata
|
||||
valid
|
||||
validuntil
|
||||
id
|
||||
response
|
||||
csiquestion {
|
||||
id
|
||||
config
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const SEARCH_DMS_VEHICLES = gql`
|
||||
query SEARCH_DMS_VEHICLES($search: String) {
|
||||
search_dms_vehicles(args: { search: $search }) {
|
||||
id
|
||||
make
|
||||
makecode
|
||||
model
|
||||
modelcode
|
||||
query SEARCH_DMS_VEHICLES($search: String) {
|
||||
search_dms_vehicles(args: { search: $search }) {
|
||||
id
|
||||
make
|
||||
makecode
|
||||
model
|
||||
modelcode
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,128 +1,128 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const GET_DOCUMENT_BY_PK = gql`
|
||||
query GET_DOCUMENT_BY_PK($documentId: uuid!) {
|
||||
documents_by_pk(id: $documentId) {
|
||||
id
|
||||
name
|
||||
key
|
||||
type
|
||||
size
|
||||
takenat
|
||||
extension
|
||||
jobid
|
||||
query GET_DOCUMENT_BY_PK($documentId: uuid!) {
|
||||
documents_by_pk(id: $documentId) {
|
||||
id
|
||||
name
|
||||
key
|
||||
type
|
||||
size
|
||||
takenat
|
||||
extension
|
||||
jobid
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_DOCUMENTS_BY_JOB = gql`
|
||||
query GET_DOCUMENTS_BY_JOB($jobId: uuid!) {
|
||||
jobs_by_pk(id: $jobId) {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
documents_aggregate(where: { jobid: { _eq: $jobId } }) {
|
||||
aggregate {
|
||||
sum {
|
||||
size
|
||||
query GET_DOCUMENTS_BY_JOB($jobId: uuid!) {
|
||||
jobs_by_pk(id: $jobId) {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
}
|
||||
}
|
||||
documents(order_by: { takenat: desc }, where: { jobid: { _eq: $jobId } }) {
|
||||
id
|
||||
name
|
||||
key
|
||||
type
|
||||
size
|
||||
takenat
|
||||
extension
|
||||
bill {
|
||||
id
|
||||
invoice_number
|
||||
date
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
documents_aggregate(where: { jobid: { _eq: $jobId } }) {
|
||||
aggregate {
|
||||
sum {
|
||||
size
|
||||
}
|
||||
}
|
||||
}
|
||||
documents(order_by: { takenat: desc }, where: { jobid: { _eq: $jobId } }) {
|
||||
id
|
||||
name
|
||||
key
|
||||
type
|
||||
size
|
||||
takenat
|
||||
extension
|
||||
bill {
|
||||
id
|
||||
invoice_number
|
||||
date
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_DOC_SIZE_BY_JOB = gql`
|
||||
query GET_DOC_SIZE_BY_JOB($jobId: uuid!) {
|
||||
documents_aggregate(where: { jobid: { _eq: $jobId } }) {
|
||||
aggregate {
|
||||
sum {
|
||||
size
|
||||
query GET_DOC_SIZE_BY_JOB($jobId: uuid!) {
|
||||
documents_aggregate(where: { jobid: { _eq: $jobId } }) {
|
||||
aggregate {
|
||||
sum {
|
||||
size
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_NEW_DOCUMENT = gql`
|
||||
mutation INSERT_NEW_DOCUMENT($docInput: [documents_insert_input!]!) {
|
||||
insert_documents(objects: $docInput) {
|
||||
returning {
|
||||
id
|
||||
name
|
||||
key
|
||||
size
|
||||
takenat
|
||||
}
|
||||
mutation INSERT_NEW_DOCUMENT($docInput: [documents_insert_input!]!) {
|
||||
insert_documents(objects: $docInput) {
|
||||
returning {
|
||||
id
|
||||
name
|
||||
key
|
||||
size
|
||||
takenat
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_DOCUMENT = gql`
|
||||
mutation DELETE_DOCUMENT($id: uuid) {
|
||||
delete_documents(where: { id: { _eq: $id } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation DELETE_DOCUMENT($id: uuid) {
|
||||
delete_documents(where: { id: { _eq: $id } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const DELETE_DOCUMENTS = gql`
|
||||
mutation DELETE_DOCUMENTS($ids: [uuid!]!) {
|
||||
delete_documents(where: { id: { _in: $ids } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation DELETE_DOCUMENTS($ids: [uuid!]!) {
|
||||
delete_documents(where: { id: { _in: $ids } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const QUERY_TEMPORARY_DOCS = gql`
|
||||
query QUERY_TEMPORARY_DOCS {
|
||||
documents(
|
||||
where: { jobid: { _is_null: true } }
|
||||
order_by: { takenat: desc }
|
||||
) {
|
||||
id
|
||||
name
|
||||
key
|
||||
type
|
||||
extension
|
||||
size
|
||||
takenat
|
||||
query QUERY_TEMPORARY_DOCS {
|
||||
documents(
|
||||
where: { jobid: { _is_null: true } }
|
||||
order_by: { takenat: desc }
|
||||
) {
|
||||
id
|
||||
name
|
||||
key
|
||||
type
|
||||
extension
|
||||
size
|
||||
takenat
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_DOCUMENT = gql`
|
||||
mutation UPDATE_DOCUMENT($id: uuid!, $document: documents_set_input!) {
|
||||
update_documents_by_pk(pk_columns: { id: $id }, _set: $document) {
|
||||
billid
|
||||
bodyshopid
|
||||
extension
|
||||
id
|
||||
jobid
|
||||
name
|
||||
type
|
||||
key
|
||||
size
|
||||
takenat
|
||||
mutation UPDATE_DOCUMENT($id: uuid!, $document: documents_set_input!) {
|
||||
update_documents_by_pk(pk_columns: { id: $id }, _set: $document) {
|
||||
billid
|
||||
bodyshopid
|
||||
extension
|
||||
id
|
||||
jobid
|
||||
name
|
||||
type
|
||||
key
|
||||
size
|
||||
takenat
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,96 +1,96 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_TEAMS = gql`
|
||||
query QUERY_TEAMS {
|
||||
employee_teams(order_by: { name: asc }) {
|
||||
id
|
||||
max_load
|
||||
name
|
||||
employee_team_members {
|
||||
id
|
||||
employeeid
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
query QUERY_TEAMS {
|
||||
employee_teams(order_by: { name: asc }) {
|
||||
id
|
||||
max_load
|
||||
name
|
||||
employee_team_members {
|
||||
id
|
||||
employeeid
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_EMPLOYEE_TEAM = gql`
|
||||
mutation UPDATE_EMPLOYEE_TEAM(
|
||||
$employeeTeamId: uuid!
|
||||
$employeeTeam: employee_teams_set_input
|
||||
$teamMemberDeletes: [uuid!]
|
||||
$teamMemberUpdates: [employee_team_members_updates!]!
|
||||
$teamMemberInserts: [employee_team_members_insert_input!]!
|
||||
) {
|
||||
update_employee_team_members_many(updates: $teamMemberUpdates) {
|
||||
returning {
|
||||
employeeid
|
||||
id
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
}
|
||||
delete_employee_team_members(where: { id: { _in: $teamMemberDeletes } }) {
|
||||
affected_rows
|
||||
}
|
||||
insert_employee_team_members(objects: $teamMemberInserts) {
|
||||
returning {
|
||||
employeeid
|
||||
id
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
}
|
||||
update_employee_teams_by_pk(
|
||||
pk_columns: { id: $employeeTeamId }
|
||||
_set: $employeeTeam
|
||||
mutation UPDATE_EMPLOYEE_TEAM(
|
||||
$employeeTeamId: uuid!
|
||||
$employeeTeam: employee_teams_set_input
|
||||
$teamMemberDeletes: [uuid!]
|
||||
$teamMemberUpdates: [employee_team_members_updates!]!
|
||||
$teamMemberInserts: [employee_team_members_insert_input!]!
|
||||
) {
|
||||
active
|
||||
id
|
||||
max_load
|
||||
name
|
||||
employee_team_members {
|
||||
employeeid
|
||||
id
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
update_employee_team_members_many(updates: $teamMemberUpdates) {
|
||||
returning {
|
||||
employeeid
|
||||
id
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
}
|
||||
delete_employee_team_members(where: { id: { _in: $teamMemberDeletes } }) {
|
||||
affected_rows
|
||||
}
|
||||
insert_employee_team_members(objects: $teamMemberInserts) {
|
||||
returning {
|
||||
employeeid
|
||||
id
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
}
|
||||
update_employee_teams_by_pk(
|
||||
pk_columns: { id: $employeeTeamId }
|
||||
_set: $employeeTeam
|
||||
) {
|
||||
active
|
||||
id
|
||||
max_load
|
||||
name
|
||||
employee_team_members {
|
||||
employeeid
|
||||
id
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_EMPLOYEE_TEAM = gql`
|
||||
mutation INSERT_EMPLOYEE_TEAM($employeeTeam: employee_teams_insert_input!) {
|
||||
insert_employee_teams_one(object: $employeeTeam) {
|
||||
active
|
||||
id
|
||||
max_load
|
||||
name
|
||||
employee_team_members {
|
||||
employeeid
|
||||
id
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
mutation INSERT_EMPLOYEE_TEAM($employeeTeam: employee_teams_insert_input!) {
|
||||
insert_employee_teams_one(object: $employeeTeam) {
|
||||
active
|
||||
id
|
||||
max_load
|
||||
name
|
||||
employee_team_members {
|
||||
employeeid
|
||||
id
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_EMPLOYEE_TEAM_BY_ID = gql`
|
||||
query QUERY_EMPLOYEE_TEAM_BY_ID($id: uuid!) {
|
||||
employee_teams_by_pk(id: $id) {
|
||||
active
|
||||
id
|
||||
max_load
|
||||
name
|
||||
employee_team_members {
|
||||
employeeid
|
||||
id
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
query QUERY_EMPLOYEE_TEAM_BY_ID($id: uuid!) {
|
||||
employee_teams_by_pk(id: $id) {
|
||||
active
|
||||
id
|
||||
max_load
|
||||
name
|
||||
employee_team_members {
|
||||
employeeid
|
||||
id
|
||||
labor_rates
|
||||
percentage
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,181 +1,181 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const INSERT_INVENTORY_AND_CREDIT = gql`
|
||||
mutation INSERT_INVENTORY_AND_CREDIT(
|
||||
$inv: inventory_insert_input!
|
||||
$cm: bills_insert_input!
|
||||
$pol: parts_orders_insert_input!
|
||||
$joblineId: uuid!
|
||||
$joblineStatus: String
|
||||
) {
|
||||
insert_inventory_one(object: $inv) {
|
||||
id
|
||||
}
|
||||
insert_bills_one(object: $cm) {
|
||||
id
|
||||
}
|
||||
insert_parts_orders_one(object: $pol) {
|
||||
id
|
||||
}
|
||||
update_joblines_by_pk(
|
||||
pk_columns: { id: $joblineId }
|
||||
_set: { status: $joblineStatus }
|
||||
mutation INSERT_INVENTORY_AND_CREDIT(
|
||||
$inv: inventory_insert_input!
|
||||
$cm: bills_insert_input!
|
||||
$pol: parts_orders_insert_input!
|
||||
$joblineId: uuid!
|
||||
$joblineStatus: String
|
||||
) {
|
||||
id
|
||||
status
|
||||
insert_inventory_one(object: $inv) {
|
||||
id
|
||||
}
|
||||
insert_bills_one(object: $cm) {
|
||||
id
|
||||
}
|
||||
insert_parts_orders_one(object: $pol) {
|
||||
id
|
||||
}
|
||||
update_joblines_by_pk(
|
||||
pk_columns: { id: $joblineId }
|
||||
_set: { status: $joblineStatus }
|
||||
) {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const UPDATE_INVENTORY_LINES = gql`
|
||||
mutation UPDATE_INVENTORY_LINES(
|
||||
$InventoryIds: [uuid!]!
|
||||
$consumedbybillid: uuid!
|
||||
) {
|
||||
update_inventory(
|
||||
where: { id: { _in: $InventoryIds } }
|
||||
_set: { consumedbybillid: $consumedbybillid }
|
||||
mutation UPDATE_INVENTORY_LINES(
|
||||
$InventoryIds: [uuid!]!
|
||||
$consumedbybillid: uuid!
|
||||
) {
|
||||
affected_rows
|
||||
update_inventory(
|
||||
where: { id: { _in: $InventoryIds } }
|
||||
_set: { consumedbybillid: $consumedbybillid }
|
||||
) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_OUTSTANDING_INVENTORY = gql`
|
||||
query QUERY_OUTSTANDING_INVENTORY {
|
||||
inventory(
|
||||
where: { consumedbybillid: { _is_null: true } }
|
||||
order_by: { line_desc: asc }
|
||||
) {
|
||||
id
|
||||
actual_cost
|
||||
actual_price
|
||||
quantity
|
||||
billlineid
|
||||
line_desc
|
||||
comment
|
||||
manualinvoicenumber
|
||||
manualvendor
|
||||
consumedbybillid
|
||||
billline {
|
||||
bill {
|
||||
invoice_number
|
||||
vendor {
|
||||
name
|
||||
}
|
||||
query QUERY_OUTSTANDING_INVENTORY {
|
||||
inventory(
|
||||
where: { consumedbybillid: { _is_null: true } }
|
||||
order_by: { line_desc: asc }
|
||||
) {
|
||||
id
|
||||
actual_cost
|
||||
actual_price
|
||||
quantity
|
||||
billlineid
|
||||
line_desc
|
||||
comment
|
||||
manualinvoicenumber
|
||||
manualvendor
|
||||
consumedbybillid
|
||||
billline {
|
||||
bill {
|
||||
invoice_number
|
||||
vendor {
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_INVENTORY_PAGINATED = gql`
|
||||
query QUERY_INVENTORY_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [inventory_order_by!]
|
||||
$consumedIsNull: Boolean
|
||||
) {
|
||||
search_inventory(
|
||||
args: { search: $search }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
where: { consumedbybillid: { _is_null: $consumedIsNull } }
|
||||
query QUERY_INVENTORY_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [inventory_order_by!]
|
||||
$consumedIsNull: Boolean
|
||||
) {
|
||||
id
|
||||
line_desc
|
||||
actual_price
|
||||
actual_cost
|
||||
comment
|
||||
manualinvoicenumber
|
||||
manualvendor
|
||||
consumedbybillid
|
||||
bill {
|
||||
id
|
||||
invoice_number
|
||||
job {
|
||||
ro_number
|
||||
id
|
||||
}
|
||||
}
|
||||
billline {
|
||||
id
|
||||
bill {
|
||||
id
|
||||
invoice_number
|
||||
job {
|
||||
search_inventory(
|
||||
args: { search: $search }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
where: { consumedbybillid: { _is_null: $consumedIsNull } }
|
||||
) {
|
||||
id
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
}
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
}
|
||||
line_desc
|
||||
actual_price
|
||||
actual_cost
|
||||
comment
|
||||
manualinvoicenumber
|
||||
manualvendor
|
||||
consumedbybillid
|
||||
bill {
|
||||
id
|
||||
invoice_number
|
||||
job {
|
||||
ro_number
|
||||
id
|
||||
}
|
||||
}
|
||||
billline {
|
||||
id
|
||||
bill {
|
||||
id
|
||||
invoice_number
|
||||
job {
|
||||
id
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
}
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
search_inventory_aggregate(
|
||||
args: { search: $search }
|
||||
where: { consumedbybillid: { _is_null: $consumedIsNull } }
|
||||
) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
search_inventory_aggregate(
|
||||
args: { search: $search }
|
||||
where: { consumedbybillid: { _is_null: $consumedIsNull } }
|
||||
) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_INVENTORY_LINE = gql`
|
||||
mutation DELETE_INVENTORY_LINE($lineId: uuid!) {
|
||||
delete_inventory_by_pk(id: $lineId) {
|
||||
id
|
||||
mutation DELETE_INVENTORY_LINE($lineId: uuid!) {
|
||||
delete_inventory_by_pk(id: $lineId) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_INVENTORY_LINE = gql`
|
||||
mutation INSERT_INVENTORY_LINE($inventoryItem: inventory_insert_input!) {
|
||||
insert_inventory_one(object: $inventoryItem) {
|
||||
id
|
||||
line_desc
|
||||
consumedbybillid
|
||||
billlineid
|
||||
actual_price
|
||||
actual_cost
|
||||
comment
|
||||
manualinvoicenumber
|
||||
manualvendor
|
||||
bill {
|
||||
invoice_number
|
||||
}
|
||||
mutation INSERT_INVENTORY_LINE($inventoryItem: inventory_insert_input!) {
|
||||
insert_inventory_one(object: $inventoryItem) {
|
||||
id
|
||||
line_desc
|
||||
consumedbybillid
|
||||
billlineid
|
||||
actual_price
|
||||
actual_cost
|
||||
comment
|
||||
manualinvoicenumber
|
||||
manualvendor
|
||||
bill {
|
||||
invoice_number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_INVENTORY_LINE = gql`
|
||||
mutation UPDATE_INVENTORY_LINE(
|
||||
$inventoryId: uuid!
|
||||
$inventoryItem: inventory_set_input!
|
||||
) {
|
||||
update_inventory_by_pk(
|
||||
pk_columns: { id: $inventoryId }
|
||||
_set: $inventoryItem
|
||||
mutation UPDATE_INVENTORY_LINE(
|
||||
$inventoryId: uuid!
|
||||
$inventoryItem: inventory_set_input!
|
||||
) {
|
||||
id
|
||||
line_desc
|
||||
consumedbybillid
|
||||
billlineid
|
||||
actual_price
|
||||
actual_cost
|
||||
comment
|
||||
manualinvoicenumber
|
||||
manualvendor
|
||||
bill {
|
||||
invoice_number
|
||||
}
|
||||
update_inventory_by_pk(
|
||||
pk_columns: { id: $inventoryId }
|
||||
_set: $inventoryItem
|
||||
) {
|
||||
id
|
||||
line_desc
|
||||
consumedbybillid
|
||||
billlineid
|
||||
actual_price
|
||||
actual_cost
|
||||
comment
|
||||
manualinvoicenumber
|
||||
manualvendor
|
||||
bill {
|
||||
invoice_number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,44 +1,44 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const INSERT_CONVERSATION_TAG = gql`
|
||||
mutation INSERT_CONVERSATION_TAG($conversationId: uuid!, $jobId: uuid!) {
|
||||
insert_job_conversations(
|
||||
objects: { conversationid: $conversationId, jobid: $jobId }
|
||||
on_conflict: { constraint: job_conversations_pkey, update_columns: jobid }
|
||||
) {
|
||||
returning {
|
||||
jobid
|
||||
conversationid
|
||||
id
|
||||
conversation {
|
||||
id
|
||||
job_conversations {
|
||||
id
|
||||
jobid
|
||||
conversationid
|
||||
job {
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
mutation INSERT_CONVERSATION_TAG($conversationId: uuid!, $jobId: uuid!) {
|
||||
insert_job_conversations(
|
||||
objects: { conversationid: $conversationId, jobid: $jobId }
|
||||
on_conflict: { constraint: job_conversations_pkey, update_columns: jobid }
|
||||
) {
|
||||
returning {
|
||||
jobid
|
||||
conversationid
|
||||
id
|
||||
conversation {
|
||||
id
|
||||
job_conversations {
|
||||
id
|
||||
jobid
|
||||
conversationid
|
||||
job {
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const REMOVE_CONVERSATION_TAG = gql`
|
||||
mutation REMOVE_CONVERSATION_TAG($conversationId: uuid!, $jobId: uuid!) {
|
||||
delete_job_conversations(
|
||||
where: {
|
||||
_and: {
|
||||
jobid: { _eq: $jobId }
|
||||
conversationid: { _eq: $conversationId }
|
||||
mutation REMOVE_CONVERSATION_TAG($conversationId: uuid!, $jobId: uuid!) {
|
||||
delete_job_conversations(
|
||||
where: {
|
||||
_and: {
|
||||
jobid: { _eq: $jobId }
|
||||
conversationid: { _eq: $conversationId }
|
||||
}
|
||||
}
|
||||
) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,291 +1,291 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const GET_ALL_JOBLINES_BY_PK = gql`
|
||||
query GET_ALL_JOBLINES_BY_PK($id: uuid!) {
|
||||
joblines(where: { jobid: { _eq: $id } }, order_by: { line_no: asc }) {
|
||||
id
|
||||
line_no
|
||||
unq_seq
|
||||
line_ind
|
||||
line_desc
|
||||
part_type
|
||||
oem_partno
|
||||
db_price
|
||||
act_price
|
||||
part_qty
|
||||
mod_lbr_ty
|
||||
db_hrs
|
||||
mod_lb_hrs
|
||||
lbr_op
|
||||
lbr_amt
|
||||
op_code_desc
|
||||
status
|
||||
notes
|
||||
location
|
||||
tax_part
|
||||
manual_line
|
||||
query GET_ALL_JOBLINES_BY_PK($id: uuid!) {
|
||||
joblines(where: { jobid: { _eq: $id } }, order_by: { line_no: asc }) {
|
||||
id
|
||||
line_no
|
||||
unq_seq
|
||||
line_ind
|
||||
line_desc
|
||||
part_type
|
||||
oem_partno
|
||||
db_price
|
||||
act_price
|
||||
part_qty
|
||||
mod_lbr_ty
|
||||
db_hrs
|
||||
mod_lb_hrs
|
||||
lbr_op
|
||||
lbr_amt
|
||||
op_code_desc
|
||||
status
|
||||
notes
|
||||
location
|
||||
tax_part
|
||||
manual_line
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_LINE_TICKET_BY_PK = gql`
|
||||
query GET_LINE_TICKET_BY_PK($id: uuid!) {
|
||||
jobs_by_pk(id: $id) {
|
||||
id
|
||||
lbr_adjustments
|
||||
converted
|
||||
status
|
||||
query GET_LINE_TICKET_BY_PK($id: uuid!) {
|
||||
jobs_by_pk(id: $id) {
|
||||
id
|
||||
lbr_adjustments
|
||||
converted
|
||||
status
|
||||
}
|
||||
joblines(where: { jobid: { _eq: $id }, removed: { _eq: false } }) {
|
||||
id
|
||||
line_desc
|
||||
part_type
|
||||
oem_partno
|
||||
db_price
|
||||
act_price
|
||||
part_qty
|
||||
mod_lbr_ty
|
||||
db_hrs
|
||||
mod_lb_hrs
|
||||
lbr_op
|
||||
lbr_amt
|
||||
op_code_desc
|
||||
convertedtolbr
|
||||
convertedtolbr_data
|
||||
}
|
||||
timetickets(where: { jobid: { _eq: $id } }) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
cost_center
|
||||
created_by
|
||||
date
|
||||
id
|
||||
jobid
|
||||
employeeid
|
||||
memo
|
||||
flat_rate
|
||||
clockon
|
||||
clockoff
|
||||
rate
|
||||
committed_at
|
||||
commited_by
|
||||
task_name
|
||||
employee {
|
||||
id
|
||||
first_name
|
||||
last_name
|
||||
employee_number
|
||||
}
|
||||
productivehrs
|
||||
}
|
||||
}
|
||||
joblines(where: { jobid: { _eq: $id }, removed: { _eq: false } }) {
|
||||
id
|
||||
line_desc
|
||||
part_type
|
||||
oem_partno
|
||||
db_price
|
||||
act_price
|
||||
part_qty
|
||||
mod_lbr_ty
|
||||
db_hrs
|
||||
mod_lb_hrs
|
||||
lbr_op
|
||||
lbr_amt
|
||||
op_code_desc
|
||||
convertedtolbr
|
||||
convertedtolbr_data
|
||||
}
|
||||
timetickets(where: { jobid: { _eq: $id } }) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
cost_center
|
||||
created_by
|
||||
date
|
||||
id
|
||||
jobid
|
||||
employeeid
|
||||
memo
|
||||
flat_rate
|
||||
clockon
|
||||
clockoff
|
||||
rate
|
||||
committed_at
|
||||
commited_by
|
||||
task_name
|
||||
employee {
|
||||
id
|
||||
first_name
|
||||
last_name
|
||||
employee_number
|
||||
}
|
||||
productivehrs
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_JOB_INFO_DRAW_CALCULATIONS = gql`
|
||||
query GET_JOB_INFO_DRAW_CALCULATIONS($id: uuid!) {
|
||||
jobs_by_pk(id: $id) {
|
||||
id
|
||||
lbr_adjustments
|
||||
converted
|
||||
rate_lab
|
||||
rate_lad
|
||||
rate_laa
|
||||
rate_la1
|
||||
rate_la2
|
||||
rate_la3
|
||||
rate_la4
|
||||
rate_lau
|
||||
rate_lar
|
||||
rate_lag
|
||||
rate_laf
|
||||
rate_lam
|
||||
query GET_JOB_INFO_DRAW_CALCULATIONS($id: uuid!) {
|
||||
jobs_by_pk(id: $id) {
|
||||
id
|
||||
lbr_adjustments
|
||||
converted
|
||||
rate_lab
|
||||
rate_lad
|
||||
rate_laa
|
||||
rate_la1
|
||||
rate_la2
|
||||
rate_la3
|
||||
rate_la4
|
||||
rate_lau
|
||||
rate_lar
|
||||
rate_lag
|
||||
rate_laf
|
||||
rate_lam
|
||||
}
|
||||
timetickets(where: { jobid: { _eq: $id } }) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
cost_center
|
||||
date
|
||||
id
|
||||
jobid
|
||||
employeeid
|
||||
memo
|
||||
flat_rate
|
||||
clockon
|
||||
clockoff
|
||||
rate
|
||||
employee {
|
||||
id
|
||||
first_name
|
||||
last_name
|
||||
employee_number
|
||||
}
|
||||
productivehrs
|
||||
}
|
||||
joblines(where: { jobid: { _eq: $id }, removed: { _eq: false } }) {
|
||||
id
|
||||
line_desc
|
||||
part_type
|
||||
oem_partno
|
||||
db_price
|
||||
act_price
|
||||
part_qty
|
||||
mod_lbr_ty
|
||||
db_hrs
|
||||
mod_lb_hrs
|
||||
lbr_op
|
||||
lbr_amt
|
||||
op_code_desc
|
||||
convertedtolbr
|
||||
convertedtolbr_data
|
||||
}
|
||||
}
|
||||
timetickets(where: { jobid: { _eq: $id } }) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
cost_center
|
||||
date
|
||||
id
|
||||
jobid
|
||||
employeeid
|
||||
memo
|
||||
flat_rate
|
||||
clockon
|
||||
clockoff
|
||||
rate
|
||||
employee {
|
||||
id
|
||||
first_name
|
||||
last_name
|
||||
employee_number
|
||||
}
|
||||
productivehrs
|
||||
}
|
||||
joblines(where: { jobid: { _eq: $id }, removed: { _eq: false } }) {
|
||||
id
|
||||
line_desc
|
||||
part_type
|
||||
oem_partno
|
||||
db_price
|
||||
act_price
|
||||
part_qty
|
||||
mod_lbr_ty
|
||||
db_hrs
|
||||
mod_lb_hrs
|
||||
lbr_op
|
||||
lbr_amt
|
||||
op_code_desc
|
||||
convertedtolbr
|
||||
convertedtolbr_data
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const UPDATE_JOB_LINE_STATUS = gql`
|
||||
mutation UPDATE_JOB_LINE_STATUS(
|
||||
$ids: [uuid!]!
|
||||
$status: String!
|
||||
$location: String
|
||||
) {
|
||||
update_joblines(
|
||||
where: { id: { _in: $ids } }
|
||||
_set: { status: $status, location: $location }
|
||||
mutation UPDATE_JOB_LINE_STATUS(
|
||||
$ids: [uuid!]!
|
||||
$status: String!
|
||||
$location: String
|
||||
) {
|
||||
affected_rows
|
||||
returning {
|
||||
id
|
||||
status
|
||||
location
|
||||
}
|
||||
update_joblines(
|
||||
where: { id: { _in: $ids } }
|
||||
_set: { status: $status, location: $location }
|
||||
) {
|
||||
affected_rows
|
||||
returning {
|
||||
id
|
||||
status
|
||||
location
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_NEW_JOB_LINE = gql`
|
||||
mutation INSERT_NEW_JOB_LINE($lineInput: [joblines_insert_input!]!) {
|
||||
insert_joblines(objects: $lineInput) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation INSERT_NEW_JOB_LINE($lineInput: [joblines_insert_input!]!) {
|
||||
insert_joblines(objects: $lineInput) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const RECEIVE_PARTS_LINE = gql`
|
||||
mutation RECEIVE_PARTS_LINE(
|
||||
$lineId: uuid!
|
||||
$line: joblines_set_input!
|
||||
$orderLineId: uuid!
|
||||
$orderLine: parts_order_lines_set_input!
|
||||
) {
|
||||
update_joblines(where: { id: { _eq: $lineId } }, _set: $line) {
|
||||
returning {
|
||||
id
|
||||
notes
|
||||
mod_lbr_ty
|
||||
part_qty
|
||||
db_price
|
||||
act_price
|
||||
line_desc
|
||||
oem_partno
|
||||
notes
|
||||
location
|
||||
status
|
||||
removed
|
||||
}
|
||||
}
|
||||
update_parts_order_lines_by_pk(
|
||||
pk_columns: { id: $orderLineId }
|
||||
_set: $orderLine
|
||||
mutation RECEIVE_PARTS_LINE(
|
||||
$lineId: uuid!
|
||||
$line: joblines_set_input!
|
||||
$orderLineId: uuid!
|
||||
$orderLine: parts_order_lines_set_input!
|
||||
) {
|
||||
id
|
||||
line_desc
|
||||
backordered_on
|
||||
backordered_eta
|
||||
status
|
||||
update_joblines(where: { id: { _eq: $lineId } }, _set: $line) {
|
||||
returning {
|
||||
id
|
||||
notes
|
||||
mod_lbr_ty
|
||||
part_qty
|
||||
db_price
|
||||
act_price
|
||||
line_desc
|
||||
oem_partno
|
||||
notes
|
||||
location
|
||||
status
|
||||
removed
|
||||
}
|
||||
}
|
||||
update_parts_order_lines_by_pk(
|
||||
pk_columns: { id: $orderLineId }
|
||||
_set: $orderLine
|
||||
) {
|
||||
id
|
||||
line_desc
|
||||
backordered_on
|
||||
backordered_eta
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_JOB_LINE_SUBLET = gql`
|
||||
mutation UPDATE_JOB_LINE_SUBLET(
|
||||
$lineId: uuid!
|
||||
$line: joblines_set_input!
|
||||
$now: timestamptz!
|
||||
$jobId: uuid!
|
||||
) {
|
||||
update_jobs_by_pk(pk_columns: { id: $jobId }, _set: { updated_at: $now }) {
|
||||
id
|
||||
updated_at
|
||||
mutation UPDATE_JOB_LINE_SUBLET(
|
||||
$lineId: uuid!
|
||||
$line: joblines_set_input!
|
||||
$now: timestamptz!
|
||||
$jobId: uuid!
|
||||
) {
|
||||
update_jobs_by_pk(pk_columns: { id: $jobId }, _set: { updated_at: $now }) {
|
||||
id
|
||||
updated_at
|
||||
}
|
||||
update_joblines(where: { id: { _eq: $lineId } }, _set: $line) {
|
||||
returning {
|
||||
id
|
||||
sublet_completed
|
||||
sublet_ignored
|
||||
}
|
||||
}
|
||||
}
|
||||
update_joblines(where: { id: { _eq: $lineId } }, _set: $line) {
|
||||
returning {
|
||||
id
|
||||
sublet_completed
|
||||
sublet_ignored
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_JOB_LINE = gql`
|
||||
mutation UPDATE_JOB_LINE($lineId: uuid!, $line: joblines_set_input!) {
|
||||
update_joblines(where: { id: { _eq: $lineId } }, _set: $line) {
|
||||
returning {
|
||||
id
|
||||
notes
|
||||
mod_lbr_ty
|
||||
part_qty
|
||||
db_price
|
||||
act_price
|
||||
line_desc
|
||||
line_no
|
||||
oem_partno
|
||||
notes
|
||||
location
|
||||
status
|
||||
removed
|
||||
convertedtolbr
|
||||
convertedtolbr_data
|
||||
assigned_team
|
||||
}
|
||||
mutation UPDATE_JOB_LINE($lineId: uuid!, $line: joblines_set_input!) {
|
||||
update_joblines(where: { id: { _eq: $lineId } }, _set: $line) {
|
||||
returning {
|
||||
id
|
||||
notes
|
||||
mod_lbr_ty
|
||||
part_qty
|
||||
db_price
|
||||
act_price
|
||||
line_desc
|
||||
line_no
|
||||
oem_partno
|
||||
notes
|
||||
location
|
||||
status
|
||||
removed
|
||||
convertedtolbr
|
||||
convertedtolbr_data
|
||||
assigned_team
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_JOB_LINES_TO_ENTER_BILL = gql`
|
||||
query GET_JOB_LINES_TO_ENTER_BILL($id: uuid!) {
|
||||
joblines(
|
||||
where: { jobid: { _eq: $id } }
|
||||
order_by: { act_price: desc_nulls_last }
|
||||
) {
|
||||
removed
|
||||
id
|
||||
line_desc
|
||||
part_type
|
||||
oem_partno
|
||||
alt_partno
|
||||
db_price
|
||||
act_price
|
||||
part_qty
|
||||
mod_lbr_ty
|
||||
db_hrs
|
||||
mod_lb_hrs
|
||||
lbr_op
|
||||
lbr_amt
|
||||
op_code_desc
|
||||
alt_partno
|
||||
assigned_team
|
||||
query GET_JOB_LINES_TO_ENTER_BILL($id: uuid!) {
|
||||
joblines(
|
||||
where: { jobid: { _eq: $id } }
|
||||
order_by: { act_price: desc_nulls_last }
|
||||
) {
|
||||
removed
|
||||
id
|
||||
line_desc
|
||||
part_type
|
||||
oem_partno
|
||||
alt_partno
|
||||
db_price
|
||||
act_price
|
||||
part_qty
|
||||
mod_lbr_ty
|
||||
db_hrs
|
||||
mod_lb_hrs
|
||||
lbr_op
|
||||
lbr_amt
|
||||
op_code_desc
|
||||
alt_partno
|
||||
assigned_team
|
||||
}
|
||||
jobs_by_pk(id: $id) {
|
||||
id
|
||||
status
|
||||
ious {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
v_make_desc
|
||||
}
|
||||
}
|
||||
jobs_by_pk(id: $id) {
|
||||
id
|
||||
status
|
||||
ious {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
v_make_desc
|
||||
}
|
||||
}
|
||||
`;
|
||||
// oem_partno: {
|
||||
// _neq: "";
|
||||
@@ -295,14 +295,14 @@ export const GET_JOB_LINES_TO_ENTER_BILL = gql`
|
||||
// }
|
||||
|
||||
export const generateJobLinesUpdatesForInvoicing = (joblines) => {
|
||||
const updates = joblines.reduce((acc, jl, idx) => {
|
||||
return (
|
||||
acc +
|
||||
`a${idx}:update_joblines(where: {id: {_eq: "${
|
||||
jl.id
|
||||
}"}}, _set: {profitcenter_labor: "${
|
||||
jl.profitcenter_labor || ""
|
||||
}", profitcenter_part: "${jl.profitcenter_part || ""}"}) {
|
||||
const updates = joblines.reduce((acc, jl, idx) => {
|
||||
return (
|
||||
acc +
|
||||
`a${idx}:update_joblines(where: {id: {_eq: "${
|
||||
jl.id
|
||||
}"}}, _set: {profitcenter_labor: "${
|
||||
jl.profitcenter_labor || ""
|
||||
}", profitcenter_part: "${jl.profitcenter_part || ""}"}) {
|
||||
returning {
|
||||
line_desc
|
||||
profitcenter_part
|
||||
@@ -310,62 +310,62 @@ export const generateJobLinesUpdatesForInvoicing = (joblines) => {
|
||||
id
|
||||
}
|
||||
}`
|
||||
);
|
||||
}, "");
|
||||
);
|
||||
}, "");
|
||||
|
||||
return gql`
|
||||
mutation UPDATE_JOBLINES_FOR_INVOICING{
|
||||
${updates}
|
||||
}
|
||||
`;
|
||||
return gql`
|
||||
mutation UPDATE_JOBLINES_FOR_INVOICING{
|
||||
${updates}
|
||||
}
|
||||
`;
|
||||
};
|
||||
|
||||
export const DELETE_JOB_LINE_BY_PK = gql`
|
||||
mutation DELETE_JOB_LINE_BY_PK($joblineId: uuid!) {
|
||||
update_joblines_by_pk(
|
||||
pk_columns: { id: $joblineId }
|
||||
_set: { removed: true }
|
||||
) {
|
||||
removed
|
||||
id
|
||||
mutation DELETE_JOB_LINE_BY_PK($joblineId: uuid!) {
|
||||
update_joblines_by_pk(
|
||||
pk_columns: { id: $joblineId }
|
||||
_set: { removed: true }
|
||||
) {
|
||||
removed
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_JOB_LINES_IOU = gql`
|
||||
mutation UPDATE_JOB_LINES_IOU($ids: [uuid!]!) {
|
||||
update_joblines(where: { id: { _in: $ids } }, _set: { ioucreated: true }) {
|
||||
returning {
|
||||
ioucreated
|
||||
id
|
||||
}
|
||||
mutation UPDATE_JOB_LINES_IOU($ids: [uuid!]!) {
|
||||
update_joblines(where: { id: { _in: $ids } }, _set: { ioucreated: true }) {
|
||||
returning {
|
||||
ioucreated
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_LINE_PPC = gql`
|
||||
mutation UPDATE_LINE_PPC($id: uuid!, $jobline: joblines_set_input) {
|
||||
update_joblines_by_pk(pk_columns: { id: $id }, _set: $jobline) {
|
||||
jobid
|
||||
id
|
||||
act_price_before_ppc
|
||||
act_price
|
||||
mutation UPDATE_LINE_PPC($id: uuid!, $jobline: joblines_set_input) {
|
||||
update_joblines_by_pk(pk_columns: { id: $id }, _set: $jobline) {
|
||||
jobid
|
||||
id
|
||||
act_price_before_ppc
|
||||
act_price
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_LINE_BULK_ASSIGN = gql`
|
||||
mutation UPDATE_LINE_BULK_ASSIGN(
|
||||
$ids: [uuid!]!
|
||||
$jobline: joblines_set_input
|
||||
) {
|
||||
update_joblines_many(
|
||||
updates: { _set: $jobline, where: { id: { _in: $ids } } }
|
||||
mutation UPDATE_LINE_BULK_ASSIGN(
|
||||
$ids: [uuid!]!
|
||||
$jobline: joblines_set_input
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
assigned_team
|
||||
}
|
||||
update_joblines_many(
|
||||
updates: { _set: $jobline, where: { id: { _in: $ids } } }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
assigned_team
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const MARK_MESSAGES_AS_READ_BY_CONVERSATION = gql`
|
||||
mutation MARK_MESSAGES_AS_READ_BY_CONVERSATION($conversationId: uuid) {
|
||||
update_messages(
|
||||
where: { conversationid: { _eq: $conversationId } }
|
||||
_set: { read: true }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
read
|
||||
isoutbound
|
||||
}
|
||||
mutation MARK_MESSAGES_AS_READ_BY_CONVERSATION($conversationId: uuid) {
|
||||
update_messages(
|
||||
where: { conversationid: { _eq: $conversationId } }
|
||||
_set: { read: true }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
read
|
||||
isoutbound
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const GET_LANDING_NAV_ITEMS = gql`
|
||||
query nav_items {
|
||||
masterdata_by_pk(key: "LANDING_NAV_ITEMS") {
|
||||
value
|
||||
query nav_items {
|
||||
masterdata_by_pk(key: "LANDING_NAV_ITEMS") {
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const GET_NAV_ITEMS = gql`
|
||||
query nav_items {
|
||||
masterdata_by_pk(key: "NAV_ITEMS") {
|
||||
value
|
||||
query nav_items {
|
||||
masterdata_by_pk(key: "NAV_ITEMS") {
|
||||
value
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_SELECTED_NAV_ITEM = gql`
|
||||
query selected_nav_item {
|
||||
selectedNavItem @client
|
||||
}
|
||||
query selected_nav_item {
|
||||
selectedNavItem @client
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const INSERT_NEW_NOTE = gql`
|
||||
mutation INSERT_NEW_NOTE($noteInput: [notes_insert_input!]!) {
|
||||
insert_notes(objects: $noteInput) {
|
||||
returning {
|
||||
created_at
|
||||
created_by
|
||||
critical
|
||||
id
|
||||
jobid
|
||||
private
|
||||
text
|
||||
updated_at
|
||||
audit
|
||||
type
|
||||
}
|
||||
mutation INSERT_NEW_NOTE($noteInput: [notes_insert_input!]!) {
|
||||
insert_notes(objects: $noteInput) {
|
||||
returning {
|
||||
created_at
|
||||
created_by
|
||||
critical
|
||||
id
|
||||
jobid
|
||||
private
|
||||
text
|
||||
updated_at
|
||||
audit
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_NOTES_BY_JOB_PK = gql`
|
||||
query QUERY_NOTES_BY_JOB_PK($id: uuid!) {
|
||||
jobs_by_pk(id: $id) {
|
||||
id
|
||||
ro_number
|
||||
vehicle {
|
||||
jobs {
|
||||
id
|
||||
ro_number
|
||||
status
|
||||
clm_no
|
||||
query QUERY_NOTES_BY_JOB_PK($id: uuid!) {
|
||||
jobs_by_pk(id: $id) {
|
||||
id
|
||||
ro_number
|
||||
vehicle {
|
||||
jobs {
|
||||
id
|
||||
ro_number
|
||||
status
|
||||
clm_no
|
||||
}
|
||||
}
|
||||
notes {
|
||||
created_at
|
||||
created_by
|
||||
critical
|
||||
id
|
||||
jobid
|
||||
private
|
||||
text
|
||||
updated_at
|
||||
audit
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
notes {
|
||||
created_at
|
||||
created_by
|
||||
critical
|
||||
id
|
||||
jobid
|
||||
private
|
||||
text
|
||||
updated_at
|
||||
audit
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_NOTE = gql`
|
||||
mutation UPDATE_NOTE($noteId: uuid!, $note: notes_set_input!) {
|
||||
update_notes(where: { id: { _eq: $noteId } }, _set: $note) {
|
||||
returning {
|
||||
id
|
||||
created_at
|
||||
created_by
|
||||
critical
|
||||
id
|
||||
jobid
|
||||
private
|
||||
text
|
||||
updated_at
|
||||
audit
|
||||
type
|
||||
}
|
||||
mutation UPDATE_NOTE($noteId: uuid!, $note: notes_set_input!) {
|
||||
update_notes(where: { id: { _eq: $noteId } }, _set: $note) {
|
||||
returning {
|
||||
id
|
||||
created_at
|
||||
created_by
|
||||
critical
|
||||
id
|
||||
jobid
|
||||
private
|
||||
text
|
||||
updated_at
|
||||
audit
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_NOTE = gql`
|
||||
mutation DELETE_NOTE($noteId: uuid!) {
|
||||
delete_notes(where: { id: { _eq: $noteId } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation DELETE_NOTE($noteId: uuid!) {
|
||||
delete_notes(where: { id: { _eq: $noteId } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,189 +1,189 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_SEARCH_OWNER_BY_IDX = gql`
|
||||
query QUERY_SEARCH_OWNER_BY_IDX($search: String!) {
|
||||
search_owners(args: { search: $search }, limit: 100) {
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ownr_ph1
|
||||
ownr_ph2
|
||||
ownr_addr1
|
||||
ownr_addr2
|
||||
ownr_city
|
||||
ownr_ctry
|
||||
ownr_ea
|
||||
ownr_st
|
||||
ownr_zip
|
||||
id
|
||||
note
|
||||
query QUERY_SEARCH_OWNER_BY_IDX($search: String!) {
|
||||
search_owners(args: { search: $search }, limit: 100) {
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ownr_ph1
|
||||
ownr_ph2
|
||||
ownr_addr1
|
||||
ownr_addr2
|
||||
ownr_city
|
||||
ownr_ctry
|
||||
ownr_ea
|
||||
ownr_st
|
||||
ownr_zip
|
||||
id
|
||||
note
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SEARCH_OWNERS_BY_ID_FOR_AUTOCOMPLETE = gql`
|
||||
query SEARCH_OWNERS_BY_ID_FOR_AUTOCOMPLETE($id: uuid!) {
|
||||
owners_by_pk(id: $id) {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ownr_addr1
|
||||
query SEARCH_OWNERS_BY_ID_FOR_AUTOCOMPLETE($id: uuid!) {
|
||||
owners_by_pk(id: $id) {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ownr_addr1
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const SEARCH_OWNERS_FOR_AUTOCOMPLETE = gql`
|
||||
query SEARCH_OWNERS_FOR_AUTOCOMPLETE($search: String) {
|
||||
search_owners(
|
||||
args: { search: $search }
|
||||
limit: 25
|
||||
order_by: { ownr_ln: desc_nulls_last }
|
||||
) {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ownr_addr1
|
||||
query SEARCH_OWNERS_FOR_AUTOCOMPLETE($search: String) {
|
||||
search_owners(
|
||||
args: { search: $search }
|
||||
limit: 25
|
||||
order_by: { ownr_ln: desc_nulls_last }
|
||||
) {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ownr_addr1
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_OWNER_BY_ID = gql`
|
||||
query QUERY_OWNER_BY_ID($id: uuid!) {
|
||||
owners_by_pk(id: $id) {
|
||||
id
|
||||
allow_text_message
|
||||
ownr_addr1
|
||||
ownr_addr2
|
||||
ownr_co_nm
|
||||
ownr_city
|
||||
ownr_ctry
|
||||
ownr_ea
|
||||
ownr_fn
|
||||
ownr_ph1
|
||||
ownr_ln
|
||||
ownr_ph2
|
||||
ownr_st
|
||||
ownr_title
|
||||
ownr_zip
|
||||
preferred_contact
|
||||
note
|
||||
tax_number
|
||||
jobs(order_by: { date_open: desc }) {
|
||||
id
|
||||
ro_number
|
||||
clm_no
|
||||
status
|
||||
clm_total
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
vehicleid
|
||||
}
|
||||
query QUERY_OWNER_BY_ID($id: uuid!) {
|
||||
owners_by_pk(id: $id) {
|
||||
id
|
||||
allow_text_message
|
||||
ownr_addr1
|
||||
ownr_addr2
|
||||
ownr_co_nm
|
||||
ownr_city
|
||||
ownr_ctry
|
||||
ownr_ea
|
||||
ownr_fn
|
||||
ownr_ph1
|
||||
ownr_ln
|
||||
ownr_ph2
|
||||
ownr_st
|
||||
ownr_title
|
||||
ownr_zip
|
||||
preferred_contact
|
||||
note
|
||||
tax_number
|
||||
jobs(order_by: { date_open: desc }) {
|
||||
id
|
||||
ro_number
|
||||
clm_no
|
||||
status
|
||||
clm_total
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
vehicleid
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_OWNER = gql`
|
||||
mutation UPDATE_OWNER($ownerId: uuid!, $owner: owners_set_input!) {
|
||||
update_owners(where: { id: { _eq: $ownerId } }, _set: $owner) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation UPDATE_OWNER($ownerId: uuid!, $owner: owners_set_input!) {
|
||||
update_owners(where: { id: { _eq: $ownerId } }, _set: $owner) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_OWNER = gql`
|
||||
mutation DELETE_OWNER($id: uuid!) {
|
||||
delete_owners_by_pk(id: $id) {
|
||||
id
|
||||
mutation DELETE_OWNER($id: uuid!) {
|
||||
delete_owners_by_pk(id: $id) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_ALL_OWNERS = gql`
|
||||
query QUERY_ALL_OWNERS {
|
||||
owners {
|
||||
id
|
||||
allow_text_message
|
||||
created_at
|
||||
ownr_addr1
|
||||
ownr_addr2
|
||||
ownr_co_nm
|
||||
ownr_city
|
||||
ownr_ctry
|
||||
ownr_ea
|
||||
ownr_fn
|
||||
ownr_ph1
|
||||
ownr_ln
|
||||
ownr_ph2
|
||||
ownr_st
|
||||
ownr_title
|
||||
ownr_zip
|
||||
preferred_contact
|
||||
updated_at
|
||||
query QUERY_ALL_OWNERS {
|
||||
owners {
|
||||
id
|
||||
allow_text_message
|
||||
created_at
|
||||
ownr_addr1
|
||||
ownr_addr2
|
||||
ownr_co_nm
|
||||
ownr_city
|
||||
ownr_ctry
|
||||
ownr_ea
|
||||
ownr_fn
|
||||
ownr_ph1
|
||||
ownr_ln
|
||||
ownr_ph2
|
||||
ownr_st
|
||||
ownr_title
|
||||
ownr_zip
|
||||
preferred_contact
|
||||
updated_at
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_ALL_OWNERS_PAGINATED = gql`
|
||||
query QUERY_ALL_OWNERS_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [owners_order_by!]!
|
||||
) {
|
||||
search_owners(
|
||||
args: { search: $search }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
query QUERY_ALL_OWNERS_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [owners_order_by!]!
|
||||
) {
|
||||
id
|
||||
allow_text_message
|
||||
created_at
|
||||
ownr_addr1
|
||||
ownr_addr2
|
||||
ownr_co_nm
|
||||
ownr_city
|
||||
ownr_ctry
|
||||
ownr_ea
|
||||
ownr_fn
|
||||
ownr_ph1
|
||||
ownr_ln
|
||||
ownr_ph2
|
||||
ownr_st
|
||||
ownr_title
|
||||
ownr_zip
|
||||
preferred_contact
|
||||
updated_at
|
||||
search_owners(
|
||||
args: { search: $search }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
) {
|
||||
id
|
||||
allow_text_message
|
||||
created_at
|
||||
ownr_addr1
|
||||
ownr_addr2
|
||||
ownr_co_nm
|
||||
ownr_city
|
||||
ownr_ctry
|
||||
ownr_ea
|
||||
ownr_fn
|
||||
ownr_ph1
|
||||
ownr_ln
|
||||
ownr_ph2
|
||||
ownr_st
|
||||
ownr_title
|
||||
ownr_zip
|
||||
preferred_contact
|
||||
updated_at
|
||||
}
|
||||
search_owners_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
search_owners_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_OWNER_FOR_JOB_CREATION = gql`
|
||||
query QUERY_OWNER_FOR_JOB_CREATION($id: uuid!) {
|
||||
owners_by_pk(id: $id) {
|
||||
id
|
||||
ownr_addr1
|
||||
ownr_addr2
|
||||
ownr_co_nm
|
||||
ownr_city
|
||||
ownr_ctry
|
||||
ownr_ea
|
||||
ownr_fn
|
||||
ownr_ph1
|
||||
ownr_ln
|
||||
ownr_ph2
|
||||
ownr_st
|
||||
ownr_title
|
||||
ownr_zip
|
||||
query QUERY_OWNER_FOR_JOB_CREATION($id: uuid!) {
|
||||
owners_by_pk(id: $id) {
|
||||
id
|
||||
ownr_addr1
|
||||
ownr_addr2
|
||||
ownr_co_nm
|
||||
ownr_city
|
||||
ownr_ctry
|
||||
ownr_ea
|
||||
ownr_fn
|
||||
ownr_ph1
|
||||
ownr_ln
|
||||
ownr_ph2
|
||||
ownr_st
|
||||
ownr_title
|
||||
ownr_zip
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const INSERT_PARTS_DISPATCH = gql`
|
||||
mutation INSERT_PARTS_DISPATCH($partsDispatch: parts_dispatch_insert_input!) {
|
||||
insert_parts_dispatch_one(object: $partsDispatch) {
|
||||
id
|
||||
jobid
|
||||
number
|
||||
employeeid
|
||||
parts_dispatch_lines {
|
||||
id
|
||||
joblineid
|
||||
quantity
|
||||
}
|
||||
mutation INSERT_PARTS_DISPATCH($partsDispatch: parts_dispatch_insert_input!) {
|
||||
insert_parts_dispatch_one(object: $partsDispatch) {
|
||||
id
|
||||
jobid
|
||||
number
|
||||
employeeid
|
||||
parts_dispatch_lines {
|
||||
id
|
||||
joblineid
|
||||
quantity
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_UNACCEPTED_PARTS_DISPATCH = gql`
|
||||
query GET_UNACCEPTED_PARTS_DISPATCH(
|
||||
$techId: uuid!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) {
|
||||
parts_dispatch_aggregate(
|
||||
where: {
|
||||
employeeid: { _eq: $techId }
|
||||
parts_dispatch_lines: { accepted_at: { _is_null: true } }
|
||||
}
|
||||
query GET_UNACCEPTED_PARTS_DISPATCH(
|
||||
$techId: uuid!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
parts_dispatch(
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
where: {
|
||||
employeeid: { _eq: $techId }
|
||||
parts_dispatch_lines: { accepted_at: { _is_null: true } }
|
||||
}
|
||||
) {
|
||||
id
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
status
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
v_color
|
||||
}
|
||||
dispatched_at
|
||||
dispatched_by
|
||||
parts_dispatch_lines {
|
||||
id
|
||||
accepted_at
|
||||
jobline {
|
||||
line_desc
|
||||
id
|
||||
parts_dispatch_aggregate(
|
||||
where: {
|
||||
employeeid: { _eq: $techId }
|
||||
parts_dispatch_lines: { accepted_at: { _is_null: true } }
|
||||
}
|
||||
) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
parts_dispatch(
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
where: {
|
||||
employeeid: { _eq: $techId }
|
||||
parts_dispatch_lines: { accepted_at: { _is_null: true } }
|
||||
}
|
||||
) {
|
||||
id
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
status
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
v_color
|
||||
}
|
||||
dispatched_at
|
||||
dispatched_by
|
||||
parts_dispatch_lines {
|
||||
id
|
||||
accepted_at
|
||||
jobline {
|
||||
line_desc
|
||||
id
|
||||
}
|
||||
quantity
|
||||
joblineid
|
||||
}
|
||||
}
|
||||
quantity
|
||||
joblineid
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_PARTS_DISPATCH_LINE = gql`
|
||||
mutation UPDATE_PARTS_DISPATCH_LINE(
|
||||
$id: uuid!
|
||||
$line: parts_dispatch_lines_set_input!
|
||||
) {
|
||||
update_parts_dispatch_lines_by_pk(pk_columns: { id: $id }, _set: $line) {
|
||||
accepted_at
|
||||
id
|
||||
mutation UPDATE_PARTS_DISPATCH_LINE(
|
||||
$id: uuid!
|
||||
$line: parts_dispatch_lines_set_input!
|
||||
) {
|
||||
update_parts_dispatch_lines_by_pk(pk_columns: { id: $id }, _set: $line) {
|
||||
accepted_at
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,398 +1,398 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const INSERT_NEW_PARTS_ORDERS = gql`
|
||||
mutation INSERT_NEW_PARTS_ORDERS($po: [parts_orders_insert_input!]!) {
|
||||
insert_parts_orders(objects: $po) {
|
||||
returning {
|
||||
id
|
||||
order_number
|
||||
}
|
||||
mutation INSERT_NEW_PARTS_ORDERS($po: [parts_orders_insert_input!]!) {
|
||||
insert_parts_orders(objects: $po) {
|
||||
returning {
|
||||
id
|
||||
order_number
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_PARTS_ORDER_OEC = gql`
|
||||
query QUERY_PARTS_ORDER_OEC($id: uuid!) {
|
||||
parts_orders_by_pk(id: $id) {
|
||||
parts_order_lines {
|
||||
jobline {
|
||||
tran_code
|
||||
act_price
|
||||
db_ref
|
||||
db_price
|
||||
db_hrs
|
||||
glass_flag
|
||||
id
|
||||
lbr_amt
|
||||
lbr_hrs_j
|
||||
lbr_inc
|
||||
lbr_op
|
||||
lbr_op_j
|
||||
lbr_tax
|
||||
lbr_typ_j
|
||||
line_desc
|
||||
line_ind
|
||||
line_no
|
||||
line_ref
|
||||
location
|
||||
misc_amt
|
||||
misc_sublt
|
||||
misc_tax
|
||||
mod_lb_hrs
|
||||
mod_lbr_ty
|
||||
oem_partno
|
||||
op_code_desc
|
||||
paint_stg
|
||||
paint_tone
|
||||
part_qty
|
||||
part_type
|
||||
price_inc
|
||||
price_j
|
||||
prt_dsmk_m
|
||||
prt_dsmk_p
|
||||
tax_part
|
||||
unq_seq
|
||||
alt_co_id
|
||||
alt_overrd
|
||||
alt_part_i
|
||||
alt_partm
|
||||
alt_partno
|
||||
bett_amt
|
||||
bett_pctg
|
||||
bett_tax
|
||||
bett_type
|
||||
cert_part
|
||||
est_seq
|
||||
query QUERY_PARTS_ORDER_OEC($id: uuid!) {
|
||||
parts_orders_by_pk(id: $id) {
|
||||
parts_order_lines {
|
||||
jobline {
|
||||
tran_code
|
||||
act_price
|
||||
db_ref
|
||||
db_price
|
||||
db_hrs
|
||||
glass_flag
|
||||
id
|
||||
lbr_amt
|
||||
lbr_hrs_j
|
||||
lbr_inc
|
||||
lbr_op
|
||||
lbr_op_j
|
||||
lbr_tax
|
||||
lbr_typ_j
|
||||
line_desc
|
||||
line_ind
|
||||
line_no
|
||||
line_ref
|
||||
location
|
||||
misc_amt
|
||||
misc_sublt
|
||||
misc_tax
|
||||
mod_lb_hrs
|
||||
mod_lbr_ty
|
||||
oem_partno
|
||||
op_code_desc
|
||||
paint_stg
|
||||
paint_tone
|
||||
part_qty
|
||||
part_type
|
||||
price_inc
|
||||
price_j
|
||||
prt_dsmk_m
|
||||
prt_dsmk_p
|
||||
tax_part
|
||||
unq_seq
|
||||
alt_co_id
|
||||
alt_overrd
|
||||
alt_part_i
|
||||
alt_partm
|
||||
alt_partno
|
||||
bett_amt
|
||||
bett_pctg
|
||||
bett_tax
|
||||
bett_type
|
||||
cert_part
|
||||
est_seq
|
||||
}
|
||||
act_price
|
||||
id
|
||||
db_price
|
||||
line_desc
|
||||
quantity
|
||||
part_type
|
||||
}
|
||||
job {
|
||||
bodyshop {
|
||||
shopname
|
||||
bill_tax_rates
|
||||
}
|
||||
ro_number
|
||||
clm_no
|
||||
asgn_no
|
||||
asgn_date
|
||||
state_tax_rate
|
||||
area_of_damage
|
||||
asgn_no
|
||||
asgn_type
|
||||
ciecaid
|
||||
clm_addr1
|
||||
clm_city
|
||||
clm_addr2
|
||||
clm_ct_fn
|
||||
clm_ct_ln
|
||||
clm_ct_ph
|
||||
clm_ct_phx
|
||||
clm_ctry
|
||||
clm_ea
|
||||
clm_fax
|
||||
clm_faxx
|
||||
clm_ofc_id
|
||||
clm_ofc_nm
|
||||
clm_ph1
|
||||
clm_ph1x
|
||||
clm_ph2
|
||||
clm_ph2x
|
||||
clm_st
|
||||
clm_title
|
||||
clm_total
|
||||
clm_zip
|
||||
ded_amt
|
||||
est_addr1
|
||||
est_addr2
|
||||
est_city
|
||||
est_co_nm
|
||||
est_ct_fn
|
||||
est_ctry
|
||||
est_ct_ln
|
||||
est_ea
|
||||
est_ph1
|
||||
est_st
|
||||
est_zip
|
||||
g_bett_amt
|
||||
id
|
||||
ins_addr1
|
||||
ins_city
|
||||
ins_addr2
|
||||
ins_co_id
|
||||
ins_co_nm
|
||||
ins_ct_fn
|
||||
ins_ct_ln
|
||||
ins_ct_ph
|
||||
ins_ct_phx
|
||||
ins_ctry
|
||||
ins_ea
|
||||
ins_fax
|
||||
ins_faxx
|
||||
ins_memo
|
||||
ins_ph1
|
||||
ins_ph1x
|
||||
ins_ph2
|
||||
ins_ph2x
|
||||
ins_st
|
||||
ins_title
|
||||
ins_zip
|
||||
insd_addr1
|
||||
insd_addr2
|
||||
insd_city
|
||||
insd_co_nm
|
||||
insd_ctry
|
||||
insd_ea
|
||||
insd_fax
|
||||
insd_faxx
|
||||
insd_fn
|
||||
insd_ln
|
||||
insd_ph1
|
||||
insd_ph1x
|
||||
insd_ph2
|
||||
insd_ph2x
|
||||
insd_st
|
||||
insd_title
|
||||
insd_zip
|
||||
job_totals
|
||||
loss_cat
|
||||
loss_date
|
||||
loss_desc
|
||||
loss_of_use
|
||||
loss_type
|
||||
ownr_addr1
|
||||
ownr_addr2
|
||||
ownr_city
|
||||
ownr_co_nm
|
||||
ownr_ctry
|
||||
ownr_ea
|
||||
ownr_fax
|
||||
ownr_faxx
|
||||
ownr_ph1
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_ph1x
|
||||
ownr_ph2
|
||||
ownr_ph2x
|
||||
ownr_st
|
||||
ownr_title
|
||||
ownr_zip
|
||||
parts_tax_rates
|
||||
pay_amt
|
||||
pay_date
|
||||
pay_type
|
||||
pay_chknm
|
||||
payee_nms
|
||||
plate_no
|
||||
plate_st
|
||||
po_number
|
||||
policy_no
|
||||
tax_lbr_rt
|
||||
tax_levies_rt
|
||||
tax_paint_mat_rt
|
||||
tax_predis
|
||||
tax_prethr
|
||||
tax_pstthr
|
||||
tax_registration_number
|
||||
tax_str_rt
|
||||
tax_shop_mat_rt
|
||||
tax_sub_rt
|
||||
tax_thramt
|
||||
tax_tow_rt
|
||||
theft_ind
|
||||
tlos_ind
|
||||
towin
|
||||
v_color
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
v_vin
|
||||
vehicle {
|
||||
v_bstyle
|
||||
v_type
|
||||
v_trimcode
|
||||
v_tone
|
||||
v_stage
|
||||
v_prod_dt
|
||||
v_options
|
||||
v_paint_codes
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_mldgcode
|
||||
v_makecode
|
||||
v_make_desc
|
||||
v_engine
|
||||
v_cond
|
||||
v_color
|
||||
trim_color
|
||||
shopid
|
||||
plate_no
|
||||
plate_st
|
||||
db_v_code
|
||||
v_vin
|
||||
}
|
||||
agt_zip
|
||||
agt_st
|
||||
agt_ph2x
|
||||
agt_ph2
|
||||
agt_ph1x
|
||||
agt_ph1
|
||||
agt_lic_no
|
||||
agt_faxx
|
||||
agt_fax
|
||||
agt_ea
|
||||
agt_ctry
|
||||
agt_ct_phx
|
||||
agt_ct_ph
|
||||
agt_ct_ln
|
||||
agt_ct_fn
|
||||
agt_co_nm
|
||||
agt_co_id
|
||||
agt_city
|
||||
agt_addr1
|
||||
agt_addr2
|
||||
adj_g_disc
|
||||
rate_matd
|
||||
rate_mash
|
||||
rate_mapa
|
||||
rate_mahw
|
||||
rate_macs
|
||||
rate_mabl
|
||||
rate_ma3s
|
||||
rate_ma2t
|
||||
rate_ma2s
|
||||
rate_lau
|
||||
rate_las
|
||||
rate_lar
|
||||
rate_lam
|
||||
rate_lag
|
||||
rate_laf
|
||||
rate_lae
|
||||
rate_lad
|
||||
rate_lab
|
||||
rate_laa
|
||||
rate_la4
|
||||
rate_la3
|
||||
rate_la2
|
||||
rate_la1
|
||||
}
|
||||
}
|
||||
act_price
|
||||
id
|
||||
db_price
|
||||
line_desc
|
||||
quantity
|
||||
part_type
|
||||
}
|
||||
job {
|
||||
bodyshop {
|
||||
shopname
|
||||
bill_tax_rates
|
||||
}
|
||||
ro_number
|
||||
clm_no
|
||||
asgn_no
|
||||
asgn_date
|
||||
state_tax_rate
|
||||
area_of_damage
|
||||
asgn_no
|
||||
asgn_type
|
||||
ciecaid
|
||||
clm_addr1
|
||||
clm_city
|
||||
clm_addr2
|
||||
clm_ct_fn
|
||||
clm_ct_ln
|
||||
clm_ct_ph
|
||||
clm_ct_phx
|
||||
clm_ctry
|
||||
clm_ea
|
||||
clm_fax
|
||||
clm_faxx
|
||||
clm_ofc_id
|
||||
clm_ofc_nm
|
||||
clm_ph1
|
||||
clm_ph1x
|
||||
clm_ph2
|
||||
clm_ph2x
|
||||
clm_st
|
||||
clm_title
|
||||
clm_total
|
||||
clm_zip
|
||||
ded_amt
|
||||
est_addr1
|
||||
est_addr2
|
||||
est_city
|
||||
est_co_nm
|
||||
est_ct_fn
|
||||
est_ctry
|
||||
est_ct_ln
|
||||
est_ea
|
||||
est_ph1
|
||||
est_st
|
||||
est_zip
|
||||
g_bett_amt
|
||||
id
|
||||
ins_addr1
|
||||
ins_city
|
||||
ins_addr2
|
||||
ins_co_id
|
||||
ins_co_nm
|
||||
ins_ct_fn
|
||||
ins_ct_ln
|
||||
ins_ct_ph
|
||||
ins_ct_phx
|
||||
ins_ctry
|
||||
ins_ea
|
||||
ins_fax
|
||||
ins_faxx
|
||||
ins_memo
|
||||
ins_ph1
|
||||
ins_ph1x
|
||||
ins_ph2
|
||||
ins_ph2x
|
||||
ins_st
|
||||
ins_title
|
||||
ins_zip
|
||||
insd_addr1
|
||||
insd_addr2
|
||||
insd_city
|
||||
insd_co_nm
|
||||
insd_ctry
|
||||
insd_ea
|
||||
insd_fax
|
||||
insd_faxx
|
||||
insd_fn
|
||||
insd_ln
|
||||
insd_ph1
|
||||
insd_ph1x
|
||||
insd_ph2
|
||||
insd_ph2x
|
||||
insd_st
|
||||
insd_title
|
||||
insd_zip
|
||||
job_totals
|
||||
loss_cat
|
||||
loss_date
|
||||
loss_desc
|
||||
loss_of_use
|
||||
loss_type
|
||||
ownr_addr1
|
||||
ownr_addr2
|
||||
ownr_city
|
||||
ownr_co_nm
|
||||
ownr_ctry
|
||||
ownr_ea
|
||||
ownr_fax
|
||||
ownr_faxx
|
||||
ownr_ph1
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_ph1x
|
||||
ownr_ph2
|
||||
ownr_ph2x
|
||||
ownr_st
|
||||
ownr_title
|
||||
ownr_zip
|
||||
parts_tax_rates
|
||||
pay_amt
|
||||
pay_date
|
||||
pay_type
|
||||
pay_chknm
|
||||
payee_nms
|
||||
plate_no
|
||||
plate_st
|
||||
po_number
|
||||
policy_no
|
||||
tax_lbr_rt
|
||||
tax_levies_rt
|
||||
tax_paint_mat_rt
|
||||
tax_predis
|
||||
tax_prethr
|
||||
tax_pstthr
|
||||
tax_registration_number
|
||||
tax_str_rt
|
||||
tax_shop_mat_rt
|
||||
tax_sub_rt
|
||||
tax_thramt
|
||||
tax_tow_rt
|
||||
theft_ind
|
||||
tlos_ind
|
||||
towin
|
||||
v_color
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
v_vin
|
||||
vehicle {
|
||||
v_bstyle
|
||||
v_type
|
||||
v_trimcode
|
||||
v_tone
|
||||
v_stage
|
||||
v_prod_dt
|
||||
v_options
|
||||
v_paint_codes
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_mldgcode
|
||||
v_makecode
|
||||
v_make_desc
|
||||
v_engine
|
||||
v_cond
|
||||
v_color
|
||||
trim_color
|
||||
shopid
|
||||
plate_no
|
||||
plate_st
|
||||
db_v_code
|
||||
v_vin
|
||||
}
|
||||
agt_zip
|
||||
agt_st
|
||||
agt_ph2x
|
||||
agt_ph2
|
||||
agt_ph1x
|
||||
agt_ph1
|
||||
agt_lic_no
|
||||
agt_faxx
|
||||
agt_fax
|
||||
agt_ea
|
||||
agt_ctry
|
||||
agt_ct_phx
|
||||
agt_ct_ph
|
||||
agt_ct_ln
|
||||
agt_ct_fn
|
||||
agt_co_nm
|
||||
agt_co_id
|
||||
agt_city
|
||||
agt_addr1
|
||||
agt_addr2
|
||||
adj_g_disc
|
||||
rate_matd
|
||||
rate_mash
|
||||
rate_mapa
|
||||
rate_mahw
|
||||
rate_macs
|
||||
rate_mabl
|
||||
rate_ma3s
|
||||
rate_ma2t
|
||||
rate_ma2s
|
||||
rate_lau
|
||||
rate_las
|
||||
rate_lar
|
||||
rate_lam
|
||||
rate_lag
|
||||
rate_laf
|
||||
rate_lae
|
||||
rate_lad
|
||||
rate_lab
|
||||
rate_laa
|
||||
rate_la4
|
||||
rate_la3
|
||||
rate_la2
|
||||
rate_la1
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_PARTS_ORDER = gql`
|
||||
mutation DELETE_PARTS_ORDER($partsOrderId: uuid!) {
|
||||
delete_parts_orders_by_pk(id: $partsOrderId) {
|
||||
id
|
||||
mutation DELETE_PARTS_ORDER($partsOrderId: uuid!) {
|
||||
delete_parts_orders_by_pk(id: $partsOrderId) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_PARTS_ORDER_LINE = gql`
|
||||
mutation DELETE_PARTS_ORDER_LINE($partsOrderLineId: uuid!) {
|
||||
delete_parts_order_lines_by_pk(id: $partsOrderLineId) {
|
||||
id
|
||||
mutation DELETE_PARTS_ORDER_LINE($partsOrderLineId: uuid!) {
|
||||
delete_parts_order_lines_by_pk(id: $partsOrderLineId) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const MUTATION_UPDATE_PO_CM_REECEIVED = gql`
|
||||
mutation MUTATION_UPDATE_PO_CM_REECEIVED(
|
||||
$partsLineId: uuid!
|
||||
$partsOrder: parts_order_lines_set_input
|
||||
) {
|
||||
update_parts_order_lines(
|
||||
where: { id: { _eq: $partsLineId } }
|
||||
_set: $partsOrder
|
||||
mutation MUTATION_UPDATE_PO_CM_REECEIVED(
|
||||
$partsLineId: uuid!
|
||||
$partsOrder: parts_order_lines_set_input
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
cm_received
|
||||
}
|
||||
update_parts_order_lines(
|
||||
where: { id: { _eq: $partsLineId } }
|
||||
_set: $partsOrder
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
cm_received
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const MUTATION_UPDATE_BO_ETA = gql`
|
||||
mutation MUTATION_UPDATE_BO_ETA(
|
||||
$partsLineId: uuid!
|
||||
$partsOrder: parts_order_lines_set_input
|
||||
) {
|
||||
update_parts_order_lines(
|
||||
where: { id: { _eq: $partsLineId } }
|
||||
_set: $partsOrder
|
||||
mutation MUTATION_UPDATE_BO_ETA(
|
||||
$partsLineId: uuid!
|
||||
$partsOrder: parts_order_lines_set_input
|
||||
) {
|
||||
returning {
|
||||
status
|
||||
backordered_eta
|
||||
id
|
||||
}
|
||||
update_parts_order_lines(
|
||||
where: { id: { _eq: $partsLineId } }
|
||||
_set: $partsOrder
|
||||
) {
|
||||
returning {
|
||||
status
|
||||
backordered_eta
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const MUTATION_BACKORDER_PART_LINE = gql`
|
||||
mutation MUTATION_BACKORDER_PART_LINE(
|
||||
$jobLineId: uuid!
|
||||
$partsLineId: uuid!
|
||||
$status: String!
|
||||
$partsOrder: parts_order_lines_set_input
|
||||
) {
|
||||
update_parts_order_lines(
|
||||
where: { id: { _eq: $partsLineId } }
|
||||
_set: $partsOrder
|
||||
mutation MUTATION_BACKORDER_PART_LINE(
|
||||
$jobLineId: uuid!
|
||||
$partsLineId: uuid!
|
||||
$status: String!
|
||||
$partsOrder: parts_order_lines_set_input
|
||||
) {
|
||||
returning {
|
||||
status
|
||||
backordered_on
|
||||
backordered_eta
|
||||
id
|
||||
}
|
||||
update_parts_order_lines(
|
||||
where: { id: { _eq: $partsLineId } }
|
||||
_set: $partsOrder
|
||||
) {
|
||||
returning {
|
||||
status
|
||||
backordered_on
|
||||
backordered_eta
|
||||
id
|
||||
}
|
||||
}
|
||||
update_joblines(
|
||||
where: { id: { _eq: $jobLineId } }
|
||||
_set: { status: $status }
|
||||
) {
|
||||
returning {
|
||||
status
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
update_joblines(
|
||||
where: { id: { _eq: $jobLineId } }
|
||||
_set: { status: $status }
|
||||
) {
|
||||
returning {
|
||||
status
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_UNRECEIVED_LINES = gql`
|
||||
query QUERY_UNRECEIVED_LINES($jobId: uuid!, $vendorId: uuid!) {
|
||||
parts_order_lines(
|
||||
where: {
|
||||
parts_order: { jobid: { _eq: $jobId }, vendorid: { _eq: $vendorId } }
|
||||
cm_received: { _neq: true }
|
||||
}
|
||||
) {
|
||||
cm_received
|
||||
id
|
||||
line_desc
|
||||
quantity
|
||||
act_price
|
||||
cost
|
||||
oem_partno
|
||||
query QUERY_UNRECEIVED_LINES($jobId: uuid!, $vendorId: uuid!) {
|
||||
parts_order_lines(
|
||||
where: {
|
||||
parts_order: { jobid: { _eq: $jobId }, vendorid: { _eq: $vendorId } }
|
||||
cm_received: { _neq: true }
|
||||
}
|
||||
) {
|
||||
cm_received
|
||||
id
|
||||
line_desc
|
||||
quantity
|
||||
act_price
|
||||
cost
|
||||
oem_partno
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const MUTATION_MARK_RETURN_RECEIVED = gql`
|
||||
mutation MUTATION_MARK_RETURN_RECEIVED($partsLineIds: [uuid!]!) {
|
||||
update_parts_order_lines(
|
||||
where: { id: { _in: $partsLineIds } }
|
||||
_set: { cm_received: true }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
cm_received
|
||||
}
|
||||
mutation MUTATION_MARK_RETURN_RECEIVED($partsLineIds: [uuid!]!) {
|
||||
update_parts_order_lines(
|
||||
where: { id: { _in: $partsLineIds } }
|
||||
_set: { cm_received: true }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
cm_received
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const INSERT_PAYMENT_RESPONSE = gql`
|
||||
mutation INSERT_PAYMENT_RESPONSE(
|
||||
$paymentResponse: [payment_response_insert_input!]!
|
||||
) {
|
||||
insert_payment_response(objects: $paymentResponse) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation INSERT_PAYMENT_RESPONSE(
|
||||
$paymentResponse: [payment_response_insert_input!]!
|
||||
) {
|
||||
insert_payment_response(objects: $paymentResponse) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_PAYMENT_RESPONSE_BY_PAYMENT_ID = gql`
|
||||
query QUERY_PAYMENT_RESPONSE_BY_PK($paymentid: uuid!) {
|
||||
payment_response(where: { paymentid: { _eq: $paymentid } }) {
|
||||
id
|
||||
jobid
|
||||
bodyshopid
|
||||
paymentid
|
||||
amount
|
||||
declinereason
|
||||
ext_paymentid
|
||||
successful
|
||||
response
|
||||
query QUERY_PAYMENT_RESPONSE_BY_PK($paymentid: uuid!) {
|
||||
payment_response(where: { paymentid: { _eq: $paymentid } }) {
|
||||
id
|
||||
jobid
|
||||
bodyshopid
|
||||
paymentid
|
||||
amount
|
||||
declinereason
|
||||
ext_paymentid
|
||||
successful
|
||||
response
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_RO_AND_OWNER_BY_JOB_PKS = gql`
|
||||
query QUERY_RO_AND_OWNER_BY_JOB_PKS($jobids: [uuid!]!) {
|
||||
jobs(where: { id: { _in: $jobids } }) {
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_ea
|
||||
ownr_zip
|
||||
query QUERY_RO_AND_OWNER_BY_JOB_PKS($jobids: [uuid!]!) {
|
||||
jobs(where: { id: { _in: $jobids } }) {
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_ea
|
||||
ownr_zip
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_REFUNDABLE_AMOUNT_BY_JOBID = gql`
|
||||
query GET_REFUNDABLE_AMOUNT_BY_JOBID($jobid: uuid!) {
|
||||
payment_response_aggregate(where: { jobid: { _eq: $jobid } }) {
|
||||
aggregate {
|
||||
sum {
|
||||
amount
|
||||
query GET_REFUNDABLE_AMOUNT_BY_JOBID($jobid: uuid!) {
|
||||
payment_response_aggregate(where: { jobid: { _eq: $jobid } }) {
|
||||
aggregate {
|
||||
sum {
|
||||
amount
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,182 +1,182 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const INSERT_NEW_PAYMENT = gql`
|
||||
mutation INSERT_NEW_PAYMENT($paymentInput: [payments_insert_input!]!) {
|
||||
insert_payments(objects: $paymentInput) {
|
||||
returning {
|
||||
id
|
||||
jobid
|
||||
amount
|
||||
payer
|
||||
created_at
|
||||
transactionid
|
||||
memo
|
||||
date
|
||||
type
|
||||
exportedat
|
||||
}
|
||||
mutation INSERT_NEW_PAYMENT($paymentInput: [payments_insert_input!]!) {
|
||||
insert_payments(objects: $paymentInput) {
|
||||
returning {
|
||||
id
|
||||
jobid
|
||||
amount
|
||||
payer
|
||||
created_at
|
||||
transactionid
|
||||
memo
|
||||
date
|
||||
type
|
||||
exportedat
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_ALL_PAYMENTS_PAGINATED = gql`
|
||||
query QUERY_ALL_PAYMENTS_PAGINATED(
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [payments_order_by!]!
|
||||
) {
|
||||
payments(offset: $offset, limit: $limit, order_by: $order) {
|
||||
id
|
||||
amount
|
||||
created_at
|
||||
date
|
||||
exportedat
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ownerid
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
owner {
|
||||
id
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
query QUERY_ALL_PAYMENTS_PAGINATED(
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [payments_order_by!]!
|
||||
) {
|
||||
payments(offset: $offset, limit: $limit, order_by: $order) {
|
||||
id
|
||||
amount
|
||||
created_at
|
||||
date
|
||||
exportedat
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ownerid
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
owner {
|
||||
id
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
}
|
||||
ro_number
|
||||
}
|
||||
memo
|
||||
payer
|
||||
paymentnum
|
||||
stripeid
|
||||
transactionid
|
||||
type
|
||||
}
|
||||
payments_aggregate {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
ro_number
|
||||
}
|
||||
memo
|
||||
payer
|
||||
paymentnum
|
||||
stripeid
|
||||
transactionid
|
||||
type
|
||||
}
|
||||
payments_aggregate {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_PAYMENT = gql`
|
||||
mutation UPDATE_PAYMENT($paymentId: uuid!, $payment: payments_set_input!) {
|
||||
update_payments(where: { id: { _eq: $paymentId } }, _set: $payment) {
|
||||
returning {
|
||||
id
|
||||
amount
|
||||
created_at
|
||||
date
|
||||
exportedat
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ownerid
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
owner {
|
||||
id
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
}
|
||||
ro_number
|
||||
mutation UPDATE_PAYMENT($paymentId: uuid!, $payment: payments_set_input!) {
|
||||
update_payments(where: { id: { _eq: $paymentId } }, _set: $payment) {
|
||||
returning {
|
||||
id
|
||||
amount
|
||||
created_at
|
||||
date
|
||||
exportedat
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ownerid
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
owner {
|
||||
id
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
}
|
||||
ro_number
|
||||
}
|
||||
memo
|
||||
payer
|
||||
paymentnum
|
||||
stripeid
|
||||
transactionid
|
||||
type
|
||||
}
|
||||
}
|
||||
memo
|
||||
payer
|
||||
paymentnum
|
||||
stripeid
|
||||
transactionid
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_PAYMENTS = gql`
|
||||
mutation UPDATE_PAYMENTS(
|
||||
$paymentIdList: [uuid!]!
|
||||
$payment: payments_set_input!
|
||||
) {
|
||||
update_payments(where: { id: { _in: $paymentIdList } }, _set: $payment) {
|
||||
returning {
|
||||
id
|
||||
amount
|
||||
created_at
|
||||
date
|
||||
exportedat
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ownerid
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
owner {
|
||||
id
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
}
|
||||
ro_number
|
||||
mutation UPDATE_PAYMENTS(
|
||||
$paymentIdList: [uuid!]!
|
||||
$payment: payments_set_input!
|
||||
) {
|
||||
update_payments(where: { id: { _in: $paymentIdList } }, _set: $payment) {
|
||||
returning {
|
||||
id
|
||||
amount
|
||||
created_at
|
||||
date
|
||||
exportedat
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ownerid
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
owner {
|
||||
id
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
}
|
||||
ro_number
|
||||
}
|
||||
memo
|
||||
payer
|
||||
paymentnum
|
||||
stripeid
|
||||
transactionid
|
||||
type
|
||||
}
|
||||
}
|
||||
memo
|
||||
payer
|
||||
paymentnum
|
||||
stripeid
|
||||
transactionid
|
||||
type
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_JOB_PAYMENT_TOTALS = gql`
|
||||
query QUERY_JOB_PAYMENT_TOTALS($id: uuid!) {
|
||||
jobs_by_pk(id: $id) {
|
||||
id
|
||||
job_totals
|
||||
payments {
|
||||
id
|
||||
amount
|
||||
date
|
||||
}
|
||||
query QUERY_JOB_PAYMENT_TOTALS($id: uuid!) {
|
||||
jobs_by_pk(id: $id) {
|
||||
id
|
||||
job_totals
|
||||
payments {
|
||||
id
|
||||
amount
|
||||
date
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_PAYMENT_BY_ID = gql`
|
||||
query QUERY_PAYMENT_BY_ID($paymentId: uuid!) {
|
||||
payments_by_pk(id: $paymentId) {
|
||||
id
|
||||
amount
|
||||
created_at
|
||||
exportedat
|
||||
date
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ownerid
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
owner {
|
||||
id
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
query QUERY_PAYMENT_BY_ID($paymentId: uuid!) {
|
||||
payments_by_pk(id: $paymentId) {
|
||||
id
|
||||
amount
|
||||
created_at
|
||||
exportedat
|
||||
date
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ownerid
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
owner {
|
||||
id
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
}
|
||||
ro_number
|
||||
}
|
||||
memo
|
||||
payer
|
||||
paymentnum
|
||||
stripeid
|
||||
transactionid
|
||||
type
|
||||
}
|
||||
ro_number
|
||||
}
|
||||
memo
|
||||
payer
|
||||
paymentnum
|
||||
stripeid
|
||||
transactionid
|
||||
type
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,92 +1,92 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_PHONEBOOK_PAGINATED = gql`
|
||||
query QUERY_PHONEBOOK_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [phonebook_order_by!]
|
||||
) {
|
||||
search_phonebook(
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
args: { search: $search }
|
||||
query QUERY_PHONEBOOK_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [phonebook_order_by!]
|
||||
) {
|
||||
id
|
||||
created_at
|
||||
firstname
|
||||
lastname
|
||||
phone1
|
||||
phone2
|
||||
state
|
||||
zip
|
||||
fax
|
||||
email
|
||||
country
|
||||
company
|
||||
city
|
||||
category
|
||||
address2
|
||||
address1
|
||||
search_phonebook(
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
args: { search: $search }
|
||||
) {
|
||||
id
|
||||
created_at
|
||||
firstname
|
||||
lastname
|
||||
phone1
|
||||
phone2
|
||||
state
|
||||
zip
|
||||
fax
|
||||
email
|
||||
country
|
||||
company
|
||||
city
|
||||
category
|
||||
address2
|
||||
address1
|
||||
}
|
||||
search_phonebook_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
search_phonebook_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_PHONEBOOK_BY_ID = gql`
|
||||
query QUERY_PHONEBOOK_BY_ID($id: uuid!) {
|
||||
phonebook_by_pk(id: $id) {
|
||||
id
|
||||
created_at
|
||||
firstname
|
||||
lastname
|
||||
phone1
|
||||
phone2
|
||||
state
|
||||
zip
|
||||
fax
|
||||
email
|
||||
country
|
||||
company
|
||||
city
|
||||
category
|
||||
address2
|
||||
address1
|
||||
query QUERY_PHONEBOOK_BY_ID($id: uuid!) {
|
||||
phonebook_by_pk(id: $id) {
|
||||
id
|
||||
created_at
|
||||
firstname
|
||||
lastname
|
||||
phone1
|
||||
phone2
|
||||
state
|
||||
zip
|
||||
fax
|
||||
email
|
||||
country
|
||||
company
|
||||
city
|
||||
category
|
||||
address2
|
||||
address1
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_PHONEBOOK = gql`
|
||||
mutation UPDATE_VENDOR($id: uuid!, $phonebook: phonebook_set_input!) {
|
||||
update_phonebook(where: { id: { _eq: $id } }, _set: $phonebook) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation UPDATE_VENDOR($id: uuid!, $phonebook: phonebook_set_input!) {
|
||||
update_phonebook(where: { id: { _eq: $id } }, _set: $phonebook) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_NEW_PHONEBOOK = gql`
|
||||
mutation INSERT_NEW_PHONEBOOK($phonebook_entry: [phonebook_insert_input!]!) {
|
||||
insert_phonebook(objects: $phonebook_entry) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation INSERT_NEW_PHONEBOOK($phonebook_entry: [phonebook_insert_input!]!) {
|
||||
insert_phonebook(objects: $phonebook_entry) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_PHONEBOOK = gql`
|
||||
mutation DELETE_PHONEBOOK($id: uuid!) {
|
||||
delete_phonebook(where: { id: { _eq: $id } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation DELETE_PHONEBOOK($id: uuid!) {
|
||||
delete_phonebook(where: { id: { _eq: $id } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { buildSchema } from "graphql";
|
||||
import {buildSchema} from "graphql";
|
||||
|
||||
export default buildSchema(`
|
||||
schema {
|
||||
|
||||
@@ -1,129 +1,129 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_SCOREBOARD = gql`
|
||||
query QUERY_SCOREBOARD($start: date!, $end: date!) {
|
||||
scoreboard(
|
||||
where: { _and: { date: { _gte: $start, _lte: $end } } }
|
||||
order_by: { date: asc }
|
||||
) {
|
||||
id
|
||||
painthrs
|
||||
bodyhrs
|
||||
date
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
job_totals
|
||||
}
|
||||
query QUERY_SCOREBOARD($start: date!, $end: date!) {
|
||||
scoreboard(
|
||||
where: { _and: { date: { _gte: $start, _lte: $end } } }
|
||||
order_by: { date: asc }
|
||||
) {
|
||||
id
|
||||
painthrs
|
||||
bodyhrs
|
||||
date
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
job_totals
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_SCOREBOARD_ENTRY = gql`
|
||||
mutation DELETE_SCOREBOARD_ENTRY($sbId: uuid!) {
|
||||
delete_scoreboard_by_pk(id: $sbId) {
|
||||
id
|
||||
mutation DELETE_SCOREBOARD_ENTRY($sbId: uuid!) {
|
||||
delete_scoreboard_by_pk(id: $sbId) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const INSERT_SCOREBOARD_ENTRY = gql`
|
||||
mutation INSERT_SCOREBOARD_ENTRY($sbInput: [scoreboard_insert_input!]!) {
|
||||
insert_scoreboard(objects: $sbInput) {
|
||||
returning {
|
||||
id
|
||||
date
|
||||
bodyhrs
|
||||
painthrs
|
||||
}
|
||||
mutation INSERT_SCOREBOARD_ENTRY($sbInput: [scoreboard_insert_input!]!) {
|
||||
insert_scoreboard(objects: $sbInput) {
|
||||
returning {
|
||||
id
|
||||
date
|
||||
bodyhrs
|
||||
painthrs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_SCOREBOARD_ENTRY = gql`
|
||||
mutation UPDATE_SCOREBOARD_ENTRY(
|
||||
$sbId: uuid!
|
||||
$sbInput: scoreboard_set_input!
|
||||
) {
|
||||
update_scoreboard_by_pk(_set: $sbInput, pk_columns: { id: $sbId }) {
|
||||
id
|
||||
date
|
||||
bodyhrs
|
||||
painthrs
|
||||
mutation UPDATE_SCOREBOARD_ENTRY(
|
||||
$sbId: uuid!
|
||||
$sbInput: scoreboard_set_input!
|
||||
) {
|
||||
update_scoreboard_by_pk(_set: $sbInput, pk_columns: { id: $sbId }) {
|
||||
id
|
||||
date
|
||||
bodyhrs
|
||||
painthrs
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_SCOREBOARD_ENTRY = gql`
|
||||
query QUERY_SCOREBOARD_ENTRY($jobid: uuid!) {
|
||||
scoreboard(where: { jobid: { _eq: $jobid } }) {
|
||||
bodyhrs
|
||||
date
|
||||
id
|
||||
painthrs
|
||||
query QUERY_SCOREBOARD_ENTRY($jobid: uuid!) {
|
||||
scoreboard(where: { jobid: { _eq: $jobid } }) {
|
||||
bodyhrs
|
||||
date
|
||||
id
|
||||
painthrs
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_BLOCKED_DAYS = gql`
|
||||
query GET_BLOCKED_DAYS($start: timestamptz, $end: timestamptz) {
|
||||
appointments(
|
||||
where: {
|
||||
_and: [
|
||||
{ block: { _eq: true } }
|
||||
{ canceled: { _eq: false } }
|
||||
{ start: { _gte: $start } }
|
||||
{ end: { _lte: $end } }
|
||||
]
|
||||
}
|
||||
) {
|
||||
id
|
||||
block
|
||||
start
|
||||
end
|
||||
query GET_BLOCKED_DAYS($start: timestamptz, $end: timestamptz) {
|
||||
appointments(
|
||||
where: {
|
||||
_and: [
|
||||
{ block: { _eq: true } }
|
||||
{ canceled: { _eq: false } }
|
||||
{ start: { _gte: $start } }
|
||||
{ end: { _lte: $end } }
|
||||
]
|
||||
}
|
||||
) {
|
||||
id
|
||||
block
|
||||
start
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_SCOREBOARD_PAGINATED = gql`
|
||||
query QUERY_SCOREBOARD_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [scoreboard_order_by!]
|
||||
) {
|
||||
scoreboard(
|
||||
where: { job: { ro_number: { _ilike: $search } } }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
query QUERY_SCOREBOARD_PAGINATED(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [scoreboard_order_by!]
|
||||
) {
|
||||
id
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
invoice_date
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
}
|
||||
date
|
||||
bodyhrs
|
||||
painthrs
|
||||
scoreboard(
|
||||
where: { job: { ro_number: { _ilike: $search } } }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
) {
|
||||
id
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
invoice_date
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
}
|
||||
date
|
||||
bodyhrs
|
||||
painthrs
|
||||
}
|
||||
scoreboard_aggregate(where: { job: { ro_number: { _ilike: $search } } }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
scoreboard_aggregate(where: { job: { ro_number: { _ilike: $search } } }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const GLOBAL_SEARCH_QUERY = gql`
|
||||
query GLOBAL_SEARCH_QUERY($search: String) {
|
||||
search_jobs(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
ro_number
|
||||
status
|
||||
clm_no
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_color
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
query GLOBAL_SEARCH_QUERY($search: String) {
|
||||
search_jobs(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
ro_number
|
||||
status
|
||||
clm_no
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_color
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
}
|
||||
search_owners(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ownr_ph1
|
||||
ownr_ph2
|
||||
}
|
||||
search_vehicles(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_color
|
||||
v_vin
|
||||
plate_no
|
||||
}
|
||||
search_payments(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
amount
|
||||
paymentnum
|
||||
job {
|
||||
ro_number
|
||||
id
|
||||
}
|
||||
memo
|
||||
transactionid
|
||||
}
|
||||
search_bills(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
date
|
||||
invoice_number
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
search_phonebook(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
firstname
|
||||
lastname
|
||||
company
|
||||
phone1
|
||||
}
|
||||
}
|
||||
search_owners(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
ownr_ph1
|
||||
ownr_ph2
|
||||
}
|
||||
search_vehicles(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_color
|
||||
v_vin
|
||||
plate_no
|
||||
}
|
||||
search_payments(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
amount
|
||||
paymentnum
|
||||
job {
|
||||
ro_number
|
||||
id
|
||||
}
|
||||
memo
|
||||
transactionid
|
||||
}
|
||||
search_bills(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
date
|
||||
invoice_number
|
||||
vendor {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
search_phonebook(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
firstname
|
||||
lastname
|
||||
company
|
||||
phone1
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,76 +1,76 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_TEMPLATES_BY_NAME = gql`
|
||||
query QUERY_TEMPLATES_BY_NAME($name: String!) {
|
||||
templates(where: { name: { _eq: $name } }) {
|
||||
id
|
||||
name
|
||||
query
|
||||
html
|
||||
bodyshopid
|
||||
query QUERY_TEMPLATES_BY_NAME($name: String!) {
|
||||
templates(where: { name: { _eq: $name } }) {
|
||||
id
|
||||
name
|
||||
query
|
||||
html
|
||||
bodyshopid
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const QUERY_TEMPLATES_BY_NAME_FOR_DUPE = gql`
|
||||
query QUERY_TEMPLATES_BY_NAME_FOR_DUPE($name: String!) {
|
||||
templates(where: { name: { _eq: $name } }) {
|
||||
id
|
||||
name
|
||||
query
|
||||
html
|
||||
bodyshopid
|
||||
jsontemplate
|
||||
query QUERY_TEMPLATES_BY_NAME_FOR_DUPE($name: String!) {
|
||||
templates(where: { name: { _eq: $name } }) {
|
||||
id
|
||||
name
|
||||
query
|
||||
html
|
||||
bodyshopid
|
||||
jsontemplate
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_CUSTOM_TEMPLATES = gql`
|
||||
query QUERY_CUSTOM_TEMPLATES {
|
||||
templates(where: { bodyshopid: { _is_null: false } }) {
|
||||
id
|
||||
name
|
||||
query QUERY_CUSTOM_TEMPLATES {
|
||||
templates(where: { bodyshopid: { _is_null: false } }) {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_TEMPLATE_BY_PK = gql`
|
||||
query QUERY_TEMPLATE_BY_PK($templateId: uuid!) {
|
||||
templates_by_pk(id: $templateId) {
|
||||
id
|
||||
name
|
||||
query
|
||||
html
|
||||
jsontemplate
|
||||
query QUERY_TEMPLATE_BY_PK($templateId: uuid!) {
|
||||
templates_by_pk(id: $templateId) {
|
||||
id
|
||||
name
|
||||
query
|
||||
html
|
||||
jsontemplate
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const UPDATE_TEMPLATE = gql`
|
||||
mutation UPDATE_TEMPLATE(
|
||||
$templateId: uuid!
|
||||
$template: templates_set_input!
|
||||
) {
|
||||
update_templates(where: { id: { _eq: $templateId } }, _set: $template) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation UPDATE_TEMPLATE(
|
||||
$templateId: uuid!
|
||||
$template: templates_set_input!
|
||||
) {
|
||||
update_templates(where: { id: { _eq: $templateId } }, _set: $template) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_TEMPLATE = gql`
|
||||
mutation INSERT_TEMPLATE($template: templates_insert_input!) {
|
||||
insert_templates(objects: [$template]) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation INSERT_TEMPLATE($template: templates_insert_input!) {
|
||||
insert_templates(objects: [$template]) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_TEMPLATE = gql`
|
||||
mutation DELETE_TEMPLATE($templateId: uuid!) {
|
||||
delete_templates(where: { id: { _eq: $templateId } }) {
|
||||
affected_rows
|
||||
mutation DELETE_TEMPLATE($templateId: uuid!) {
|
||||
delete_templates(where: { id: { _eq: $templateId } }) {
|
||||
affected_rows
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,442 +1,442 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_TICKETS_BY_JOBID = gql`
|
||||
query QUERY_TICKETS_BY_JOBID($jobid: uuid!) {
|
||||
timetickets(
|
||||
where: { jobid: { _eq: $jobid } }
|
||||
order_by: { date: desc_nulls_first }
|
||||
) {
|
||||
actualhrs
|
||||
cost_center
|
||||
ciecacode
|
||||
rate
|
||||
productivehrs
|
||||
id
|
||||
memo
|
||||
jobid
|
||||
flat_rate
|
||||
commited_by
|
||||
committed_at
|
||||
employee {
|
||||
employee_number
|
||||
first_name
|
||||
last_name
|
||||
id
|
||||
}
|
||||
query QUERY_TICKETS_BY_JOBID($jobid: uuid!) {
|
||||
timetickets(
|
||||
where: { jobid: { _eq: $jobid } }
|
||||
order_by: { date: desc_nulls_first }
|
||||
) {
|
||||
actualhrs
|
||||
cost_center
|
||||
ciecacode
|
||||
rate
|
||||
productivehrs
|
||||
id
|
||||
memo
|
||||
jobid
|
||||
flat_rate
|
||||
commited_by
|
||||
committed_at
|
||||
employee {
|
||||
employee_number
|
||||
first_name
|
||||
last_name
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_TIME_TICKETS_IN_RANGE = gql`
|
||||
query QUERY_TIME_TICKETS_IN_RANGE($start: date!, $end: date!) {
|
||||
timetickets(
|
||||
where: { date: { _gte: $start, _lte: $end } }
|
||||
order_by: { date: desc_nulls_first }
|
||||
) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
clockoff
|
||||
clockon
|
||||
cost_center
|
||||
created_at
|
||||
created_by
|
||||
date
|
||||
id
|
||||
rate
|
||||
productivehrs
|
||||
memo
|
||||
jobid
|
||||
flat_rate
|
||||
commited_by
|
||||
committed_at
|
||||
task_name
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
employeeid
|
||||
employee {
|
||||
id
|
||||
employee_number
|
||||
first_name
|
||||
last_name
|
||||
}
|
||||
query QUERY_TIME_TICKETS_IN_RANGE($start: date!, $end: date!) {
|
||||
timetickets(
|
||||
where: { date: { _gte: $start, _lte: $end } }
|
||||
order_by: { date: desc_nulls_first }
|
||||
) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
clockoff
|
||||
clockon
|
||||
cost_center
|
||||
created_at
|
||||
created_by
|
||||
date
|
||||
id
|
||||
rate
|
||||
productivehrs
|
||||
memo
|
||||
jobid
|
||||
flat_rate
|
||||
commited_by
|
||||
committed_at
|
||||
task_name
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
employeeid
|
||||
employee {
|
||||
id
|
||||
employee_number
|
||||
first_name
|
||||
last_name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_TIME_TICKETS_TECHNICIAN_IN_RANGE = gql`
|
||||
query QUERY_TIME_TICKETS_TECHNICIAN_IN_RANGE(
|
||||
$employeeid: uuid!
|
||||
$start: date!
|
||||
$end: date!
|
||||
$fixedStart: date!
|
||||
$fixedEnd: date!
|
||||
) {
|
||||
timetickets(
|
||||
where: {
|
||||
date: { _gte: $start, _lte: $end }
|
||||
employeeid: { _eq: $employeeid }
|
||||
}
|
||||
order_by: { date: desc_nulls_first }
|
||||
query QUERY_TIME_TICKETS_TECHNICIAN_IN_RANGE(
|
||||
$employeeid: uuid!
|
||||
$start: date!
|
||||
$end: date!
|
||||
$fixedStart: date!
|
||||
$fixedEnd: date!
|
||||
) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
clockoff
|
||||
clockon
|
||||
cost_center
|
||||
created_at
|
||||
created_by
|
||||
date
|
||||
id
|
||||
rate
|
||||
productivehrs
|
||||
memo
|
||||
jobid
|
||||
commited_by
|
||||
committed_at
|
||||
flat_rate
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
employeeid
|
||||
employee {
|
||||
id
|
||||
employee_number
|
||||
first_name
|
||||
last_name
|
||||
}
|
||||
timetickets(
|
||||
where: {
|
||||
date: { _gte: $start, _lte: $end }
|
||||
employeeid: { _eq: $employeeid }
|
||||
}
|
||||
order_by: { date: desc_nulls_first }
|
||||
) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
clockoff
|
||||
clockon
|
||||
cost_center
|
||||
created_at
|
||||
created_by
|
||||
date
|
||||
id
|
||||
rate
|
||||
productivehrs
|
||||
memo
|
||||
jobid
|
||||
commited_by
|
||||
committed_at
|
||||
flat_rate
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
employeeid
|
||||
employee {
|
||||
id
|
||||
employee_number
|
||||
first_name
|
||||
last_name
|
||||
}
|
||||
}
|
||||
fixedperiod: timetickets(
|
||||
where: {
|
||||
date: { _gte: $fixedStart, _lte: $fixedEnd }
|
||||
employeeid: { _eq: $employeeid }
|
||||
}
|
||||
order_by: { date: desc_nulls_first }
|
||||
) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
clockoff
|
||||
clockon
|
||||
cost_center
|
||||
created_at
|
||||
created_by
|
||||
date
|
||||
id
|
||||
rate
|
||||
productivehrs
|
||||
memo
|
||||
jobid
|
||||
flat_rate
|
||||
commited_by
|
||||
committed_at
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
employeeid
|
||||
employee {
|
||||
id
|
||||
employee_number
|
||||
first_name
|
||||
last_name
|
||||
}
|
||||
}
|
||||
}
|
||||
fixedperiod: timetickets(
|
||||
where: {
|
||||
date: { _gte: $fixedStart, _lte: $fixedEnd }
|
||||
employeeid: { _eq: $employeeid }
|
||||
}
|
||||
order_by: { date: desc_nulls_first }
|
||||
) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
clockoff
|
||||
clockon
|
||||
cost_center
|
||||
created_at
|
||||
created_by
|
||||
date
|
||||
id
|
||||
rate
|
||||
productivehrs
|
||||
memo
|
||||
jobid
|
||||
flat_rate
|
||||
commited_by
|
||||
committed_at
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
employeeid
|
||||
employee {
|
||||
id
|
||||
employee_number
|
||||
first_name
|
||||
last_name
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_TIME_TICKETS_IN_RANGE_SB = gql`
|
||||
query QUERY_TIME_TICKETS_IN_RANGE_SB(
|
||||
$start: date!
|
||||
$end: date!
|
||||
$fixedStart: date!
|
||||
$fixedEnd: date!
|
||||
$jobStart: timestamptz!
|
||||
$jobEnd: timestamptz!
|
||||
) {
|
||||
timetickets(
|
||||
where: {
|
||||
date: { _gte: $start, _lte: $end }
|
||||
cost_center: { _neq: "timetickets.labels.shift" }
|
||||
}
|
||||
order_by: { date: desc_nulls_first }
|
||||
query QUERY_TIME_TICKETS_IN_RANGE_SB(
|
||||
$start: date!
|
||||
$end: date!
|
||||
$fixedStart: date!
|
||||
$fixedEnd: date!
|
||||
$jobStart: timestamptz!
|
||||
$jobEnd: timestamptz!
|
||||
) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
clockoff
|
||||
clockon
|
||||
cost_center
|
||||
created_at
|
||||
created_by
|
||||
date
|
||||
id
|
||||
rate
|
||||
actualhrs
|
||||
productivehrs
|
||||
memo
|
||||
jobid
|
||||
committed_at
|
||||
commited_by
|
||||
flat_rate
|
||||
commited_by
|
||||
committed_at
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
employeeid
|
||||
employee {
|
||||
id
|
||||
employee_number
|
||||
first_name
|
||||
last_name
|
||||
}
|
||||
timetickets(
|
||||
where: {
|
||||
date: { _gte: $start, _lte: $end }
|
||||
cost_center: { _neq: "timetickets.labels.shift" }
|
||||
}
|
||||
order_by: { date: desc_nulls_first }
|
||||
) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
clockoff
|
||||
clockon
|
||||
cost_center
|
||||
created_at
|
||||
created_by
|
||||
date
|
||||
id
|
||||
rate
|
||||
actualhrs
|
||||
productivehrs
|
||||
memo
|
||||
jobid
|
||||
committed_at
|
||||
commited_by
|
||||
flat_rate
|
||||
commited_by
|
||||
committed_at
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
employeeid
|
||||
employee {
|
||||
id
|
||||
employee_number
|
||||
first_name
|
||||
last_name
|
||||
}
|
||||
}
|
||||
fixedperiod: timetickets(
|
||||
where: {
|
||||
date: { _gte: $fixedStart, _lte: $fixedEnd }
|
||||
cost_center: { _neq: "timetickets.labels.shift" }
|
||||
}
|
||||
order_by: { date: desc_nulls_first }
|
||||
) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
clockoff
|
||||
clockon
|
||||
cost_center
|
||||
created_at
|
||||
created_by
|
||||
date
|
||||
id
|
||||
rate
|
||||
productivehrs
|
||||
memo
|
||||
jobid
|
||||
flat_rate
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
employeeid
|
||||
employee {
|
||||
id
|
||||
employee_number
|
||||
first_name
|
||||
last_name
|
||||
}
|
||||
}
|
||||
jobs(
|
||||
where: {
|
||||
date_invoiced: { _is_null: true }
|
||||
ro_number: { _is_null: false }
|
||||
voided: { _eq: false }
|
||||
_or: [
|
||||
{ actual_completion: { _gte: $jobStart, _lte: $jobEnd } }
|
||||
{ actual_delivery: { _gte: $jobStart, _lte: $jobEnd } }
|
||||
]
|
||||
}
|
||||
) {
|
||||
id
|
||||
joblines(order_by: { line_no: asc }, where: { removed: { _eq: false } }) {
|
||||
convertedtolbr
|
||||
convertedtolbr_data
|
||||
mod_lb_hrs
|
||||
mod_lbr_ty
|
||||
}
|
||||
}
|
||||
}
|
||||
fixedperiod: timetickets(
|
||||
where: {
|
||||
date: { _gte: $fixedStart, _lte: $fixedEnd }
|
||||
cost_center: { _neq: "timetickets.labels.shift" }
|
||||
}
|
||||
order_by: { date: desc_nulls_first }
|
||||
) {
|
||||
actualhrs
|
||||
ciecacode
|
||||
clockoff
|
||||
clockon
|
||||
cost_center
|
||||
created_at
|
||||
created_by
|
||||
date
|
||||
id
|
||||
rate
|
||||
productivehrs
|
||||
memo
|
||||
jobid
|
||||
flat_rate
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
}
|
||||
employeeid
|
||||
employee {
|
||||
id
|
||||
employee_number
|
||||
first_name
|
||||
last_name
|
||||
}
|
||||
}
|
||||
jobs(
|
||||
where: {
|
||||
date_invoiced: { _is_null: true }
|
||||
ro_number: { _is_null: false }
|
||||
voided: { _eq: false }
|
||||
_or: [
|
||||
{ actual_completion: { _gte: $jobStart, _lte: $jobEnd } }
|
||||
{ actual_delivery: { _gte: $jobStart, _lte: $jobEnd } }
|
||||
]
|
||||
}
|
||||
) {
|
||||
id
|
||||
joblines(order_by: { line_no: asc }, where: { removed: { _eq: false } }) {
|
||||
convertedtolbr
|
||||
convertedtolbr_data
|
||||
mod_lb_hrs
|
||||
mod_lbr_ty
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_NEW_TIME_TICKET = gql`
|
||||
mutation INSERT_NEW_TIME_TICKET(
|
||||
$timeTicketInput: [timetickets_insert_input!]!
|
||||
) {
|
||||
insert_timetickets(objects: $timeTicketInput) {
|
||||
returning {
|
||||
id
|
||||
created_by
|
||||
clockon
|
||||
clockoff
|
||||
employeeid
|
||||
productivehrs
|
||||
actualhrs
|
||||
ciecacode
|
||||
date
|
||||
memo
|
||||
flat_rate
|
||||
commited_by
|
||||
committed_at
|
||||
}
|
||||
mutation INSERT_NEW_TIME_TICKET(
|
||||
$timeTicketInput: [timetickets_insert_input!]!
|
||||
) {
|
||||
insert_timetickets(objects: $timeTicketInput) {
|
||||
returning {
|
||||
id
|
||||
created_by
|
||||
clockon
|
||||
clockoff
|
||||
employeeid
|
||||
productivehrs
|
||||
actualhrs
|
||||
ciecacode
|
||||
date
|
||||
memo
|
||||
flat_rate
|
||||
commited_by
|
||||
committed_at
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_TIME_TICKET_AND_APPROVE = gql`
|
||||
mutation INSERT_TIME_TICKET_AND_APPROVE(
|
||||
$timeTicketInput: [timetickets_insert_input!]!
|
||||
$approvalIds: [uuid!]!
|
||||
$approvalUpdate: tt_approval_queue_set_input
|
||||
) {
|
||||
insert_timetickets(objects: $timeTicketInput) {
|
||||
returning {
|
||||
id
|
||||
clockon
|
||||
clockoff
|
||||
employeeid
|
||||
productivehrs
|
||||
actualhrs
|
||||
ciecacode
|
||||
date
|
||||
memo
|
||||
flat_rate
|
||||
commited_by
|
||||
committed_at
|
||||
}
|
||||
}
|
||||
update_tt_approval_queue(
|
||||
where: { id: { _in: $approvalIds } }
|
||||
_set: $approvalUpdate
|
||||
mutation INSERT_TIME_TICKET_AND_APPROVE(
|
||||
$timeTicketInput: [timetickets_insert_input!]!
|
||||
$approvalIds: [uuid!]!
|
||||
$approvalUpdate: tt_approval_queue_set_input
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
approved_at
|
||||
approved_at
|
||||
insert_timetickets(objects: $timeTicketInput) {
|
||||
returning {
|
||||
id
|
||||
clockon
|
||||
clockoff
|
||||
employeeid
|
||||
productivehrs
|
||||
actualhrs
|
||||
ciecacode
|
||||
date
|
||||
memo
|
||||
flat_rate
|
||||
commited_by
|
||||
committed_at
|
||||
}
|
||||
}
|
||||
update_tt_approval_queue(
|
||||
where: { id: { _in: $approvalIds } }
|
||||
_set: $approvalUpdate
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
approved_at
|
||||
approved_at
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_TIME_TICKET = gql`
|
||||
mutation UPDATE_TIME_TICKET(
|
||||
$timeticketId: uuid!
|
||||
$timeticket: timetickets_set_input!
|
||||
) {
|
||||
update_timetickets(
|
||||
where: { id: { _eq: $timeticketId } }
|
||||
_set: $timeticket
|
||||
mutation UPDATE_TIME_TICKET(
|
||||
$timeticketId: uuid!
|
||||
$timeticket: timetickets_set_input!
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
clockon
|
||||
clockoff
|
||||
employeeid
|
||||
productivehrs
|
||||
actualhrs
|
||||
ciecacode
|
||||
created_at
|
||||
updated_at
|
||||
jobid
|
||||
date
|
||||
flat_rate
|
||||
memo
|
||||
committed_at
|
||||
commited_by
|
||||
}
|
||||
update_timetickets(
|
||||
where: { id: { _eq: $timeticketId } }
|
||||
_set: $timeticket
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
clockon
|
||||
clockoff
|
||||
employeeid
|
||||
productivehrs
|
||||
actualhrs
|
||||
ciecacode
|
||||
created_at
|
||||
updated_at
|
||||
jobid
|
||||
date
|
||||
flat_rate
|
||||
memo
|
||||
committed_at
|
||||
commited_by
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_TIME_TICKETS = gql`
|
||||
mutation UPDATE_TIME_TICKETS(
|
||||
$timeticketIds: [uuid!]!
|
||||
$timeticket: timetickets_set_input!
|
||||
) {
|
||||
update_timetickets(
|
||||
where: { id: { _in: $timeticketIds } }
|
||||
_set: $timeticket
|
||||
mutation UPDATE_TIME_TICKETS(
|
||||
$timeticketIds: [uuid!]!
|
||||
$timeticket: timetickets_set_input!
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
clockon
|
||||
clockoff
|
||||
employeeid
|
||||
productivehrs
|
||||
actualhrs
|
||||
ciecacode
|
||||
created_at
|
||||
updated_at
|
||||
jobid
|
||||
date
|
||||
flat_rate
|
||||
memo
|
||||
committed_at
|
||||
commited_by
|
||||
}
|
||||
update_timetickets(
|
||||
where: { id: { _in: $timeticketIds } }
|
||||
_set: $timeticket
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
clockon
|
||||
clockoff
|
||||
employeeid
|
||||
productivehrs
|
||||
actualhrs
|
||||
ciecacode
|
||||
created_at
|
||||
updated_at
|
||||
jobid
|
||||
date
|
||||
flat_rate
|
||||
memo
|
||||
committed_at
|
||||
commited_by
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_ACTIVE_TIME_TICKETS = gql`
|
||||
query QUERY_ACTIVE_TIME_TICKETS($employeeId: uuid) {
|
||||
timetickets(
|
||||
order_by: { date: desc_nulls_first }
|
||||
where: {
|
||||
_and: {
|
||||
clockoff: { _is_null: true }
|
||||
employeeid: { _eq: $employeeId }
|
||||
clockon: { _is_null: false }
|
||||
jobid: { _is_null: false }
|
||||
query QUERY_ACTIVE_TIME_TICKETS($employeeId: uuid) {
|
||||
timetickets(
|
||||
order_by: { date: desc_nulls_first }
|
||||
where: {
|
||||
_and: {
|
||||
clockoff: { _is_null: true }
|
||||
employeeid: { _eq: $employeeId }
|
||||
clockon: { _is_null: false }
|
||||
jobid: { _is_null: false }
|
||||
}
|
||||
}
|
||||
) {
|
||||
id
|
||||
clockon
|
||||
memo
|
||||
cost_center
|
||||
flat_rate
|
||||
jobid
|
||||
commited_by
|
||||
committed_at
|
||||
job {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_model_yr
|
||||
ro_number
|
||||
}
|
||||
}
|
||||
}
|
||||
) {
|
||||
id
|
||||
clockon
|
||||
memo
|
||||
cost_center
|
||||
flat_rate
|
||||
jobid
|
||||
commited_by
|
||||
committed_at
|
||||
job {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_model_yr
|
||||
ro_number
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_ACTIVE_SHIFT_TIME_TICKETS = gql`
|
||||
query QUERY_ACTIVE_SHIFT_TIME_TICKETS($employeeId: uuid) {
|
||||
timetickets(
|
||||
where: {
|
||||
_and: {
|
||||
clockoff: { _is_null: true }
|
||||
employeeid: { _eq: $employeeId }
|
||||
clockon: { _is_null: false }
|
||||
jobid: { _is_null: true }
|
||||
query QUERY_ACTIVE_SHIFT_TIME_TICKETS($employeeId: uuid) {
|
||||
timetickets(
|
||||
where: {
|
||||
_and: {
|
||||
clockoff: { _is_null: true }
|
||||
employeeid: { _eq: $employeeId }
|
||||
clockon: { _is_null: false }
|
||||
jobid: { _is_null: true }
|
||||
}
|
||||
}
|
||||
) {
|
||||
id
|
||||
clockon
|
||||
memo
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_model_yr
|
||||
ro_number
|
||||
}
|
||||
}
|
||||
}
|
||||
) {
|
||||
id
|
||||
clockon
|
||||
memo
|
||||
jobid
|
||||
job {
|
||||
id
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_co_nm
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_model_yr
|
||||
ro_number
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_TIME_TICKET = gql`
|
||||
mutation DELETE_TIME_TICKET($id: uuid!) {
|
||||
delete_timetickets_by_pk(id: $id) {
|
||||
id
|
||||
mutation DELETE_TIME_TICKET($id: uuid!) {
|
||||
delete_timetickets_by_pk(id: $id) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,98 +1,98 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_ALL_TT_APPROVALS_PAGINATED = gql`
|
||||
query QUERY_ALL_TT_APPROVALS_PAGINATED(
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [tt_approval_queue_order_by!]!
|
||||
) {
|
||||
tt_approval_queue(
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
where: { approved_at: { _is_null: true } }
|
||||
query QUERY_ALL_TT_APPROVALS_PAGINATED(
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [tt_approval_queue_order_by!]!
|
||||
) {
|
||||
id
|
||||
jobid
|
||||
bodyshopid
|
||||
employeeid
|
||||
employee {
|
||||
first_name
|
||||
last_name
|
||||
id
|
||||
}
|
||||
job {
|
||||
ro_number
|
||||
status
|
||||
id
|
||||
}
|
||||
employeeid
|
||||
actualhrs
|
||||
productivehrs
|
||||
ciecacode
|
||||
cost_center
|
||||
date
|
||||
rate
|
||||
tt_approval_queue(
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
where: { approved_at: { _is_null: true } }
|
||||
) {
|
||||
id
|
||||
jobid
|
||||
bodyshopid
|
||||
employeeid
|
||||
employee {
|
||||
first_name
|
||||
last_name
|
||||
id
|
||||
}
|
||||
job {
|
||||
ro_number
|
||||
status
|
||||
id
|
||||
}
|
||||
employeeid
|
||||
actualhrs
|
||||
productivehrs
|
||||
ciecacode
|
||||
cost_center
|
||||
date
|
||||
rate
|
||||
}
|
||||
tt_approval_queue_aggregate {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
tt_approval_queue_aggregate {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_NEW_TT_APPROVALS = gql`
|
||||
mutation INSERT_NEW_TT_APPROVALS(
|
||||
$timeTicketInput: [tt_approval_queue_insert_input!]!
|
||||
) {
|
||||
insert_tt_approval_queue(objects: $timeTicketInput) {
|
||||
returning {
|
||||
id
|
||||
employeeid
|
||||
productivehrs
|
||||
actualhrs
|
||||
ciecacode
|
||||
date
|
||||
memo
|
||||
flat_rate
|
||||
}
|
||||
mutation INSERT_NEW_TT_APPROVALS(
|
||||
$timeTicketInput: [tt_approval_queue_insert_input!]!
|
||||
) {
|
||||
insert_tt_approval_queue(objects: $timeTicketInput) {
|
||||
returning {
|
||||
id
|
||||
employeeid
|
||||
productivehrs
|
||||
actualhrs
|
||||
ciecacode
|
||||
date
|
||||
memo
|
||||
flat_rate
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_TT_APPROVALS_BY_IDS = gql`
|
||||
query QUERY_TT_APPROVALS_BY_IDS($ids: [uuid!]!) {
|
||||
tt_approval_queue(where: { id: { _in: $ids } }) {
|
||||
id
|
||||
productivehrs
|
||||
actualhrs
|
||||
rate
|
||||
memo
|
||||
jobid
|
||||
flat_rate
|
||||
employeeid
|
||||
date
|
||||
ciecacode
|
||||
bodyshopid
|
||||
cost_center
|
||||
query QUERY_TT_APPROVALS_BY_IDS($ids: [uuid!]!) {
|
||||
tt_approval_queue(where: { id: { _in: $ids } }) {
|
||||
id
|
||||
productivehrs
|
||||
actualhrs
|
||||
rate
|
||||
memo
|
||||
jobid
|
||||
flat_rate
|
||||
employeeid
|
||||
date
|
||||
ciecacode
|
||||
bodyshopid
|
||||
cost_center
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_TT_BY_APPROVAL = gql`
|
||||
mutation UPDATE_TT_BY_APPROVAL(
|
||||
$ttApprovalUpdates: [tt_approval_queue_updates!]!
|
||||
) {
|
||||
update_tt_approval_queue_many(updates: $ttApprovalUpdates) {
|
||||
returning {
|
||||
id
|
||||
approved_at
|
||||
approved_by
|
||||
timeticket {
|
||||
id
|
||||
mutation UPDATE_TT_BY_APPROVAL(
|
||||
$ttApprovalUpdates: [tt_approval_queue_updates!]!
|
||||
) {
|
||||
update_tt_approval_queue_many(updates: $ttApprovalUpdates) {
|
||||
returning {
|
||||
id
|
||||
approved_at
|
||||
approved_by
|
||||
timeticket {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,101 +1,101 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_SHOP_ASSOCIATIONS = gql`
|
||||
query QUERY_SHOP_ASSOCIATIONS($shopid: uuid!) {
|
||||
associations(where: { shopid: { _eq: $shopid } }) {
|
||||
id
|
||||
authlevel
|
||||
shopid
|
||||
user {
|
||||
email
|
||||
}
|
||||
query QUERY_SHOP_ASSOCIATIONS($shopid: uuid!) {
|
||||
associations(where: { shopid: { _eq: $shopid } }) {
|
||||
id
|
||||
authlevel
|
||||
shopid
|
||||
user {
|
||||
email
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_ASSOCIATION = gql`
|
||||
mutation UPDATE_ASSOCIATION(
|
||||
$assocId: uuid!
|
||||
$assoc: associations_set_input!
|
||||
) {
|
||||
update_associations(where: { id: { _eq: $assocId } }, _set: $assoc) {
|
||||
returning {
|
||||
id
|
||||
authlevel
|
||||
shopid
|
||||
user {
|
||||
email
|
||||
mutation UPDATE_ASSOCIATION(
|
||||
$assocId: uuid!
|
||||
$assoc: associations_set_input!
|
||||
) {
|
||||
update_associations(where: { id: { _eq: $assocId } }, _set: $assoc) {
|
||||
returning {
|
||||
id
|
||||
authlevel
|
||||
shopid
|
||||
user {
|
||||
email
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_EULA_ACCEPTANCE = gql`
|
||||
mutation INSERT_EULA_ACCEPTANCE($eulaAcceptance:eula_acceptances_insert_input!) {
|
||||
insert_eula_acceptances_one(object: $eulaAcceptance){
|
||||
id
|
||||
mutation INSERT_EULA_ACCEPTANCE($eulaAcceptance:eula_acceptances_insert_input!) {
|
||||
insert_eula_acceptances_one(object: $eulaAcceptance){
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPSERT_USER = gql`
|
||||
mutation UPSERT_USER($authEmail: String!, $authToken: String!) {
|
||||
insert_users(
|
||||
objects: [{ email: $authEmail, authid: $authToken }]
|
||||
on_conflict: { constraint: users_pkey, update_columns: [authid] }
|
||||
) {
|
||||
returning {
|
||||
authid
|
||||
}
|
||||
mutation UPSERT_USER($authEmail: String!, $authToken: String!) {
|
||||
insert_users(
|
||||
objects: [{ email: $authEmail, authid: $authToken }]
|
||||
on_conflict: { constraint: users_pkey, update_columns: [authid] }
|
||||
) {
|
||||
returning {
|
||||
authid
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_DASHBOARD_LAYOUT = gql`
|
||||
mutation UPDATE_DASHBOARD_LAYOUT($email: String!, $layout: jsonb!) {
|
||||
update_users_by_pk(
|
||||
pk_columns: { email: $email }
|
||||
_set: { dashboardlayout: $layout }
|
||||
) {
|
||||
email
|
||||
dashboardlayout
|
||||
mutation UPDATE_DASHBOARD_LAYOUT($email: String!, $layout: jsonb!) {
|
||||
update_users_by_pk(
|
||||
pk_columns: { email: $email }
|
||||
_set: { dashboardlayout: $layout }
|
||||
) {
|
||||
email
|
||||
dashboardlayout
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_FCM_TOKEN = gql`
|
||||
mutation UPDATE_FCM_TOKEN($authEmail: String!, $token: jsonb!) {
|
||||
update_users(
|
||||
where: { email: { _eq: $authEmail } }
|
||||
_append: { fcmtokens: $token }
|
||||
) {
|
||||
affected_rows
|
||||
returning {
|
||||
fcmtokens
|
||||
}
|
||||
mutation UPDATE_FCM_TOKEN($authEmail: String!, $token: jsonb!) {
|
||||
update_users(
|
||||
where: { email: { _eq: $authEmail } }
|
||||
_append: { fcmtokens: $token }
|
||||
) {
|
||||
affected_rows
|
||||
returning {
|
||||
fcmtokens
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_KANBAN_SETTINGS = gql`
|
||||
query QUERY_KANBAN_SETTINGS($email: String!) {
|
||||
associations(
|
||||
where: { _and: { useremail: { _eq: $email }, active: { _eq: true } } }
|
||||
) {
|
||||
id
|
||||
kanban_settings
|
||||
query QUERY_KANBAN_SETTINGS($email: String!) {
|
||||
associations(
|
||||
where: { _and: { useremail: { _eq: $email }, active: { _eq: true } } }
|
||||
) {
|
||||
id
|
||||
kanban_settings
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const UPDATE_KANBAN_SETTINGS = gql`
|
||||
mutation UPDATE_KANBAN_SETTINGS($id: uuid!, $ks: jsonb) {
|
||||
update_associations_by_pk(
|
||||
pk_columns: { id: $id }
|
||||
_set: { kanban_settings: $ks }
|
||||
) {
|
||||
id
|
||||
kanban_settings
|
||||
mutation UPDATE_KANBAN_SETTINGS($id: uuid!, $ks: jsonb) {
|
||||
update_associations_by_pk(
|
||||
pk_columns: { id: $id }
|
||||
_set: { kanban_settings: $ks }
|
||||
) {
|
||||
id
|
||||
kanban_settings
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,195 +1,195 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_VEHICLE_BY_ID = gql`
|
||||
query QUERY_VEHICLE_BY_ID($id: uuid!) {
|
||||
vehicles_by_pk(id: $id) {
|
||||
created_at
|
||||
db_v_code
|
||||
id
|
||||
plate_no
|
||||
plate_st
|
||||
v_vin
|
||||
v_type
|
||||
v_trimcode
|
||||
v_tone
|
||||
v_stage
|
||||
v_prod_dt
|
||||
v_paint_codes
|
||||
v_options
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_mldgcode
|
||||
v_makecode
|
||||
v_make_desc
|
||||
v_engine
|
||||
v_cond
|
||||
v_color
|
||||
v_bstyle
|
||||
updated_at
|
||||
trim_color
|
||||
notes
|
||||
jobs(order_by: { date_open: desc }) {
|
||||
id
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
owner {
|
||||
id
|
||||
query QUERY_VEHICLE_BY_ID($id: uuid!) {
|
||||
vehicles_by_pk(id: $id) {
|
||||
created_at
|
||||
db_v_code
|
||||
id
|
||||
plate_no
|
||||
plate_st
|
||||
v_vin
|
||||
v_type
|
||||
v_trimcode
|
||||
v_tone
|
||||
v_stage
|
||||
v_prod_dt
|
||||
v_paint_codes
|
||||
v_options
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_mldgcode
|
||||
v_makecode
|
||||
v_make_desc
|
||||
v_engine
|
||||
v_cond
|
||||
v_color
|
||||
v_bstyle
|
||||
updated_at
|
||||
trim_color
|
||||
notes
|
||||
jobs(order_by: { date_open: desc }) {
|
||||
id
|
||||
ro_number
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
owner {
|
||||
id
|
||||
}
|
||||
clm_no
|
||||
status
|
||||
clm_total
|
||||
}
|
||||
}
|
||||
clm_no
|
||||
status
|
||||
clm_total
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_VEHICLE = gql`
|
||||
mutation UPDATE_VEHICLE($vehId: uuid!, $vehicle: vehicles_set_input!) {
|
||||
update_vehicles(where: { id: { _eq: $vehId } }, _set: $vehicle) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation UPDATE_VEHICLE($vehId: uuid!, $vehicle: vehicles_set_input!) {
|
||||
update_vehicles(where: { id: { _eq: $vehId } }, _set: $vehicle) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_VEHICLE = gql`
|
||||
mutation DELETE_VEHICLE($id: uuid!) {
|
||||
delete_vehicles_by_pk(id: $id) {
|
||||
id
|
||||
mutation DELETE_VEHICLE($id: uuid!) {
|
||||
delete_vehicles_by_pk(id: $id) {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_ALL_VEHICLES = gql`
|
||||
query QUERY_ALL_VEHICLES {
|
||||
vehicles {
|
||||
id
|
||||
plate_no
|
||||
plate_st
|
||||
v_vin
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_color
|
||||
v_bstyle
|
||||
updated_at
|
||||
query QUERY_ALL_VEHICLES {
|
||||
vehicles {
|
||||
id
|
||||
plate_no
|
||||
plate_st
|
||||
v_vin
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_color
|
||||
v_bstyle
|
||||
updated_at
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_ALL_VEHICLES_PAGINATED = gql`
|
||||
query QUERY_ALL_VEHICLES(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [vehicles_order_by!]!
|
||||
) {
|
||||
search_vehicles(
|
||||
args: { search: $search }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
query QUERY_ALL_VEHICLES(
|
||||
$search: String
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [vehicles_order_by!]!
|
||||
) {
|
||||
id
|
||||
plate_no
|
||||
plate_st
|
||||
v_vin
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_color
|
||||
v_bstyle
|
||||
updated_at
|
||||
search_vehicles(
|
||||
args: { search: $search }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
) {
|
||||
id
|
||||
plate_no
|
||||
plate_st
|
||||
v_vin
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_color
|
||||
v_bstyle
|
||||
updated_at
|
||||
}
|
||||
search_vehicles_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
search_vehicles_aggregate(args: { search: $search }) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SEARCH_VEHICLE_BY_VIN = gql`
|
||||
query SEARCH_VEHICLE_BY_VIN($vin: String!) {
|
||||
vehicles(where: { v_vin: { _ilike: $vin } }) {
|
||||
id
|
||||
plate_no
|
||||
plate_st
|
||||
v_vin
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_color
|
||||
v_bstyle
|
||||
updated_at
|
||||
v_type
|
||||
v_trimcode
|
||||
v_tone
|
||||
v_stage
|
||||
v_prod_dt
|
||||
v_paint_codes
|
||||
v_options
|
||||
v_mldgcode
|
||||
v_makecode
|
||||
v_engine
|
||||
v_cond
|
||||
trim_color
|
||||
db_v_code
|
||||
query SEARCH_VEHICLE_BY_VIN($vin: String!) {
|
||||
vehicles(where: { v_vin: { _ilike: $vin } }) {
|
||||
id
|
||||
plate_no
|
||||
plate_st
|
||||
v_vin
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_color
|
||||
v_bstyle
|
||||
updated_at
|
||||
v_type
|
||||
v_trimcode
|
||||
v_tone
|
||||
v_stage
|
||||
v_prod_dt
|
||||
v_paint_codes
|
||||
v_options
|
||||
v_mldgcode
|
||||
v_makecode
|
||||
v_engine
|
||||
v_cond
|
||||
trim_color
|
||||
db_v_code
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SEARCH_VEHICLES = gql`
|
||||
query SEARCH_VEHICLES($search: String!) {
|
||||
search_vehicles(args: { search: $search }) {
|
||||
id
|
||||
plate_no
|
||||
plate_st
|
||||
v_vin
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_color
|
||||
v_bstyle
|
||||
updated_at
|
||||
v_type
|
||||
v_trimcode
|
||||
v_tone
|
||||
v_stage
|
||||
v_prod_dt
|
||||
v_paint_codes
|
||||
v_options
|
||||
v_mldgcode
|
||||
v_makecode
|
||||
v_engine
|
||||
v_cond
|
||||
trim_color
|
||||
db_v_code
|
||||
query SEARCH_VEHICLES($search: String!) {
|
||||
search_vehicles(args: { search: $search }) {
|
||||
id
|
||||
plate_no
|
||||
plate_st
|
||||
v_vin
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_color
|
||||
v_bstyle
|
||||
updated_at
|
||||
v_type
|
||||
v_trimcode
|
||||
v_tone
|
||||
v_stage
|
||||
v_prod_dt
|
||||
v_paint_codes
|
||||
v_options
|
||||
v_mldgcode
|
||||
v_makecode
|
||||
v_engine
|
||||
v_cond
|
||||
trim_color
|
||||
db_v_code
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SEARCH_VEHICLES_BY_ID_FOR_AUTOCOMPLETE = gql`
|
||||
query SEARCH_VEHICLES_BY_ID_FOR_AUTOCOMPLETE($id: uuid!) {
|
||||
vehicles_by_pk(id: $id) {
|
||||
id
|
||||
v_vin
|
||||
v_model_yr
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
query SEARCH_VEHICLES_BY_ID_FOR_AUTOCOMPLETE($id: uuid!) {
|
||||
vehicles_by_pk(id: $id) {
|
||||
id
|
||||
v_vin
|
||||
v_model_yr
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const SEARCH_VEHICLES_FOR_AUTOCOMPLETE = gql`
|
||||
query SEARCH_VEHICLES_FOR_AUTOCOMPLETE($search: String) {
|
||||
search_vehicles(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
v_vin
|
||||
v_model_yr
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
query SEARCH_VEHICLES_FOR_AUTOCOMPLETE($search: String) {
|
||||
search_vehicles(args: { search: $search }, limit: 25) {
|
||||
id
|
||||
v_vin
|
||||
v_model_yr
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,129 +1,129 @@
|
||||
import { gql } from "@apollo/client";
|
||||
import {gql} from "@apollo/client";
|
||||
|
||||
export const QUERY_VENDOR_BY_ID = gql`
|
||||
query QUERY_VENDOR_BY_ID($id: uuid!) {
|
||||
vendors_by_pk(id: $id) {
|
||||
zip
|
||||
street2
|
||||
state
|
||||
name
|
||||
id
|
||||
favorite
|
||||
email
|
||||
due_date
|
||||
discount
|
||||
country
|
||||
cost_center
|
||||
city
|
||||
street1
|
||||
active
|
||||
phone
|
||||
dmsid
|
||||
query QUERY_VENDOR_BY_ID($id: uuid!) {
|
||||
vendors_by_pk(id: $id) {
|
||||
zip
|
||||
street2
|
||||
state
|
||||
name
|
||||
id
|
||||
favorite
|
||||
email
|
||||
due_date
|
||||
discount
|
||||
country
|
||||
cost_center
|
||||
city
|
||||
street1
|
||||
active
|
||||
phone
|
||||
dmsid
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const CHECK_VENDOR_NAME = gql`
|
||||
query CHECK_VENDOR_NAME($name: String!) {
|
||||
vendors_aggregate(where: { name: { _ilike: $name } }) {
|
||||
aggregate {
|
||||
count
|
||||
}
|
||||
nodes {
|
||||
id
|
||||
}
|
||||
query CHECK_VENDOR_NAME($name: String!) {
|
||||
vendors_aggregate(where: { name: { _ilike: $name } }) {
|
||||
aggregate {
|
||||
count
|
||||
}
|
||||
nodes {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_VENDOR = gql`
|
||||
mutation UPDATE_VENDOR($id: uuid!, $vendor: vendors_set_input!) {
|
||||
update_vendors(where: { id: { _eq: $id } }, _set: $vendor) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation UPDATE_VENDOR($id: uuid!, $vendor: vendors_set_input!) {
|
||||
update_vendors(where: { id: { _eq: $id } }, _set: $vendor) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_ALL_VENDORS = gql`
|
||||
query QUERY_ALL_VENDORS {
|
||||
vendors(order_by: { name: asc }) {
|
||||
name
|
||||
id
|
||||
cost_center
|
||||
city
|
||||
phone
|
||||
active
|
||||
query QUERY_ALL_VENDORS {
|
||||
vendors(order_by: { name: asc }) {
|
||||
name
|
||||
id
|
||||
cost_center
|
||||
city
|
||||
phone
|
||||
active
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_NEW_VENDOR = gql`
|
||||
mutation INSERT_NEW_VENDOR($vendorInput: [vendors_insert_input!]!) {
|
||||
insert_vendors(objects: $vendorInput) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation INSERT_NEW_VENDOR($vendorInput: [vendors_insert_input!]!) {
|
||||
insert_vendors(objects: $vendorInput) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const DELETE_VENDOR = gql`
|
||||
mutation DELETE_VENDOR($id: uuid!) {
|
||||
delete_vendors(where: { id: { _eq: $id } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
mutation DELETE_VENDOR($id: uuid!) {
|
||||
delete_vendors(where: { id: { _eq: $id } }) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_ALL_VENDORS_FOR_ORDER = gql`
|
||||
query QUERY_ALL_VENDORS_FOR_ORDER($jobId: uuid) {
|
||||
vendors(order_by: { name: asc }, where: { active: { _eq: true } }) {
|
||||
name
|
||||
cost_center
|
||||
id
|
||||
favorite
|
||||
discount
|
||||
email
|
||||
active
|
||||
phone
|
||||
query QUERY_ALL_VENDORS_FOR_ORDER($jobId: uuid) {
|
||||
vendors(order_by: { name: asc }, where: { active: { _eq: true } }) {
|
||||
name
|
||||
cost_center
|
||||
id
|
||||
favorite
|
||||
discount
|
||||
email
|
||||
active
|
||||
phone
|
||||
}
|
||||
jobs(where: { id: { _eq: $jobId } }) {
|
||||
v_make_desc
|
||||
}
|
||||
}
|
||||
jobs(where: { id: { _eq: $jobId } }) {
|
||||
v_make_desc
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SEARCH_VENDOR_AUTOCOMPLETE = gql`
|
||||
query SEARCH_VENDOR_AUTOCOMPLETE {
|
||||
vendors(order_by: { name: asc }, where: { active: { _eq: true } }) {
|
||||
name
|
||||
discount
|
||||
id
|
||||
cost_center
|
||||
active
|
||||
favorite
|
||||
query SEARCH_VENDOR_AUTOCOMPLETE {
|
||||
vendors(order_by: { name: asc }, where: { active: { _eq: true } }) {
|
||||
name
|
||||
discount
|
||||
id
|
||||
cost_center
|
||||
active
|
||||
favorite
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR = gql`
|
||||
query SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR {
|
||||
vendors(order_by: { name: asc }, where: { active: { _eq: true } }) {
|
||||
name
|
||||
discount
|
||||
id
|
||||
cost_center
|
||||
street1
|
||||
street2
|
||||
zip
|
||||
country
|
||||
city
|
||||
email
|
||||
state
|
||||
active
|
||||
query SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR {
|
||||
vendors(order_by: { name: asc }, where: { active: { _eq: true } }) {
|
||||
name
|
||||
discount
|
||||
id
|
||||
cost_center
|
||||
street1
|
||||
street2
|
||||
zip
|
||||
country
|
||||
city
|
||||
email
|
||||
state
|
||||
active
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
body {
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
|
||||
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
||||
sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
|
||||
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
|
||||
monospace;
|
||||
}
|
||||
|
||||
@@ -2,17 +2,17 @@ import * as Sentry from "@sentry/react";
|
||||
import Dinero from "dinero.js";
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { Provider } from "react-redux";
|
||||
import {Provider} from "react-redux";
|
||||
import {createBrowserRouter, createRoutesFromElements, Route, RouterProvider} from "react-router-dom";
|
||||
import { PersistGate } from "redux-persist/integration/react";
|
||||
import {PersistGate} from "redux-persist/integration/react";
|
||||
import AppContainer from "./App/App.container";
|
||||
import LoadingSpinner from "./components/loading-spinner/loading-spinner.component";
|
||||
import "./index.css";
|
||||
import { persistor, store } from "./redux/store";
|
||||
import {persistor, store} from "./redux/store";
|
||||
import reportWebVitals from "./reportWebVitals";
|
||||
import "./translations/i18n";
|
||||
import "./utils/CleanAxios";
|
||||
import { ConfigProvider } from "antd";
|
||||
import {ConfigProvider} from "antd";
|
||||
|
||||
//import { BrowserTracing } from "@sentry/tracing";
|
||||
//import "antd/dist/antd.css";
|
||||
@@ -23,38 +23,38 @@ import { ConfigProvider } from "antd";
|
||||
Dinero.globalRoundingMode = "HALF_EVEN";
|
||||
|
||||
if (process.env.NODE_ENV !== "development") {
|
||||
Sentry.init({
|
||||
dsn: "https://a6acc91c073e414196014b8484627a61@o492140.ingest.sentry.io/4504561071161344",
|
||||
ignoreErrors: [
|
||||
"ResizeObserver loop",
|
||||
"Module specifier, 'fs' does not start",
|
||||
"Module specifier, 'zlib' does not start with",
|
||||
],
|
||||
integrations: [
|
||||
Sentry.replayIntegration({
|
||||
maskAllText: false,
|
||||
blockAllMedia: true,
|
||||
}),
|
||||
new Sentry.BrowserTracing(),
|
||||
],
|
||||
tracesSampleRate: 1.0,
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
environment: process.env.NODE_ENV,
|
||||
});
|
||||
Sentry.init({
|
||||
dsn: "https://a6acc91c073e414196014b8484627a61@o492140.ingest.sentry.io/4504561071161344",
|
||||
ignoreErrors: [
|
||||
"ResizeObserver loop",
|
||||
"Module specifier, 'fs' does not start",
|
||||
"Module specifier, 'zlib' does not start with",
|
||||
],
|
||||
integrations: [
|
||||
Sentry.replayIntegration({
|
||||
maskAllText: false,
|
||||
blockAllMedia: true,
|
||||
}),
|
||||
new Sentry.BrowserTracing(),
|
||||
],
|
||||
tracesSampleRate: 1.0,
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
environment: process.env.NODE_ENV,
|
||||
});
|
||||
}
|
||||
|
||||
const router = createBrowserRouter(
|
||||
createRoutesFromElements(
|
||||
<Route path="*" element={<AppContainer />} />
|
||||
<Route path="*" element={<AppContainer/>}/>
|
||||
)
|
||||
);
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<PersistGate loading={<LoadingSpinner message="Restoring your settings..." />} persistor={persistor}>
|
||||
<Provider store={store}>
|
||||
<RouterProvider router={router} />
|
||||
</Provider>
|
||||
<PersistGate loading={<LoadingSpinner message="Restoring your settings..."/>} persistor={persistor}>
|
||||
<Provider store={store}>
|
||||
<RouterProvider router={router}/>
|
||||
</Provider>
|
||||
</PersistGate>
|
||||
);
|
||||
}
|
||||
@@ -63,7 +63,7 @@ function App() {
|
||||
// https://ant.design/docs/react/migrate-less-variables
|
||||
ReactDOM.createRoot(document.getElementById('root')).render(
|
||||
<ConfigProvider>
|
||||
<App />
|
||||
<App/>
|
||||
</ConfigProvider>
|
||||
);
|
||||
|
||||
|
||||
@@ -1,60 +1,61 @@
|
||||
import React from "react";
|
||||
import { Button, Card, Space } from "antd";
|
||||
import { DownOutlined } from "@ant-design/icons";
|
||||
import {Button, Card, Space} from "antd";
|
||||
import {DownOutlined} from "@ant-design/icons";
|
||||
import QueueAnim from "rc-queue-anim";
|
||||
import TweenOne from "rc-tween-one";
|
||||
import { isImg } from "./utils";
|
||||
import {isImg} from "./utils";
|
||||
|
||||
class Banner extends React.PureComponent {
|
||||
render() {
|
||||
const { ...currentProps } = this.props;
|
||||
const { dataSource } = currentProps;
|
||||
delete currentProps.dataSource;
|
||||
delete currentProps.isMobile;
|
||||
return (
|
||||
<div {...currentProps} {...dataSource.wrapper}>
|
||||
<QueueAnim
|
||||
key="QueueAnim"
|
||||
type={["bottom", "top"]}
|
||||
delay={200}
|
||||
{...dataSource.textWrapper}
|
||||
>
|
||||
<Card style={{ opacity: "80%", background: "#000" }}>
|
||||
<div key="title" {...dataSource.title}>
|
||||
{typeof dataSource.title.children === "string" &&
|
||||
dataSource.title.children.match(isImg) ? (
|
||||
<img src={dataSource.title.children} width="100%" alt="img" />
|
||||
) : (
|
||||
dataSource.title.children
|
||||
)}
|
||||
render() {
|
||||
const {...currentProps} = this.props;
|
||||
const {dataSource} = currentProps;
|
||||
delete currentProps.dataSource;
|
||||
delete currentProps.isMobile;
|
||||
return (
|
||||
<div {...currentProps} {...dataSource.wrapper}>
|
||||
<QueueAnim
|
||||
key="QueueAnim"
|
||||
type={["bottom", "top"]}
|
||||
delay={200}
|
||||
{...dataSource.textWrapper}
|
||||
>
|
||||
<Card style={{opacity: "80%", background: "#000"}}>
|
||||
<div key="title" {...dataSource.title}>
|
||||
{typeof dataSource.title.children === "string" &&
|
||||
dataSource.title.children.match(isImg) ? (
|
||||
<img src={dataSource.title.children} width="100%" alt="img"/>
|
||||
) : (
|
||||
dataSource.title.children
|
||||
)}
|
||||
</div>
|
||||
<div key="content" {...dataSource.content}>
|
||||
{dataSource.content.children}
|
||||
</div>
|
||||
<Space wrap>
|
||||
<Button ghost key="button" {...dataSource.button}>
|
||||
{dataSource.button.children}
|
||||
</Button>
|
||||
<Button type="primary" key="button2" {...dataSource.button2}>
|
||||
{dataSource.button2.children}
|
||||
</Button>
|
||||
</Space>
|
||||
</Card>
|
||||
</QueueAnim>
|
||||
<TweenOne
|
||||
animation={{
|
||||
y: "-=20",
|
||||
yoyo: true,
|
||||
repeat: -1,
|
||||
duration: 1000,
|
||||
}}
|
||||
className="banner0-icon"
|
||||
key="icon"
|
||||
>
|
||||
<DownOutlined/>
|
||||
</TweenOne>
|
||||
</div>
|
||||
<div key="content" {...dataSource.content}>
|
||||
{dataSource.content.children}
|
||||
</div>
|
||||
<Space wrap>
|
||||
<Button ghost key="button" {...dataSource.button}>
|
||||
{dataSource.button.children}
|
||||
</Button>
|
||||
<Button type="primary" key="button2" {...dataSource.button2}>
|
||||
{dataSource.button2.children}
|
||||
</Button>
|
||||
</Space>
|
||||
</Card>
|
||||
</QueueAnim>
|
||||
<TweenOne
|
||||
animation={{
|
||||
y: "-=20",
|
||||
yoyo: true,
|
||||
repeat: -1,
|
||||
duration: 1000,
|
||||
}}
|
||||
className="banner0-icon"
|
||||
key="icon"
|
||||
>
|
||||
<DownOutlined />
|
||||
</TweenOne>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Banner;
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
import React from 'react';
|
||||
import QueueAnim from 'rc-queue-anim';
|
||||
import { Row, Col } from 'antd';
|
||||
import {Row, Col} from 'antd';
|
||||
import OverPack from 'rc-scroll-anim/lib/ScrollOverPack';
|
||||
import { getChildrenToRender } from './utils';
|
||||
import {getChildrenToRender} from './utils';
|
||||
|
||||
class Content extends React.PureComponent {
|
||||
render() {
|
||||
const { dataSource, isMobile, ...props } = this.props;
|
||||
const {
|
||||
wrapper,
|
||||
titleWrapper,
|
||||
page,
|
||||
OverPack: overPackData,
|
||||
childWrapper,
|
||||
} = dataSource;
|
||||
return (
|
||||
<div {...props} {...wrapper}>
|
||||
<div {...page}>
|
||||
<div {...titleWrapper}>
|
||||
{titleWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
<OverPack {...overPackData}>
|
||||
<QueueAnim
|
||||
type="bottom"
|
||||
key="block"
|
||||
leaveReverse
|
||||
component={Row}
|
||||
componentProps={childWrapper}
|
||||
>
|
||||
{childWrapper.children.map((block, i) => {
|
||||
const { children: item, ...blockProps } = block;
|
||||
return (
|
||||
<Col key={i.toString()} {...blockProps}>
|
||||
<div {...item}>
|
||||
{item.children.map(getChildrenToRender)}
|
||||
render() {
|
||||
const {dataSource, isMobile, ...props} = this.props;
|
||||
const {
|
||||
wrapper,
|
||||
titleWrapper,
|
||||
page,
|
||||
OverPack: overPackData,
|
||||
childWrapper,
|
||||
} = dataSource;
|
||||
return (
|
||||
<div {...props} {...wrapper}>
|
||||
<div {...page}>
|
||||
<div {...titleWrapper}>
|
||||
{titleWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
</Col>
|
||||
);
|
||||
})}
|
||||
</QueueAnim>
|
||||
</OverPack>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
<OverPack {...overPackData}>
|
||||
<QueueAnim
|
||||
type="bottom"
|
||||
key="block"
|
||||
leaveReverse
|
||||
component={Row}
|
||||
componentProps={childWrapper}
|
||||
>
|
||||
{childWrapper.children.map((block, i) => {
|
||||
const {children: item, ...blockProps} = block;
|
||||
return (
|
||||
<Col key={i.toString()} {...blockProps}>
|
||||
<div {...item}>
|
||||
{item.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
</Col>
|
||||
);
|
||||
})}
|
||||
</QueueAnim>
|
||||
</OverPack>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Content;
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
import React from 'react';
|
||||
import QueueAnim from 'rc-queue-anim';
|
||||
import TweenOne from 'rc-tween-one';
|
||||
import { Row, Col } from 'antd';
|
||||
import {Col, Row} from 'antd';
|
||||
import OverPack from 'rc-scroll-anim/lib/ScrollOverPack';
|
||||
|
||||
function Content1(props) {
|
||||
const { ...tagProps } = props;
|
||||
const { dataSource, isMobile } = tagProps;
|
||||
delete tagProps.dataSource;
|
||||
delete tagProps.isMobile;
|
||||
const animType = {
|
||||
queue: isMobile ? 'bottom' : 'right',
|
||||
one: isMobile
|
||||
? {
|
||||
scaleY: '+=0.3',
|
||||
opacity: 0,
|
||||
type: 'from',
|
||||
ease: 'easeOutQuad',
|
||||
}
|
||||
: {
|
||||
x: '-=30',
|
||||
opacity: 0,
|
||||
type: 'from',
|
||||
ease: 'easeOutQuad',
|
||||
},
|
||||
};
|
||||
return (
|
||||
<div {...tagProps} {...dataSource.wrapper}>
|
||||
<OverPack {...dataSource.OverPack} component={Row}>
|
||||
<TweenOne
|
||||
key="img"
|
||||
animation={animType.one}
|
||||
resetStyle
|
||||
{...dataSource.imgWrapper}
|
||||
component={Col}
|
||||
componentProps={{
|
||||
md: dataSource.imgWrapper.md,
|
||||
xs: dataSource.imgWrapper.xs,
|
||||
}}
|
||||
>
|
||||
const {...tagProps} = props;
|
||||
const {dataSource, isMobile} = tagProps;
|
||||
delete tagProps.dataSource;
|
||||
delete tagProps.isMobile;
|
||||
const animType = {
|
||||
queue: isMobile ? 'bottom' : 'right',
|
||||
one: isMobile
|
||||
? {
|
||||
scaleY: '+=0.3',
|
||||
opacity: 0,
|
||||
type: 'from',
|
||||
ease: 'easeOutQuad',
|
||||
}
|
||||
: {
|
||||
x: '-=30',
|
||||
opacity: 0,
|
||||
type: 'from',
|
||||
ease: 'easeOutQuad',
|
||||
},
|
||||
};
|
||||
return (
|
||||
<div {...tagProps} {...dataSource.wrapper}>
|
||||
<OverPack {...dataSource.OverPack} component={Row}>
|
||||
<TweenOne
|
||||
key="img"
|
||||
animation={animType.one}
|
||||
resetStyle
|
||||
{...dataSource.imgWrapper}
|
||||
component={Col}
|
||||
componentProps={{
|
||||
md: dataSource.imgWrapper.md,
|
||||
xs: dataSource.imgWrapper.xs,
|
||||
}}
|
||||
>
|
||||
<span {...dataSource.img}>
|
||||
<img src={dataSource.img.children} width="100%" alt="img" />
|
||||
<img src={dataSource.img.children} width="100%" alt="img"/>
|
||||
</span>
|
||||
</TweenOne>
|
||||
<QueueAnim
|
||||
key="text"
|
||||
type={animType.queue}
|
||||
leaveReverse
|
||||
ease={['easeOutQuad', 'easeInQuad']}
|
||||
{...dataSource.textWrapper}
|
||||
component={Col}
|
||||
componentProps={{
|
||||
md: dataSource.textWrapper.md,
|
||||
xs: dataSource.textWrapper.xs,
|
||||
}}
|
||||
>
|
||||
<h2 key="h1" {...dataSource.title}>
|
||||
{dataSource.title.children}
|
||||
</h2>
|
||||
<div key="p" {...dataSource.content}>
|
||||
{dataSource.content.children}
|
||||
</div>
|
||||
</QueueAnim>
|
||||
</OverPack>
|
||||
</div>
|
||||
);
|
||||
</TweenOne>
|
||||
<QueueAnim
|
||||
key="text"
|
||||
type={animType.queue}
|
||||
leaveReverse
|
||||
ease={['easeOutQuad', 'easeInQuad']}
|
||||
{...dataSource.textWrapper}
|
||||
component={Col}
|
||||
componentProps={{
|
||||
md: dataSource.textWrapper.md,
|
||||
xs: dataSource.textWrapper.xs,
|
||||
}}
|
||||
>
|
||||
<h2 key="h1" {...dataSource.title}>
|
||||
{dataSource.title.children}
|
||||
</h2>
|
||||
<div key="p" {...dataSource.content}>
|
||||
{dataSource.content.children}
|
||||
</div>
|
||||
</QueueAnim>
|
||||
</OverPack>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Content1;
|
||||
|
||||
@@ -1,60 +1,60 @@
|
||||
import React from 'react';
|
||||
import { Row, Col } from 'antd';
|
||||
import { TweenOneGroup } from 'rc-tween-one';
|
||||
import {Col, Row} from 'antd';
|
||||
import {TweenOneGroup} from 'rc-tween-one';
|
||||
import OverPack from 'rc-scroll-anim/lib/ScrollOverPack';
|
||||
import { getChildrenToRender } from './utils';
|
||||
import {getChildrenToRender} from './utils';
|
||||
|
||||
class Content12 extends React.PureComponent {
|
||||
getChildrenToRender = (data) =>
|
||||
data.map((item) => {
|
||||
return (
|
||||
<Col key={item.name} {...item}>
|
||||
<div {...item.children.wrapper}>
|
||||
getChildrenToRender = (data) =>
|
||||
data.map((item) => {
|
||||
return (
|
||||
<Col key={item.name} {...item}>
|
||||
<div {...item.children.wrapper}>
|
||||
<span {...item.children.img}>
|
||||
<img src={item.children.img.children} alt="img" />
|
||||
<img src={item.children.img.children} alt="img"/>
|
||||
</span>
|
||||
</div>
|
||||
</Col>
|
||||
);
|
||||
});
|
||||
</div>
|
||||
</Col>
|
||||
);
|
||||
});
|
||||
|
||||
render() {
|
||||
const { ...props } = this.props;
|
||||
const { dataSource } = props;
|
||||
delete props.dataSource;
|
||||
delete props.isMobile;
|
||||
const childrenToRender = this.getChildrenToRender(
|
||||
dataSource.block.children
|
||||
);
|
||||
return (
|
||||
<div {...props} {...dataSource.wrapper}>
|
||||
<div {...dataSource.page}>
|
||||
<div key="title" {...dataSource.titleWrapper}>
|
||||
{dataSource.titleWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
<OverPack
|
||||
className={`content-template ${props.className}`}
|
||||
{...dataSource.OverPack}
|
||||
>
|
||||
<TweenOneGroup
|
||||
component={Row}
|
||||
key="ul"
|
||||
enter={{
|
||||
y: '+=30',
|
||||
opacity: 0,
|
||||
type: 'from',
|
||||
ease: 'easeOutQuad',
|
||||
}}
|
||||
leave={{ y: '+=30', opacity: 0, ease: 'easeOutQuad' }}
|
||||
{...dataSource.block}
|
||||
>
|
||||
{childrenToRender}
|
||||
</TweenOneGroup>
|
||||
</OverPack>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
render() {
|
||||
const {...props} = this.props;
|
||||
const {dataSource} = props;
|
||||
delete props.dataSource;
|
||||
delete props.isMobile;
|
||||
const childrenToRender = this.getChildrenToRender(
|
||||
dataSource.block.children
|
||||
);
|
||||
return (
|
||||
<div {...props} {...dataSource.wrapper}>
|
||||
<div {...dataSource.page}>
|
||||
<div key="title" {...dataSource.titleWrapper}>
|
||||
{dataSource.titleWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
<OverPack
|
||||
className={`content-template ${props.className}`}
|
||||
{...dataSource.OverPack}
|
||||
>
|
||||
<TweenOneGroup
|
||||
component={Row}
|
||||
key="ul"
|
||||
enter={{
|
||||
y: '+=30',
|
||||
opacity: 0,
|
||||
type: 'from',
|
||||
ease: 'easeOutQuad',
|
||||
}}
|
||||
leave={{y: '+=30', opacity: 0, ease: 'easeOutQuad'}}
|
||||
{...dataSource.block}
|
||||
>
|
||||
{childrenToRender}
|
||||
</TweenOneGroup>
|
||||
</OverPack>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Content12;
|
||||
|
||||
@@ -1,94 +1,94 @@
|
||||
import React from 'react';
|
||||
import QueueAnim from 'rc-queue-anim';
|
||||
import TweenOne from 'rc-tween-one';
|
||||
import { Row, Col } from 'antd';
|
||||
import {Col, Row} from 'antd';
|
||||
import OverPack from 'rc-scroll-anim/lib/ScrollOverPack';
|
||||
import { getChildrenToRender } from './utils';
|
||||
import {getChildrenToRender} from './utils';
|
||||
|
||||
class Content3 extends React.PureComponent {
|
||||
getDelay = (e, b) => (e % b) * 100 + Math.floor(e / b) * 100 + b * 100;
|
||||
getDelay = (e, b) => (e % b) * 100 + Math.floor(e / b) * 100 + b * 100;
|
||||
|
||||
render() {
|
||||
const { ...props } = this.props;
|
||||
const { dataSource, isMobile } = props;
|
||||
delete props.dataSource;
|
||||
delete props.isMobile;
|
||||
let clearFloatNum = 0;
|
||||
const children = dataSource.block.children.map((item, i) => {
|
||||
const childObj = item.children;
|
||||
const delay = isMobile ? i * 50 : this.getDelay(i, 24 / item.md);
|
||||
const liAnim = {
|
||||
opacity: 0,
|
||||
type: 'from',
|
||||
ease: 'easeOutQuad',
|
||||
delay,
|
||||
};
|
||||
const childrenAnim = { ...liAnim, x: '+=10', delay: delay + 100 };
|
||||
clearFloatNum += item.md;
|
||||
clearFloatNum = clearFloatNum > 24 ? 0 : clearFloatNum;
|
||||
return (
|
||||
<TweenOne
|
||||
component={Col}
|
||||
animation={liAnim}
|
||||
key={item.name}
|
||||
{...item}
|
||||
componentProps={{ md: item.md, xs: item.xs }}
|
||||
className={
|
||||
!clearFloatNum
|
||||
? `${item.className || ''} clear-both`.trim()
|
||||
: item.className
|
||||
}
|
||||
>
|
||||
<TweenOne
|
||||
animation={{
|
||||
x: '-=10',
|
||||
opacity: 0,
|
||||
type: 'from',
|
||||
ease: 'easeOutQuad',
|
||||
}}
|
||||
key="img"
|
||||
{...childObj.icon}
|
||||
>
|
||||
<img src={childObj.icon.children} width="100%" alt="img" />
|
||||
</TweenOne>
|
||||
<div {...childObj.textWrapper}>
|
||||
<TweenOne
|
||||
key="h2"
|
||||
animation={childrenAnim}
|
||||
component="h2"
|
||||
{...childObj.title}
|
||||
>
|
||||
{childObj.title.children}
|
||||
</TweenOne>
|
||||
<TweenOne
|
||||
key="p"
|
||||
animation={{ ...childrenAnim, delay: delay + 200 }}
|
||||
component="div"
|
||||
{...childObj.content}
|
||||
>
|
||||
{childObj.content.children}
|
||||
</TweenOne>
|
||||
</div>
|
||||
</TweenOne>
|
||||
);
|
||||
});
|
||||
return (
|
||||
<div {...props} {...dataSource.wrapper}>
|
||||
<div {...dataSource.page}>
|
||||
<div {...dataSource.titleWrapper}>
|
||||
{dataSource.titleWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
<OverPack {...dataSource.OverPack}>
|
||||
<QueueAnim key="u" type="bottom">
|
||||
<Row key="row" {...dataSource.block}>
|
||||
{children}
|
||||
</Row>
|
||||
</QueueAnim>
|
||||
</OverPack>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
render() {
|
||||
const {...props} = this.props;
|
||||
const {dataSource, isMobile} = props;
|
||||
delete props.dataSource;
|
||||
delete props.isMobile;
|
||||
let clearFloatNum = 0;
|
||||
const children = dataSource.block.children.map((item, i) => {
|
||||
const childObj = item.children;
|
||||
const delay = isMobile ? i * 50 : this.getDelay(i, 24 / item.md);
|
||||
const liAnim = {
|
||||
opacity: 0,
|
||||
type: 'from',
|
||||
ease: 'easeOutQuad',
|
||||
delay,
|
||||
};
|
||||
const childrenAnim = {...liAnim, x: '+=10', delay: delay + 100};
|
||||
clearFloatNum += item.md;
|
||||
clearFloatNum = clearFloatNum > 24 ? 0 : clearFloatNum;
|
||||
return (
|
||||
<TweenOne
|
||||
component={Col}
|
||||
animation={liAnim}
|
||||
key={item.name}
|
||||
{...item}
|
||||
componentProps={{md: item.md, xs: item.xs}}
|
||||
className={
|
||||
!clearFloatNum
|
||||
? `${item.className || ''} clear-both`.trim()
|
||||
: item.className
|
||||
}
|
||||
>
|
||||
<TweenOne
|
||||
animation={{
|
||||
x: '-=10',
|
||||
opacity: 0,
|
||||
type: 'from',
|
||||
ease: 'easeOutQuad',
|
||||
}}
|
||||
key="img"
|
||||
{...childObj.icon}
|
||||
>
|
||||
<img src={childObj.icon.children} width="100%" alt="img"/>
|
||||
</TweenOne>
|
||||
<div {...childObj.textWrapper}>
|
||||
<TweenOne
|
||||
key="h2"
|
||||
animation={childrenAnim}
|
||||
component="h2"
|
||||
{...childObj.title}
|
||||
>
|
||||
{childObj.title.children}
|
||||
</TweenOne>
|
||||
<TweenOne
|
||||
key="p"
|
||||
animation={{...childrenAnim, delay: delay + 200}}
|
||||
component="div"
|
||||
{...childObj.content}
|
||||
>
|
||||
{childObj.content.children}
|
||||
</TweenOne>
|
||||
</div>
|
||||
</TweenOne>
|
||||
);
|
||||
});
|
||||
return (
|
||||
<div {...props} {...dataSource.wrapper}>
|
||||
<div {...dataSource.page}>
|
||||
<div {...dataSource.titleWrapper}>
|
||||
{dataSource.titleWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
<OverPack {...dataSource.OverPack}>
|
||||
<QueueAnim key="u" type="bottom">
|
||||
<Row key="row" {...dataSource.block}>
|
||||
{children}
|
||||
</Row>
|
||||
</QueueAnim>
|
||||
</OverPack>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Content3;
|
||||
|
||||
@@ -2,58 +2,58 @@ import React from 'react';
|
||||
import TweenOne from 'rc-tween-one';
|
||||
import OverPack from 'rc-scroll-anim/lib/ScrollOverPack';
|
||||
import VideoPlay from 'react-sublime-video';
|
||||
import { getChildrenToRender } from './utils';
|
||||
import {getChildrenToRender} from './utils';
|
||||
|
||||
function Content4(props) {
|
||||
const { ...tagProps } = props;
|
||||
const { dataSource, isMobile } = tagProps;
|
||||
delete tagProps.dataSource;
|
||||
delete tagProps.isMobile;
|
||||
const animation = {
|
||||
y: '+=30',
|
||||
opacity: 0,
|
||||
type: 'from',
|
||||
ease: 'easeOutQuad',
|
||||
};
|
||||
const videoChildren = dataSource.video.children.video;
|
||||
const videoNameArray = videoChildren.split('.');
|
||||
const type = videoNameArray[videoNameArray.length - 1];
|
||||
return (
|
||||
<div {...tagProps} {...dataSource.wrapper}>
|
||||
<div {...dataSource.page}>
|
||||
<div key="title" {...dataSource.titleWrapper}>
|
||||
{dataSource.titleWrapper.children.map(getChildrenToRender)}
|
||||
const {...tagProps} = props;
|
||||
const {dataSource, isMobile} = tagProps;
|
||||
delete tagProps.dataSource;
|
||||
delete tagProps.isMobile;
|
||||
const animation = {
|
||||
y: '+=30',
|
||||
opacity: 0,
|
||||
type: 'from',
|
||||
ease: 'easeOutQuad',
|
||||
};
|
||||
const videoChildren = dataSource.video.children.video;
|
||||
const videoNameArray = videoChildren.split('.');
|
||||
const type = videoNameArray[videoNameArray.length - 1];
|
||||
return (
|
||||
<div {...tagProps} {...dataSource.wrapper}>
|
||||
<div {...dataSource.page}>
|
||||
<div key="title" {...dataSource.titleWrapper}>
|
||||
{dataSource.titleWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
<OverPack {...dataSource.OverPack}>
|
||||
<TweenOne
|
||||
key="video"
|
||||
animation={{...animation, delay: 300}}
|
||||
{...dataSource.video}
|
||||
>
|
||||
{isMobile ? (
|
||||
<video
|
||||
width="100%"
|
||||
loop
|
||||
controls
|
||||
poster={dataSource.video.children.image}
|
||||
>
|
||||
<source src={videoChildren} type={`video/${type}`}/>
|
||||
<track kind="captions"/>
|
||||
</video>
|
||||
) : (
|
||||
<VideoPlay
|
||||
loop
|
||||
width="100%"
|
||||
poster={dataSource.video.children.image}
|
||||
>
|
||||
<source src={videoChildren} type={`video/${type}`}/>
|
||||
</VideoPlay>
|
||||
)}
|
||||
</TweenOne>
|
||||
</OverPack>
|
||||
</div>
|
||||
</div>
|
||||
<OverPack {...dataSource.OverPack}>
|
||||
<TweenOne
|
||||
key="video"
|
||||
animation={{ ...animation, delay: 300 }}
|
||||
{...dataSource.video}
|
||||
>
|
||||
{isMobile ? (
|
||||
<video
|
||||
width="100%"
|
||||
loop
|
||||
controls
|
||||
poster={dataSource.video.children.image}
|
||||
>
|
||||
<source src={videoChildren} type={`video/${type}`} />
|
||||
<track kind="captions" />
|
||||
</video>
|
||||
) : (
|
||||
<VideoPlay
|
||||
loop
|
||||
width="100%"
|
||||
poster={dataSource.video.children.image}
|
||||
>
|
||||
<source src={videoChildren} type={`video/${type}`} />
|
||||
</VideoPlay>
|
||||
)}
|
||||
</TweenOne>
|
||||
</OverPack>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
export default Content4;
|
||||
|
||||
@@ -2,68 +2,68 @@ import React from 'react';
|
||||
import TweenOne from 'rc-tween-one';
|
||||
import OverPack from 'rc-scroll-anim/lib/ScrollOverPack';
|
||||
import QueueAnim from 'rc-queue-anim';
|
||||
import { Row, Col } from 'antd';
|
||||
import { getChildrenToRender } from './utils';
|
||||
import { isImg } from './utils';
|
||||
import {Row, Col} from 'antd';
|
||||
import {getChildrenToRender} from './utils';
|
||||
import {isImg} from './utils';
|
||||
|
||||
class Footer extends React.Component {
|
||||
static defaultProps = {
|
||||
className: 'footer1',
|
||||
};
|
||||
static defaultProps = {
|
||||
className: 'footer1',
|
||||
};
|
||||
|
||||
getLiChildren = (data) =>
|
||||
data.map((item, i) => {
|
||||
const { title, childWrapper, ...itemProps } = item;
|
||||
return (
|
||||
<Col key={i.toString()} {...itemProps} title={null} content={null}>
|
||||
<h2 {...title}>
|
||||
{typeof title.children === 'string' &&
|
||||
title.children.match(isImg) ? (
|
||||
<img src={title.children} width="100%" alt="img" />
|
||||
) : (
|
||||
title.children
|
||||
)}
|
||||
</h2>
|
||||
<div {...childWrapper}>
|
||||
{childWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
</Col>
|
||||
);
|
||||
});
|
||||
getLiChildren = (data) =>
|
||||
data.map((item, i) => {
|
||||
const {title, childWrapper, ...itemProps} = item;
|
||||
return (
|
||||
<Col key={i.toString()} {...itemProps} title={null} content={null}>
|
||||
<h2 {...title}>
|
||||
{typeof title.children === 'string' &&
|
||||
title.children.match(isImg) ? (
|
||||
<img src={title.children} width="100%" alt="img"/>
|
||||
) : (
|
||||
title.children
|
||||
)}
|
||||
</h2>
|
||||
<div {...childWrapper}>
|
||||
{childWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
</Col>
|
||||
);
|
||||
});
|
||||
|
||||
render() {
|
||||
const { ...props } = this.props;
|
||||
const { dataSource } = props;
|
||||
delete props.dataSource;
|
||||
delete props.isMobile;
|
||||
const childrenToRender = this.getLiChildren(dataSource.block.children);
|
||||
return (
|
||||
<div {...props} {...dataSource.wrapper}>
|
||||
<OverPack {...dataSource.OverPack}>
|
||||
<QueueAnim
|
||||
type="bottom"
|
||||
key="ul"
|
||||
leaveReverse
|
||||
component={Row}
|
||||
{...dataSource.block}
|
||||
>
|
||||
{childrenToRender}
|
||||
</QueueAnim>
|
||||
<TweenOne
|
||||
animation={{ y: '+=30', opacity: 0, type: 'from' }}
|
||||
key="copyright"
|
||||
{...dataSource.copyrightWrapper}
|
||||
>
|
||||
<div {...dataSource.copyrightPage}>
|
||||
<div {...dataSource.copyright}>
|
||||
{dataSource.copyright.children}
|
||||
</div>
|
||||
render() {
|
||||
const {...props} = this.props;
|
||||
const {dataSource} = props;
|
||||
delete props.dataSource;
|
||||
delete props.isMobile;
|
||||
const childrenToRender = this.getLiChildren(dataSource.block.children);
|
||||
return (
|
||||
<div {...props} {...dataSource.wrapper}>
|
||||
<OverPack {...dataSource.OverPack}>
|
||||
<QueueAnim
|
||||
type="bottom"
|
||||
key="ul"
|
||||
leaveReverse
|
||||
component={Row}
|
||||
{...dataSource.block}
|
||||
>
|
||||
{childrenToRender}
|
||||
</QueueAnim>
|
||||
<TweenOne
|
||||
animation={{y: '+=30', opacity: 0, type: 'from'}}
|
||||
key="copyright"
|
||||
{...dataSource.copyrightWrapper}
|
||||
>
|
||||
<div {...dataSource.copyrightPage}>
|
||||
<div {...dataSource.copyright}>
|
||||
{dataSource.copyright.children}
|
||||
</div>
|
||||
</div>
|
||||
</TweenOne>
|
||||
</OverPack>
|
||||
</div>
|
||||
</TweenOne>
|
||||
</OverPack>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Footer;
|
||||
|
||||
@@ -1,134 +1,134 @@
|
||||
import React from 'react';
|
||||
import TweenOne from 'rc-tween-one';
|
||||
import { Menu } from 'antd';
|
||||
import { getChildrenToRender } from './utils';
|
||||
import {Menu} from 'antd';
|
||||
import {getChildrenToRender} from './utils';
|
||||
|
||||
const { Item, SubMenu } = Menu;
|
||||
const {Item, SubMenu} = Menu;
|
||||
|
||||
class Header extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
phoneOpen: undefined,
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
phoneOpen: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
phoneClick = () => {
|
||||
const phoneOpen = !this.state.phoneOpen;
|
||||
this.setState({
|
||||
phoneOpen,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
phoneClick = () => {
|
||||
const phoneOpen = !this.state.phoneOpen;
|
||||
this.setState({
|
||||
phoneOpen,
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { dataSource, isMobile, ...props } = this.props;
|
||||
const { phoneOpen } = this.state;
|
||||
const navData = dataSource.Menu.children;
|
||||
const navChildren = navData.map((item) => {
|
||||
const { children: a, subItem, ...itemProps } = item;
|
||||
if (subItem) {
|
||||
return (
|
||||
<SubMenu
|
||||
key={item.name}
|
||||
{...itemProps}
|
||||
title={
|
||||
<div
|
||||
{...a}
|
||||
className={`header0-item-block ${a.className}`.trim()}
|
||||
>
|
||||
{a.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
render() {
|
||||
const {dataSource, isMobile, ...props} = this.props;
|
||||
const {phoneOpen} = this.state;
|
||||
const navData = dataSource.Menu.children;
|
||||
const navChildren = navData.map((item) => {
|
||||
const {children: a, subItem, ...itemProps} = item;
|
||||
if (subItem) {
|
||||
return (
|
||||
<SubMenu
|
||||
key={item.name}
|
||||
{...itemProps}
|
||||
title={
|
||||
<div
|
||||
{...a}
|
||||
className={`header0-item-block ${a.className}`.trim()}
|
||||
>
|
||||
{a.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
}
|
||||
popupClassName="header0-item-child"
|
||||
>
|
||||
{subItem.map(($item, ii) => {
|
||||
const {children: childItem} = $item;
|
||||
const child = childItem.href ? (
|
||||
<a {...childItem}>
|
||||
{childItem.children.map(getChildrenToRender)}
|
||||
</a>
|
||||
) : (
|
||||
<div {...childItem}>
|
||||
{childItem.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<Item key={$item.name || ii.toString()} {...$item}>
|
||||
{child}
|
||||
</Item>
|
||||
);
|
||||
})}
|
||||
</SubMenu>
|
||||
);
|
||||
}
|
||||
popupClassName="header0-item-child"
|
||||
>
|
||||
{subItem.map(($item, ii) => {
|
||||
const { children: childItem } = $item;
|
||||
const child = childItem.href ? (
|
||||
<a {...childItem}>
|
||||
{childItem.children.map(getChildrenToRender)}
|
||||
</a>
|
||||
) : (
|
||||
<div {...childItem}>
|
||||
{childItem.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<Item key={$item.name || ii.toString()} {...$item}>
|
||||
{child}
|
||||
return (
|
||||
<Item key={item.name} {...itemProps}>
|
||||
<a {...a} className={`header0-item-block ${a.className}`.trim()}>
|
||||
{a.children.map(getChildrenToRender)}
|
||||
</a>
|
||||
</Item>
|
||||
);
|
||||
})}
|
||||
</SubMenu>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Item key={item.name} {...itemProps}>
|
||||
<a {...a} className={`header0-item-block ${a.className}`.trim()}>
|
||||
{a.children.map(getChildrenToRender)}
|
||||
</a>
|
||||
</Item>
|
||||
);
|
||||
});
|
||||
const moment = phoneOpen === undefined ? 300 : null;
|
||||
return (
|
||||
<TweenOne
|
||||
component="header"
|
||||
animation={{ opacity: 0, type: 'from' }}
|
||||
{...dataSource.wrapper}
|
||||
{...props}
|
||||
>
|
||||
<div
|
||||
{...dataSource.page}
|
||||
className={`${dataSource.page.className}${phoneOpen ? ' open' : ''}`}
|
||||
>
|
||||
<TweenOne
|
||||
animation={{ x: -30, type: 'from', ease: 'easeOutQuad' }}
|
||||
{...dataSource.logo}
|
||||
>
|
||||
<img width="100%" src={dataSource.logo.children} alt="img" />
|
||||
</TweenOne>
|
||||
{isMobile && (
|
||||
<div
|
||||
{...dataSource.mobileMenu}
|
||||
onClick={() => {
|
||||
this.phoneClick();
|
||||
}}
|
||||
);
|
||||
});
|
||||
const moment = phoneOpen === undefined ? 300 : null;
|
||||
return (
|
||||
<TweenOne
|
||||
component="header"
|
||||
animation={{opacity: 0, type: 'from'}}
|
||||
{...dataSource.wrapper}
|
||||
{...props}
|
||||
>
|
||||
<em />
|
||||
<em />
|
||||
<em />
|
||||
</div>
|
||||
)}
|
||||
<TweenOne
|
||||
{...dataSource.Menu}
|
||||
animation={
|
||||
isMobile
|
||||
? {
|
||||
height: 0,
|
||||
duration: 300,
|
||||
onComplete: (e) => {
|
||||
if (this.state.phoneOpen) {
|
||||
e.target.style.height = 'auto';
|
||||
}
|
||||
},
|
||||
ease: 'easeInOutQuad',
|
||||
}
|
||||
: null
|
||||
}
|
||||
moment={moment}
|
||||
reverse={!!phoneOpen}
|
||||
>
|
||||
<Menu
|
||||
mode={isMobile ? 'inline' : 'horizontal'}
|
||||
defaultSelectedKeys={['sub0']}
|
||||
theme="dark"
|
||||
items={navChildren}
|
||||
/>
|
||||
</TweenOne>
|
||||
</div>
|
||||
</TweenOne>
|
||||
);
|
||||
}
|
||||
<div
|
||||
{...dataSource.page}
|
||||
className={`${dataSource.page.className}${phoneOpen ? ' open' : ''}`}
|
||||
>
|
||||
<TweenOne
|
||||
animation={{x: -30, type: 'from', ease: 'easeOutQuad'}}
|
||||
{...dataSource.logo}
|
||||
>
|
||||
<img width="100%" src={dataSource.logo.children} alt="img"/>
|
||||
</TweenOne>
|
||||
{isMobile && (
|
||||
<div
|
||||
{...dataSource.mobileMenu}
|
||||
onClick={() => {
|
||||
this.phoneClick();
|
||||
}}
|
||||
>
|
||||
<em/>
|
||||
<em/>
|
||||
<em/>
|
||||
</div>
|
||||
)}
|
||||
<TweenOne
|
||||
{...dataSource.Menu}
|
||||
animation={
|
||||
isMobile
|
||||
? {
|
||||
height: 0,
|
||||
duration: 300,
|
||||
onComplete: (e) => {
|
||||
if (this.state.phoneOpen) {
|
||||
e.target.style.height = 'auto';
|
||||
}
|
||||
},
|
||||
ease: 'easeInOutQuad',
|
||||
}
|
||||
: null
|
||||
}
|
||||
moment={moment}
|
||||
reverse={!!phoneOpen}
|
||||
>
|
||||
<Menu
|
||||
mode={isMobile ? 'inline' : 'horizontal'}
|
||||
defaultSelectedKeys={['sub0']}
|
||||
theme="dark"
|
||||
items={navChildren}
|
||||
/>
|
||||
</TweenOne>
|
||||
</div>
|
||||
</TweenOne>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Header;
|
||||
|
||||
@@ -1,73 +1,73 @@
|
||||
import React from 'react';
|
||||
import OverPack from 'rc-scroll-anim/lib/ScrollOverPack';
|
||||
import QueueAnim from 'rc-queue-anim';
|
||||
import { Row, Col, Button } from 'antd';
|
||||
import { getChildrenToRender } from './utils';
|
||||
import {Button, Col, Row} from 'antd';
|
||||
import {getChildrenToRender} from './utils';
|
||||
|
||||
class Pricing1 extends React.PureComponent {
|
||||
getChildrenToRender = (item) => {
|
||||
const {
|
||||
wrapper,
|
||||
topWrapper,
|
||||
name,
|
||||
buttonWrapper,
|
||||
line,
|
||||
content,
|
||||
money,
|
||||
} = item.children;
|
||||
return (
|
||||
<Col key={item.name} {...item}>
|
||||
<QueueAnim type="bottom" {...wrapper}>
|
||||
<div {...topWrapper}>
|
||||
<div {...name} key="name">
|
||||
{name.children}
|
||||
</div>
|
||||
<h1 {...money} key="money">
|
||||
{money.children}
|
||||
</h1>
|
||||
</div>
|
||||
<div {...content} key="content">
|
||||
{content.children}
|
||||
</div>
|
||||
<i {...line} key="line" />
|
||||
<div {...buttonWrapper} key="button">
|
||||
<Button {...buttonWrapper.children.a}>
|
||||
{buttonWrapper.children.a.children}
|
||||
</Button>
|
||||
</div>
|
||||
</QueueAnim>
|
||||
</Col>
|
||||
);
|
||||
};
|
||||
getChildrenToRender = (item) => {
|
||||
const {
|
||||
wrapper,
|
||||
topWrapper,
|
||||
name,
|
||||
buttonWrapper,
|
||||
line,
|
||||
content,
|
||||
money,
|
||||
} = item.children;
|
||||
return (
|
||||
<Col key={item.name} {...item}>
|
||||
<QueueAnim type="bottom" {...wrapper}>
|
||||
<div {...topWrapper}>
|
||||
<div {...name} key="name">
|
||||
{name.children}
|
||||
</div>
|
||||
<h1 {...money} key="money">
|
||||
{money.children}
|
||||
</h1>
|
||||
</div>
|
||||
<div {...content} key="content">
|
||||
{content.children}
|
||||
</div>
|
||||
<i {...line} key="line"/>
|
||||
<div {...buttonWrapper} key="button">
|
||||
<Button {...buttonWrapper.children.a}>
|
||||
{buttonWrapper.children.a.children}
|
||||
</Button>
|
||||
</div>
|
||||
</QueueAnim>
|
||||
</Col>
|
||||
);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { ...props } = this.props;
|
||||
const { dataSource } = props;
|
||||
delete props.dataSource;
|
||||
delete props.isMobile;
|
||||
const { block } = dataSource;
|
||||
const childrenToRender = block.children.map(this.getChildrenToRender);
|
||||
return (
|
||||
<div {...props} {...dataSource.wrapper}>
|
||||
<div {...dataSource.page}>
|
||||
<div key="title" {...dataSource.titleWrapper}>
|
||||
{dataSource.titleWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
<OverPack {...dataSource.OverPack}>
|
||||
<QueueAnim
|
||||
type="bottom"
|
||||
component={Row}
|
||||
leaveReverse
|
||||
ease={['easeOutQuad', 'easeInOutQuad']}
|
||||
key="content"
|
||||
>
|
||||
{childrenToRender}
|
||||
</QueueAnim>
|
||||
</OverPack>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
render() {
|
||||
const {...props} = this.props;
|
||||
const {dataSource} = props;
|
||||
delete props.dataSource;
|
||||
delete props.isMobile;
|
||||
const {block} = dataSource;
|
||||
const childrenToRender = block.children.map(this.getChildrenToRender);
|
||||
return (
|
||||
<div {...props} {...dataSource.wrapper}>
|
||||
<div {...dataSource.page}>
|
||||
<div key="title" {...dataSource.titleWrapper}>
|
||||
{dataSource.titleWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
<OverPack {...dataSource.OverPack}>
|
||||
<QueueAnim
|
||||
type="bottom"
|
||||
component={Row}
|
||||
leaveReverse
|
||||
ease={['easeOutQuad', 'easeInOutQuad']}
|
||||
key="content"
|
||||
>
|
||||
{childrenToRender}
|
||||
</QueueAnim>
|
||||
</OverPack>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Pricing1;
|
||||
|
||||
@@ -1,114 +1,114 @@
|
||||
import React from 'react';
|
||||
import OverPack from 'rc-scroll-anim/lib/ScrollOverPack';
|
||||
import QueueAnim from 'rc-queue-anim';
|
||||
import { Table } from 'antd';
|
||||
import { getChildrenToRender, isImg } from './utils';
|
||||
import {Table} from 'antd';
|
||||
import {getChildrenToRender, isImg} from './utils';
|
||||
|
||||
class Pricing2 extends React.PureComponent {
|
||||
getColumns = (columns) => {
|
||||
return columns.map((item) => {
|
||||
const { childWrapper, ...$item } = item;
|
||||
return {
|
||||
align: 'center',
|
||||
...$item,
|
||||
title: (
|
||||
<div {...childWrapper}>
|
||||
{childWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
),
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
getDataSource = (dataSource, columns) =>
|
||||
dataSource.map((item, i) => {
|
||||
const obj = { key: i.toString() };
|
||||
item.children.forEach(($item, ii) => {
|
||||
if (columns[ii]) {
|
||||
obj[columns[ii].key] = (
|
||||
<div {...$item}>
|
||||
{typeof $item.children === 'string' &&
|
||||
$item.children.match(isImg) ? (
|
||||
<img src={$item.children} alt="img" />
|
||||
) : (
|
||||
$item.children
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
});
|
||||
|
||||
getMobileChild = (table) => {
|
||||
const { columns, dataSource, ...tableProps } = table;
|
||||
const names = columns.children.filter(
|
||||
(item) => item.key.indexOf('name') >= 0
|
||||
);
|
||||
const newColumns = columns.children.filter(
|
||||
(item) => item.key.indexOf('name') === -1
|
||||
);
|
||||
return newColumns.map((item, i) => {
|
||||
const items = [].concat(names[0], item).filter((c) => c);
|
||||
if (items.length > 1) {
|
||||
items[0].colSpan = 0;
|
||||
items[1].colSpan = 2;
|
||||
}
|
||||
const dataSources = dataSource.children.map(($item) => {
|
||||
const child = $item.children.filter(
|
||||
(c) => c.name.indexOf('name') === -1
|
||||
);
|
||||
const n = $item.children.filter((c) => c.name.indexOf('name') >= 0);
|
||||
return {
|
||||
...$item,
|
||||
children: [].concat(n[0], child[i]).filter((c) => c),
|
||||
};
|
||||
});
|
||||
const props = {
|
||||
...tableProps,
|
||||
columns: this.getColumns(items),
|
||||
dataSource: this.getDataSource(dataSources, items),
|
||||
};
|
||||
return (
|
||||
<Table key={i.toString()} {...props} pagination={false} bordered />
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { dataSource, isMobile, ...props } = this.props;
|
||||
const { Table: table, wrapper, page, titleWrapper } = dataSource;
|
||||
const { columns, dataSource: tableData, ...$table } = table;
|
||||
const tableProps = {
|
||||
...$table,
|
||||
columns: this.getColumns(columns.children),
|
||||
dataSource: this.getDataSource(tableData.children, columns.children),
|
||||
getColumns = (columns) => {
|
||||
return columns.map((item) => {
|
||||
const {childWrapper, ...$item} = item;
|
||||
return {
|
||||
align: 'center',
|
||||
...$item,
|
||||
title: (
|
||||
<div {...childWrapper}>
|
||||
{childWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
),
|
||||
};
|
||||
});
|
||||
};
|
||||
const childrenToRender = isMobile ? (
|
||||
this.getMobileChild(table)
|
||||
) : (
|
||||
<Table key="table" {...tableProps} pagination={false} bordered />
|
||||
);
|
||||
return (
|
||||
<div {...props} {...wrapper}>
|
||||
<div {...page}>
|
||||
<div key="title" {...titleWrapper}>
|
||||
{titleWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
<OverPack {...dataSource.OverPack}>
|
||||
<QueueAnim
|
||||
type="bottom"
|
||||
leaveReverse
|
||||
ease={['easeOutQuad', 'easeInOutQuad']}
|
||||
key="content"
|
||||
>
|
||||
{childrenToRender}
|
||||
</QueueAnim>
|
||||
</OverPack>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
getDataSource = (dataSource, columns) =>
|
||||
dataSource.map((item, i) => {
|
||||
const obj = {key: i.toString()};
|
||||
item.children.forEach(($item, ii) => {
|
||||
if (columns[ii]) {
|
||||
obj[columns[ii].key] = (
|
||||
<div {...$item}>
|
||||
{typeof $item.children === 'string' &&
|
||||
$item.children.match(isImg) ? (
|
||||
<img src={$item.children} alt="img"/>
|
||||
) : (
|
||||
$item.children
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
return obj;
|
||||
});
|
||||
|
||||
getMobileChild = (table) => {
|
||||
const {columns, dataSource, ...tableProps} = table;
|
||||
const names = columns.children.filter(
|
||||
(item) => item.key.indexOf('name') >= 0
|
||||
);
|
||||
const newColumns = columns.children.filter(
|
||||
(item) => item.key.indexOf('name') === -1
|
||||
);
|
||||
return newColumns.map((item, i) => {
|
||||
const items = [].concat(names[0], item).filter((c) => c);
|
||||
if (items.length > 1) {
|
||||
items[0].colSpan = 0;
|
||||
items[1].colSpan = 2;
|
||||
}
|
||||
const dataSources = dataSource.children.map(($item) => {
|
||||
const child = $item.children.filter(
|
||||
(c) => c.name.indexOf('name') === -1
|
||||
);
|
||||
const n = $item.children.filter((c) => c.name.indexOf('name') >= 0);
|
||||
return {
|
||||
...$item,
|
||||
children: [].concat(n[0], child[i]).filter((c) => c),
|
||||
};
|
||||
});
|
||||
const props = {
|
||||
...tableProps,
|
||||
columns: this.getColumns(items),
|
||||
dataSource: this.getDataSource(dataSources, items),
|
||||
};
|
||||
return (
|
||||
<Table key={i.toString()} {...props} pagination={false} bordered/>
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const {dataSource, isMobile, ...props} = this.props;
|
||||
const {Table: table, wrapper, page, titleWrapper} = dataSource;
|
||||
const {columns, dataSource: tableData, ...$table} = table;
|
||||
const tableProps = {
|
||||
...$table,
|
||||
columns: this.getColumns(columns.children),
|
||||
dataSource: this.getDataSource(tableData.children, columns.children),
|
||||
};
|
||||
const childrenToRender = isMobile ? (
|
||||
this.getMobileChild(table)
|
||||
) : (
|
||||
<Table key="table" {...tableProps} pagination={false} bordered/>
|
||||
);
|
||||
return (
|
||||
<div {...props} {...wrapper}>
|
||||
<div {...page}>
|
||||
<div key="title" {...titleWrapper}>
|
||||
{titleWrapper.children.map(getChildrenToRender)}
|
||||
</div>
|
||||
<OverPack {...dataSource.OverPack}>
|
||||
<QueueAnim
|
||||
type="bottom"
|
||||
leaveReverse
|
||||
ease={['easeOutQuad', 'easeInOutQuad']}
|
||||
key="content"
|
||||
>
|
||||
{childrenToRender}
|
||||
</QueueAnim>
|
||||
</OverPack>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Pricing2;
|
||||
|
||||
@@ -1,70 +1,67 @@
|
||||
/* eslint no-undef: 0 */
|
||||
/* eslint arrow-parens: 0 */
|
||||
|
||||
import { enquireScreen } from "enquire-js";
|
||||
import {enquireScreen} from "enquire-js";
|
||||
import React from "react";
|
||||
import Banner0 from "./Banner0";
|
||||
import {
|
||||
Banner00DataSource,
|
||||
Footer10DataSource,
|
||||
} from "./data.source";
|
||||
import {Banner00DataSource, Footer10DataSource,} from "./data.source";
|
||||
import Footer1 from "./Footer1";
|
||||
import "./less/antMotionStyle.less";
|
||||
|
||||
let isMobile;
|
||||
enquireScreen((b) => {
|
||||
isMobile = b;
|
||||
isMobile = b;
|
||||
});
|
||||
|
||||
const { location = {} } = typeof window !== "undefined" ? window : {};
|
||||
const {location = {}} = typeof window !== "undefined" ? window : {};
|
||||
|
||||
export default class Home extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
isMobile,
|
||||
show: !location.port,
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
enquireScreen((b) => {
|
||||
this.setState({ isMobile: !!b });
|
||||
});
|
||||
if (location.port) {
|
||||
// 样式 build 时间在 200-300ms 之间;
|
||||
setTimeout(() => {
|
||||
this.setState({
|
||||
show: true,
|
||||
});
|
||||
}, 500);
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
isMobile,
|
||||
show: !location.port,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const children = [
|
||||
<Banner0
|
||||
id="Banner0_0"
|
||||
key="Banner0_0"
|
||||
dataSource={Banner00DataSource}
|
||||
isMobile={this.state.isMobile}
|
||||
/>,
|
||||
<Footer1
|
||||
id="Footer1_0"
|
||||
key="Footer1_0"
|
||||
dataSource={Footer10DataSource}
|
||||
isMobile={this.state.isMobile}
|
||||
/>,
|
||||
];
|
||||
return (
|
||||
<div
|
||||
className="templates-wrapper"
|
||||
ref={(d) => {
|
||||
this.dom = d;
|
||||
}}
|
||||
>
|
||||
{this.state.show && children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
componentDidMount() {
|
||||
enquireScreen((b) => {
|
||||
this.setState({isMobile: !!b});
|
||||
});
|
||||
if (location.port) {
|
||||
// 样式 build 时间在 200-300ms 之间;
|
||||
setTimeout(() => {
|
||||
this.setState({
|
||||
show: true,
|
||||
});
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const children = [
|
||||
<Banner0
|
||||
id="Banner0_0"
|
||||
key="Banner0_0"
|
||||
dataSource={Banner00DataSource}
|
||||
isMobile={this.state.isMobile}
|
||||
/>,
|
||||
<Footer1
|
||||
id="Footer1_0"
|
||||
key="Footer1_0"
|
||||
dataSource={Footer10DataSource}
|
||||
isMobile={this.state.isMobile}
|
||||
/>,
|
||||
];
|
||||
return (
|
||||
<div
|
||||
className="templates-wrapper"
|
||||
ref={(d) => {
|
||||
this.dom = d;
|
||||
}}
|
||||
>
|
||||
{this.state.show && children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
background-size: cover;
|
||||
background-attachment: fixed;
|
||||
background-position: center;
|
||||
|
||||
& &-text-wrapper {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
@@ -20,10 +21,12 @@
|
||||
font-size: 14px;
|
||||
color: @template-text-color-light;
|
||||
width: 550px;
|
||||
|
||||
> .queue-anim-leaving {
|
||||
position: relative !important;
|
||||
}
|
||||
}
|
||||
|
||||
& &-title {
|
||||
width: 350px;
|
||||
//left: 30px;
|
||||
@@ -33,11 +36,13 @@
|
||||
font-size: 40px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
& &-content {
|
||||
margin-bottom: 20px;
|
||||
word-wrap: break-word;
|
||||
min-height: 24px;
|
||||
}
|
||||
|
||||
& &-button {
|
||||
border: 1px solid #fff;
|
||||
color: #fff;
|
||||
@@ -46,42 +51,50 @@
|
||||
font-size: 16px;
|
||||
height: 40px;
|
||||
transition: background 0.45s @ease-out, box-shadow 0.45s @ease-out;
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 0 10px rgba(50, 250, 255, 0.75);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
&.queue-anim-leaving {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
& &-button2 {
|
||||
border: 1px solid #fff;
|
||||
color: #fff;
|
||||
// background: transparent;
|
||||
// background: transparent;
|
||||
box-shadow: 0 0 0 transparent;
|
||||
font-size: 16px;
|
||||
height: 40px;
|
||||
transition: background 0.45s @ease-out, box-shadow 0.45s @ease-out;
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 0 10px rgba(50, 250, 255, 0.75);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
&.queue-anim-leaving {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
& &-icon {
|
||||
bottom: 20px;
|
||||
font-size: 24px;
|
||||
@@ -95,9 +108,11 @@
|
||||
@media screen and (max-width: 767px) {
|
||||
.@{banner0} {
|
||||
background-attachment: inherit;
|
||||
|
||||
& &-text-wrapper {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
& &-title {
|
||||
width: 90%;
|
||||
left: 0;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
// @import "~antd/lib/style/v2-compatible-reset.less";
|
||||
|
||||
body {
|
||||
@@ -36,6 +35,7 @@ h6 {
|
||||
#react-content {
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.home-page-wrapper p {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
width: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.@{homepage} {
|
||||
height: 100%;
|
||||
max-width: 1200px;
|
||||
@@ -10,11 +11,13 @@
|
||||
margin: auto;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.title-wrapper > h1, > h1 {
|
||||
font-size: 32px;
|
||||
color: @text-color;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.title-wrapper {
|
||||
margin: 0 auto 64px;
|
||||
text-align: center;
|
||||
@@ -29,14 +32,17 @@
|
||||
.@{homepage}-wrapper {
|
||||
.@{homepage} {
|
||||
padding: 56px 24px;
|
||||
>h1 {
|
||||
|
||||
> h1 {
|
||||
font-size: 24px;
|
||||
margin: 0 auto 32px;
|
||||
|
||||
&.title-h1 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
>p {
|
||||
|
||||
> p {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
height: 100%;
|
||||
padding: 64px 24px;
|
||||
|
||||
>.title-wrapper {
|
||||
> .title-wrapper {
|
||||
margin: 0 auto 48px;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
text-align: center;
|
||||
min-height: 200px;
|
||||
margin-bottom: 24px;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||