PageSourceSearch

https://dashboard.rx2go.ai/dist/js/571.5639125d.js

js rx2go.ai collected 2026-10-05 08:04:12 UTC 6,724 bytes, 2 lines download raw bytes

1"use strict";(self["webpackChunkrx2go_dashboard"]=self["webpackChunkrx2go_dashboard"]||[]).push([[571],{40571:(t,e,o)=>{o.r(e),o.d(e,{default:()=>p});o(18684);var s=function(){var t=this,e=t._self._c;t._self._setupProxy;return e("modal-dialog",{attrs:{name:t.name,"width-style":"custom","custom-width":1100},on:{close:function(e){return t.$emit("close")}}},[e("div",{attrs:{slot:"header"},slot:"header"},[e("h3",{staticClass:"mb-0"},[e("i",{staticClass:"fa fa-route"}),t._v(" "+t._s(t.$t("routes.add_to_existing_route"))+" ")])]),e("div",{staticClass:"add-to-existing-route__body",attrs:{slot:"body"},slot:"body"},[e("div",{staticClass:"add-to-existing-route__list"},[t.loading?e("div",{staticClass:"add-to-existing-route__state"},[t._v(" Loading routes... ")]):t.error?e("div",{staticClass:"add-to-existing-route__state add-to-existing-route__state--error"},[t._v(" "+t._s(t.error)+" ")]):t.routes.length?t._l(t.routes,(function(o){var s;return e("div",{key:o.uid,staticClass:"add-to-existing-route__item",class:{"add-to-existing-route__item--selected":(null===(s=t.selectedRoute)||void 0===s?void 0:s.uid)===o.uid},on:{click:function(e){return t.selectRoute(o)}}},[e("div",{staticClass:"add-to-existing-route__item-title"},[e("a",{attrs:{href:"/routes/".concat(o.uid),target:"_blank"},on:{click:function(t){t.stopPropagation()}}},[t._v("#"+t._s(o.uid))]),t._v(" "+t._s(o.name)+" ")]),e("div",{staticClass:"add-to-existing-route__item-row"},[e("span",{staticClass:"add-to-existing-route__label"},[t._v("Route family:")]),t._v(" "+t._s(o.route_family||"—")+" ")]),e("div",{staticClass:"add-to-existing-route__item-row"},[e("span",{staticClass:"add-to-existing-route__label"},[t._v("Hub:")]),t._v(" "+t._s(o.hub||"—")+" ")]),e("div",{staticClass:"add-to-existing-route__item-row"},[e("span",{staticClass:"add-to-existing-route__label"},[t._v("Date:")]),t._v(" "+t._s(o.date)+" ")]),e("div",{staticClass:"add-to-existing-route__item-row"},[e("span",{staticClass:"add-to-existing-route__label"},[t._v("Status:")]),t._v(" "+t._s(o.status)+" ")]),e("div",{staticClass:"add-to-existing-route__item-row"},[e("span",{staticClass:"add-to-existing-route__label"},[t._v("Stops:")]),t._v(" "+t._s(o.stops_count)+" ")]),e("div",{staticClass:"add-to-existing-route__item-row"},[e("span",{staticClass:"add-to-existing-route__label"},[t._v("Distance to new point:")]),t._v(" "+t._s(o.distance)+" mi ")])])})):e("div",{staticClass:"add-to-existing-route__state"},[t._v(" No routes found nearby ")])],2),e("div",{staticClass:"add-to-existing-route__map"},[e("div",{ref:"mapElement",staticClass:"add-to-existing-route__map-element"})])]),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("button",{staticClass:"btn btn-primary",attrs:{type:"button",disabled:!t.selectedRoute||t.saving},on:{click:t.confirm}},[t._v(" Confirm Add to Route ")]),e("button",{staticClass:"btn btn-secondary",attrs:{type:"button"},on:{click:function(e){return t.$emit("close")}}},[t._v(" Back ")]),e("button",{staticClass:"btn btn-secondary",attrs:{type:"button"},on:{click:t.cancel}},[t._v(" Cancel ")])])])},i=[],a=(o(54016),o(79451),o(47824),o(40180),o(7493),o(72028),o(40758),o(71487),o(88948),o(76038),o(30961)),n=o(38845),r=o(10781),d=o.n(r);const l=(0,a.defineComponent)({props:{name:{type:String,default:""},options:{type:Object,default:function(){return{}}}},emits:["close"],data:function(){return{loading:!0,saving:!1,error:"",routes:[],point:null,selectedRoute:null,map:null,routeLayer:null}},mounted:function(){this.loadRoutes()},beforeUnmount:function(){this.map&&(this.map.remove(),this.map=null)},methods:{loadRoutes:function(){var t=this;this.loading=!0,this.error="",n.A.post("/ajax/PullRoutes.php?action=getRoutesNearOrder",{data:{orderId:this.options.order_id}}).then((function(e){var o=e.data;t.routes=Object.values(o.items||{}),t.point=o.point||null,t.routes.length&&t.selectRoute(t.routes[0])}))["catch"]((function(e){var o;t.error=(null===e||void 0===e||null===(o=e.response)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.error)||"Failed to load routes"}))["finally"]((function(){t.loading=!1,t.$nextTick((function(){return t.initMap()}))}))},initMap:function(){if(!this.map&&this.$refs.mapElement){this.map=d().map(this.$refs.mapElement).setView(this.point?[this.point.lat,this.point.lng]:[40.7128,-74.006],12);var t="https://www.google.com/maps/vt?lyrs=m@221097413,traffic&hl=en&gl=com&x={x}&y={y}&z={z}";d().tileLayer(t,{attribution:"",maxZoom:18,tileSize:512,zoomOffset:-1,detectRetina:!0}).addTo(this.map),this.point&&d().marker([this.point.lat,this.point.lng],{icon:new(d().Icon)({iconUrl:"/assets/leaflet/images/marker-icon.png",iconSize:[35,35],iconAnchor:[17,35]})}).addTo(this.map).bindTooltip("New stop"),this.redrawRoute()}},selectRoute:function(t){this.selectedRoute=t,this.redrawRoute()},redrawRoute:function(){var t,e=this;if(this.map){this.routeLayer&&(this.map.removeLayer(this.routeLayer),this.routeLayer=null);var o=(null===(t=this.selectedRoute)||void 0===t?void 0:t.stops)||[];
1if(o.length){this.routeLayer=d().layerGroup();var s=o.map((function(t){return[t.lat,t.lng]}));d().polyline(s,{color:"#4AA3EF",weight:3}).addTo(this.routeLayer),o.forEach((function(t){d().circleMarker([t.lat,t.lng],{radius:7,color:t.is_hub?"#FF6B6B":"#4AA3EF",fillColor:t.is_hub?"#FF6B6B":"#ffffff",fillOpacity:1,weight:2}).addTo(e.routeLayer).bindTooltip(t.is_hub?"Hub":"Stop ".concat(t.stop).concat(t.address?": ".concat(t.address):""))})),this.routeLayer.addTo(this.map);var i=d().latLngBounds(s);this.point&&i.extend([this.point.lat,this.point.lng]),this.map.fitBounds(i,{padding:[40,40]})}else this.point&&this.map.setView([this.point.lat,this.point.lng],13)}},confirm:function(){var t=this;this.selectedRoute&&!this.saving&&(this.saving=!0,n.A.post("/ajax/PullRoutes.php?action=addOrderToRoute",{data:{orderId:this.options.order_id,routeId:this.selectedRoute.uid}}).then((function(e){var o=e.data;"success"===o.status?(t.$toast('Order has been successfully added to route "'.concat(o.route_name,'" [#').concat(o.route_id,"]"),{type:"success"}),t.$emit("close"),"function"===typeof t.options.callback&&t.options.callback()):t.$toast(o.error||o.message||"Failed to add order to route",{type:"error"})}))["catch"]((function(e){var o;t.$toast((null===e||void 0===e||null===(o=e.response)||void 0===o||null===(o=o.data)||void 0===o?void 0:o.error)||"Failed to add order to route",{type:"error"})}))["finally"]((function(){t.saving=!1})))},cancel:function(){this.$emit("close"),this.$mitt.emit("close-modal","order-details-".concat(this.options.order_id)),this.$route.hash&&this.$router.push(this.$route.path)}}}),u=l;var c=o(81656),_=(0,c.A)(u,s,i,!1,null,"04acdcc9",null);const p=_.exports}}]);
2//# sourceMappingURL=571.5639125d.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.