diff --git a/ajax/backend/tracking/getList.php b/ajax/backend/tracking/getList.php new file mode 100644 index 0000000000000000000000000000000000000000..ba437e9cc180b8e1ba9a812df456a5b75be961b9 --- /dev/null +++ b/ajax/backend/tracking/getList.php @@ -0,0 +1,16 @@ +<?php + +/** + * This file contains package_quiqqer_shipping_ajax_backend_tracking_getList + */ + +use QUI\ERP\Shipping\Tracking; + +QUI::$Ajax->registerFunction( + 'package_quiqqer_shipping_ajax_backend_tracking_getList', + function () { + return Tracking\Tracking::getActiveCarriers(); + }, + false, + 'Permission::checkAdminUser' +); diff --git a/bin/backend/controls/TrackingInput.css b/bin/backend/controls/TrackingInput.css new file mode 100644 index 0000000000000000000000000000000000000000..fcf6d1b3f6d6bb7233d4d5a698498f55ca94db29 --- /dev/null +++ b/bin/backend/controls/TrackingInput.css @@ -0,0 +1,17 @@ +.quiqqer-shipping-trackingInput { + +} + +.quiqqer-shipping-trackingInput-input { + border: none; + width: calc(100% - 100px); +} + +.quiqqer-shipping-trackingInput-input:hover { + border: none; +} + +.quiqqer-shipping-trackingInput-contextMenu .qui-contextitem-icon, +.quiqqer-shipping-trackingInput .qui-select .icon { + background-size: 80% auto !important; +} diff --git a/bin/backend/controls/TrackingInput.js b/bin/backend/controls/TrackingInput.js new file mode 100644 index 0000000000000000000000000000000000000000..3381153a72f73680401d40e8d55e435df5c01320 --- /dev/null +++ b/bin/backend/controls/TrackingInput.js @@ -0,0 +1,103 @@ +/** + * @module package/quiqqer/shipping/bin/backend/controls/TrackingInput + * @author www.pcsg.de (Henning Leutz) + */ +define('package/quiqqer/shipping/bin/backend/controls/TrackingInput', [ + + 'qui/QUI', + 'qui/controls/Control', + 'qui/controls/buttons/Select', + 'Ajax', + + 'css!package/quiqqer/shipping/bin/backend/controls/TrackingInput.css' + +], function (QUI, QUIControl, QUISelect, QUIAjax) { + "use strict"; + + return new Class({ + + Extends: QUIControl, + Type : 'package/quiqqer/shipping/bin/backend/controls/TrackingInput', + + Binds: [ + '$onImport', + '$onChange' + ], + + initialize: function (options) { + this.parent(options); + + this.addEvents({ + onImport: this.$onImport + }); + }, + + $onImport: function () { + this.$Value = this.$Elm; + this.$Value.setStyle('display', 'none'); + + this.$Elm = new Element('div').wraps(this.$Value); + this.$Elm.addClass('quiqqer-shipping-trackingInput'); + this.$Elm.addClass('field-container-field'); + this.$Elm.addClass('field-container-field-no-padding'); + + this.$TrackingType = new QUISelect({ + events: { + onChange: this.$onChange + }, + styles: { + width: 100 + } + }).inject(this.$Elm); + + this.$TrackingType.$Menu.getElm().addClass('quiqqer-shipping-trackingInput-contextMenu'); + + this.$Input = new Element('input').inject(this.$Elm); + this.$Input.addClass('quiqqer-shipping-trackingInput-input'); + this.$Input.addEvent('change', this.$onChange); + this.$Input.addEvent('blur', this.$onChange); + + this.getTrackingList().then((list) => { + for (let i = 0, len = list.length; i < len; i++) { + this.$TrackingType.appendChild( + list[i].title, + list[i].type, + URL_OPT_DIR + list[i].image + ); + } + }); + }, + + /** + * Return the tracking information + * + * @returns {Promise} + */ + getTrackingList: function () { + return new Promise((resolve) => { + QUIAjax.get('package_quiqqer_shipping_ajax_backend_tracking_getList', resolve, { + 'package': 'quiqqer/shipping' + }); + }); + }, + + $onChange: function () { + const tracking = this.$TrackingType.getValue(); + const trackingNumber = this.$Input.value; + + this.$Value.set('value', JSON.encode({ + type : tracking, + number: trackingNumber + })); + }, + + setValue: function (value) { + if (typeof value === 'string') { + value = JSON.decode(value); + } + + this.$TrackingType.setValue(value.type); + this.$Input.value = value.number; + } + }); +}); diff --git a/bin/images/tracking/dhl.svg b/bin/images/tracking/dhl.svg new file mode 100644 index 0000000000000000000000000000000000000000..3a9af0bd45e2d14105053ff865981044a792260a --- /dev/null +++ b/bin/images/tracking/dhl.svg @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + version="1.0" + id="Ebene_1" + width="175.748" + height="38.785999" + viewBox="0 0 175.748 38.786" + overflow="visible" + enable-background="new 0 0 175.748 38.786" + xml:space="preserve" + sodipodi:docname="DHL_Logo.svg" + inkscape:version="1.0.2 (e86c870879, 2021-01-15, custom)"><metadata + id="metadata11"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs + id="defs9" /><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1680" + inkscape:window-height="988" + id="namedview7" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:zoom="2" + inkscape:cx="117.60352" + inkscape:cy="-18.612463" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="Ebene_1" /> +<polygon + fill="#fecc00" + points="0,38.786 0,0 175.748,0 175.748,38.786 " + id="polygon2" /> +<path + fill="#d50029" + d="m 56.665,16.206 c -0.768,1.04 -2.053,2.848 -2.835,3.904 -0.397,0.537 -1.114,1.512 1.263,1.512 2.515,0 12.515,0 12.515,0 0,0 2.017,-2.744 3.708,-5.039 2.3,-3.122 0.199,-9.618 -8.024,-9.618 -7.36,0 -32.384,0 -32.384,0 l -5.615,7.629 c 0,0 29.109,0 30.603,0 1.545,0 1.524,0.588 0.769,1.612 z m -9.194,7.298 c -2.377,0 -1.66,-0.977 -1.263,-1.514 0.782,-1.056 2.088,-2.845 2.856,-3.885 0.756,-1.024 0.776,-1.612 -0.771,-1.612 -1.493,0 -13.996,0 -13.996,0 L 23.02,31.819 c 0,0 20.141,0 27.501,0 9.083,0 14.14,-6.178 15.699,-8.314 0,-10e-4 -16.235,-10e-4 -18.749,-10e-4 z m 17.89,8.315 h 16.133 l 6.116,-8.316 -16.131,0.002 c -0.005,-10e-4 -6.118,8.314 -6.118,8.314 z m 41.625,-24.854 -6.188,8.405 h -7.2 L 99.783,6.965 H 83.655 l -10.79,14.657 h 39.46 L 123.112,6.965 Z M 88.694,31.819 h 16.127 l 6.119,-8.314 H 94.813 c -0.006,-10e-4 -6.119,8.314 -6.119,8.314 z M 0,26.784 v 1.766 h 22.468 l 1.298,-1.766 z m 26.181,-3.28 H 0 v 1.764 H 24.88 Z M 0,31.819 h 20.061 l 1.292,-1.756 H 0 Z m 152.072,-3.27 h 23.676 v -1.766 h -22.376 z m -2.405,3.27 h 26.081 v -1.756 h -24.79 z m 6.116,-8.315 -1.297,1.766 h 21.262 V 23.504 Z M 134.659,21.622 145.448,6.965 h -17.081 c -0.006,0 -10.797,14.657 -10.797,14.657 z m -18.472,1.882 c 0,0 -1.179,1.611 -1.752,2.387 -2.025,2.736 -0.234,5.928 6.376,5.928 7.636,0 25.901,0 25.901,0 l 6.119,-8.314 h -36.644 z" + id="path4" /> +</svg> diff --git a/bin/images/tracking/dpd.svg b/bin/images/tracking/dpd.svg new file mode 100644 index 0000000000000000000000000000000000000000..a231ecdaf4b0c2f22f9ec1cb056ec31a3d4dd2ca --- /dev/null +++ b/bin/images/tracking/dpd.svg @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="DPD_Black" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="448.931px" height="206px" viewBox="79.5 293.5 448.931 206" enable-background="new 79.5 293.5 448.931 206" + xml:space="preserve"> +<g> + <path fill="#414042" d="M372.345,441.876c-8.398,2.223-19.338,3.323-28.849,3.323c-24.413,0-40.579-12.992-40.579-36.771 + c0-22.505,15.057-37.083,37.094-37.083c4.912,0,10.14,0.625,13.313,2.216v-32.668h19.021V441.876z M353.324,390.36 + c-3.013-1.426-6.974-2.219-11.737-2.219c-11.563,0-19.333,7.136-19.333,19.656c0,13.476,8.399,21.087,21.874,21.087 + c2.379,0,6.023-0.163,9.196-0.793V390.36z M528.431,441.876c-8.406,2.223-19.343,3.323-28.854,3.323 + c-24.409,0-40.584-12.992-40.584-36.771c0-22.505,15.064-37.083,37.101-37.083c4.913,0,10.144,0.625,13.315,2.216v-32.668h19.021 + V441.876z M509.409,390.36c-3.016-1.426-6.979-2.219-11.733-2.219c-11.57,0-19.336,7.136-19.336,19.656 + c0,13.476,8.399,21.087,21.874,21.087c2.375,0,6.023-0.163,9.195-0.793V390.36z M402.258,390.204 + c3.168-1.271,7.6-1.742,11.404-1.742c11.733,0,19.818,6.814,19.818,19.015c0,14.393-8.955,20.902-20.929,21.07v16.642 + c0.314,0,0.634,0.011,0.957,0.011c24.565,0,39.312-13.785,39.312-38.354c0-22.35-15.691-35.501-38.836-35.501 + c-11.727,0-23.304,2.695-30.91,5.862v94.953h19.184V390.204z"/> + + <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="366.751" y1="-291.9131" x2="736.271" y2="18.1508" gradientTransform="matrix(0.229 0 0 -0.229 0.3856 397.0497)"> + <stop offset="0" style="stop-color:#A90034"/> + <stop offset="0.2717" style="stop-color:#BB0033"/> + <stop offset="0.7226" style="stop-color:#D30032"/> + <stop offset="1" style="stop-color:#DC0032"/> + </linearGradient> + <path fill="url(#SVGID_1_)" d="M199.681,385.541c-0.787,0.459-2.021,0.423-2.789-0.052l-4.522-2.688 + c-0.368-0.228-0.706-0.593-0.961-1.032c-0.015-0.025-0.03-0.051-0.045-0.077c-0.289-0.471-0.453-0.968-0.47-1.424l-0.115-5.272 + c-0.034-0.888,0.552-1.971,1.342-2.432l54.362-31.67l-76.285-41.577c-0.84-0.466-1.948-0.691-3.057-0.693 + c-1.11-0.002-2.22,0.229-3.061,0.693l-76.286,41.578l85.46,49.75c0.792,0.433,1.394,1.461,1.394,2.389v72.576 + c0,0.911-0.652,1.958-1.45,2.384l-4.599,2.554c-0.382,0.203-0.868,0.312-1.376,0.312c-0.029,0-0.059,0-0.088,0 + c-0.552,0.013-1.065-0.096-1.467-0.312l-4.614-2.555c-0.784-0.417-1.425-1.469-1.425-2.383l0.001-64.698 + c-0.041-0.474-0.388-1.052-0.768-1.27l-75.292-43.829v85.848c-0.001,1.921,1.354,4.291,3.014,5.262l77.543,45.732 + c0.829,0.486,1.921,0.728,3.012,0.724c1.092-0.003,2.184-0.231,3.011-0.723l77.555-45.733c1.654-0.981,3.005-3.338,3.003-5.262 + v-85.847L199.681,385.541z"/> +</g> +</svg> diff --git a/bin/images/tracking/fedex.svg b/bin/images/tracking/fedex.svg new file mode 100644 index 0000000000000000000000000000000000000000..4d488a33788ef9bb8eb434cfe3e3342505bb481d --- /dev/null +++ b/bin/images/tracking/fedex.svg @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Generator: Adobe Illustrator 11 Build 196, SVG Export Plug-In --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="74.535995" + height="33.924999" + viewBox="-0.81 -0.354 74.535996 33.924999" + xml:space="preserve" + id="svg2" + version="1.1" + inkscape:version="0.48.1 " + sodipodi:docname="AJAX.svg"><metadata + id="metadata32"><rdf:RDF><cc:Work + rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1280" + inkscape:window-height="1004" + id="namedview30" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0.2" + fit-margin-bottom="0" + inkscape:zoom="10.026645" + inkscape:cx="50.329457" + inkscape:cy="13.826428" + inkscape:window-x="-8" + inkscape:window-y="-8" + inkscape:window-maximized="1" + inkscape:current-layer="g6" /> + <defs + id="defs4"> + </defs> + <g + id="g6" + transform="translate(-0.81,-0.35400034)"> + + <polygon + points="59.95,7.772 62.928,11.054 65.795,7.772 71.917,7.772 65.934,14.5 71.999,21.283 65.63,21.283 62.68,17.975 59.757,21.283 53.607,21.283 59.619,14.528 53.607,7.772 " + id="polygon10" + style="fill:#ff5900" /> + <polygon + points="53.607,7.772 53.607,12.337 46.798,12.337 46.798,16.526 53.607,16.526 53.607,21.283 41.794,21.283 41.794,0 53.607,0 53.607,4.744 46.798,4.744 46.798,7.772 " + id="polygon12" + style="fill:#ff5900" /> + <path + d="M 36.811,0 V 8.71 H 36.756 C 35.652,7.442 34.274,7.001 32.675,7.001 c -3.276,0 -5.744,2.228 -6.61,5.172 C 25.076,8.929 22.528,6.94 18.75,6.94 c -3.068,0 -5.491,1.377 -6.755,3.621 V 7.772 H 5.653 V 4.744 h 6.921 V 0 H 0 v 21.283 h 5.653 v -8.946 h 5.635 c -0.168,0.657 -0.258,1.361 -0.258,2.104 0,4.439 3.392,7.555 7.72,7.555 3.64,0 6.039,-1.709 7.307,-4.824 h -4.845 c -0.655,0.937 -1.152,1.214 -2.462,1.214 -1.519,0 -2.829,-1.325 -2.829,-2.896 h 9.865 c 0.428,3.526 3.175,6.567 6.944,6.567 1.626,0 3.115,-0.8 4.025,-2.15 h 0.055 v 1.378 h 4.983 V 0 H 36.811 z M 16.079,12.4 c 0.314,-1.352 1.363,-2.235 2.672,-2.235 1.441,0 2.436,0.856 2.698,2.235 0.11,0 -5.37,0 -5.37,0 z m 17.707,5.643 c -1.837,0 -2.979,-1.712 -2.979,-3.499 0,-1.91 0.993,-3.747 2.979,-3.747 2.059,0 2.879,1.837 2.879,3.747 0,1.811 -0.869,3.499 -2.879,3.499 z" + id="path14" + inkscape:connector-curvature="0" + style="fill:#2a007c" /> + <path + d="m 41.795,31.925 v -7.627 h 4.214 v 0.569 H 42.49 v 2.812 h 3.37 v 0.569 h -3.37 v 3.106 h 3.676 v 0.57 h -4.371 z" + id="path16" + inkscape:connector-curvature="0" + style="fill:#2a007c" /> + <path + d="m 46.669,31.925 2.055,-2.739 -1.949,-2.591 h 0.79 l 1.591,2.117 1.559,-2.117 h 0.79 l -1.98,2.591 2.064,2.739 h -0.8 l -1.707,-2.266 -1.622,2.266 h -0.791 z" + id="path18" + inkscape:connector-curvature="0" + style="fill:#2a007c" /> + <path + d="m 52.926,33.925 h -0.643 v -5.739 c 0,-0.527 0,-1.063 -0.032,-1.591 h 0.633 l 0.021,0.801 c 0.399,-0.633 0.926,-0.927 1.717,-0.927 1.643,0 2.348,1.358 2.348,2.79 0,1.434 -0.705,2.792 -2.348,2.792 -0.738,0 -1.317,-0.284 -1.696,-0.896 v 2.77 z m 3.36,-4.666 c 0,-1.137 -0.475,-2.254 -1.738,-2.254 -1.19,0 -1.622,0.98 -1.622,2.254 0,1.275 0.432,2.254 1.622,2.254 1.264,0 1.738,-1.116 1.738,-2.254 z" + id="path20" + inkscape:connector-curvature="0" + style="fill:#2a007c" /> + <path + d="m 60.274,27.089 c -1.064,0 -1.434,0.896 -1.434,1.822 v 3.014 h -0.643 v -3.762 c 0,-0.516 -0.01,-1.041 -0.031,-1.568 H 58.8 l 0.041,0.769 c 0.316,-0.61 0.844,-0.895 1.549,-0.895 0.095,0 0.2,0.01 0.295,0.021 v 0.643 C 60.537,27.11 60.421,27.089 60.274,27.089 z" + id="path22" + inkscape:connector-curvature="0" + style="fill:#2a007c" /> + <path + d="m 61.472,29.375 c 0,1.2 0.568,2.19 1.737,2.19 0.905,0 1.327,-0.6 1.485,-1.2 h 0.611 c -0.285,1.116 -0.97,1.686 -2.181,1.686 -1.622,0 -2.339,-1.201 -2.339,-2.696 0,-1.527 0.748,-2.886 2.423,-2.886 1.696,0 2.149,1.484 2.149,2.906 h -3.885 z m 0.02,-0.484 h 3.181 c 0,-1.043 -0.494,-1.938 -1.506,-1.938 -0.916,-10e-4 -1.549,0.694 -1.675,1.938 z" + id="path24" + inkscape:connector-curvature="0" + style="fill:#2a007c" /> + <path + d="m 67.866,32.051 c -1.095,0 -1.916,-0.517 -1.916,-1.686 h 0.643 c 0,0.8 0.526,1.2 1.306,1.2 0.727,0 1.295,-0.348 1.295,-1.062 0,-0.643 -0.663,-0.812 -1.358,-1.012 -0.842,-0.242 -1.759,-0.506 -1.759,-1.538 0,-1.147 0.958,-1.484 1.854,-1.484 1.031,0 1.801,0.399 1.832,1.505 H 69.12 c -0.031,-0.631 -0.484,-0.989 -1.169,-0.989 -0.537,0 -1.19,0.21 -1.19,0.905 0,0.633 0.653,0.812 1.348,1.001 0.844,0.231 1.77,0.484 1.77,1.517 -0.001,1.2 -0.927,1.643 -2.013,1.643 z" + id="path26" + inkscape:connector-curvature="0" + style="fill:#2a007c" /> + <path + d="m 72.322,32.051 c -1.096,0 -1.917,-0.517 -1.917,-1.686 h 0.643 c 0,0.8 0.526,1.2 1.307,1.2 0.727,0 1.295,-0.348 1.295,-1.062 0,-0.643 -0.664,-0.812 -1.359,-1.012 -0.842,-0.242 -1.758,-0.506 -1.758,-1.538 0,-1.147 0.958,-1.484 1.854,-1.484 1.031,0 1.801,0.399 1.832,1.505 h -0.643 c -0.031,-0.631 -0.484,-0.989 -1.169,-0.989 -0.537,0 -1.19,0.21 -1.19,0.905 0,0.633 0.653,0.812 1.349,1.001 0.843,0.231 1.77,0.484 1.77,1.517 -0.002,1.2 -0.929,1.643 -2.014,1.643 z" + id="path28" + inkscape:connector-curvature="0" + style="fill:#2a007c" /> + </g> +</svg> \ No newline at end of file diff --git a/bin/images/tracking/lasership.png b/bin/images/tracking/lasership.png new file mode 100644 index 0000000000000000000000000000000000000000..af3a1f5e45ab844b071bf93cc9e43bf81f094df5 Binary files /dev/null and b/bin/images/tracking/lasership.png differ diff --git a/bin/images/tracking/ontrac.svg b/bin/images/tracking/ontrac.svg new file mode 100644 index 0000000000000000000000000000000000000000..c5f6e912725b4c011bac4fb163be51bbc3238be9 --- /dev/null +++ b/bin/images/tracking/ontrac.svg @@ -0,0 +1,146 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="142.47523" + height="92.536247" + viewBox="0 0 37.696571 24.483549" + version="1.1" + id="svg22441" + inkscape:version="0.92.0 r15299" + sodipodi:docname="ontrac.svg"> + <defs + id="defs22435" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="4.9998627" + inkscape:cx="70.737612" + inkscape:cy="38.234782" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + units="px" + inkscape:window-width="1280" + inkscape:window-height="744" + inkscape:window-x="-4" + inkscape:window-y="-4" + inkscape:window-maximized="1" /> + <metadata + id="metadata22438"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-115.58054,-241.55678)"> + <g + id="g22670" + transform="translate(0.13229129,-0.13228478)"> + <path + inkscape:connector-curvature="0" + id="path20140" + style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 149.54662,263.00403 c 0,1.04704 -0.37006,1.48378 -1.04493,1.48378 -0.67486,0 -1.04634,-0.43674 -1.04634,-1.48378 v -3.34116 c 0,-1.04493 0.37148,-1.48449 1.04634,-1.48449 0.67487,0 1.04493,0.43956 1.04493,1.48449 v 0.23742 h 1.88912 c -0.0325,-1.94133 -0.80997,-3.27307 -2.93405,-3.27307 -2.15935,0 -2.93546,1.38324 -2.93546,3.37397 v 2.66629 c 0,1.99037 0.77611,3.37256 2.93546,3.37256 2.15971,0 2.93405,-1.38219 2.93405,-3.37256 v -0.23742 h -1.88912 z" /> + <path + inkscape:connector-curvature="0" + id="path20144" + style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 144.77276,259.08954 c 0,-1.65241 -0.99483,-2.46239 -2.74955,-2.46239 -1.77094,0 -2.93476,0.99483 -3.03706,2.83386 h 1.89124 c 0.0321,-0.77646 0.21731,-1.28269 1.07879,-1.28269 0.62407,0 0.9271,0.40534 0.9271,1.16416 v 0.53975 c -2.71568,1.02941 -4.03154,2.12549 -4.03154,4.11762 0,1.16382 0.64135,2.04047 1.92299,2.04047 0.91122,0 1.50177,-0.30339 2.2098,-0.87665 0.0176,0.21837 0.0854,0.45543 0.10125,0.70838 h 1.80587 c -0.0505,-0.3041 -0.11889,-0.67487 -0.11889,-0.96168 z m -1.88948,4.55471 c -0.32032,0.45579 -0.74295,0.8435 -1.264,0.8435 -0.57503,0 -0.87771,-0.23531 -0.87771,-0.82515 0,-0.79269 0.42263,-1.41782 2.14171,-2.39572 z" /> + <path + inkscape:connector-curvature="0" + id="path20148" + style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 137.73876,258.41475 c 0.55668,0 0.87771,0.10125 1.21497,0.18521 v -1.97309 h -0.38912 c -0.89394,0 -1.68663,0.45544 -2.14171,1.2319 h -0.0339 v -1.06221 h -1.80481 v 9.07556 h 1.88877 v -6.24276 c 0,-0.80856 0.62442,-1.21461 1.26577,-1.21461" /> + <path + inkscape:connector-curvature="0" + id="path20152" + style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 130.97139,265.8719 h 2.09232 v -10.35932 h 2.0246 v -1.82139 h -6.14081 v 1.82139 h 2.02389 z" /> + <path + inkscape:connector-curvature="0" + id="path20156" + style="fill:#fbcb07;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 127.25992,256.62704 c -1.09679,0 -1.50142,0.40464 -2.29411,1.07879 v -0.90981 h -1.78823 v 9.07627 h 1.89018 v -7.12047 c 0.43815,-0.31962 0.80927,-0.57326 1.21461,-0.57326 0.40429,0 0.67346,0.20249 0.67346,0.65793 v 7.0358 h 1.88983 v -7.33919 c 0,-1.1811 -0.58985,-1.90606 -1.58574,-1.90606" /> + <path + inkscape:connector-curvature="0" + id="path20160" + style="fill:#fbcb07;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 119.06129,253.52263 c -2.19322,0 -3.20604,1.40053 -3.20604,3.12067 v 6.27592 c 0,1.7212 1.01282,3.12102 3.20604,3.12102 2.19287,0 3.20534,-1.39982 3.20534,-3.12102 v -6.27592 c 0,-1.72014 -1.01247,-3.12067 -3.20534,-3.12067 m 1.11372,9.34685 c 0,0.91052 -0.27058,1.34902 -1.11372,1.34902 -0.84349,0 -1.11372,-0.4385 -1.11372,-1.34902 v -6.17503 c 0,-0.91087 0.27023,-1.35043 1.11372,-1.35043 0.84314,0 1.11372,0.43956 1.11372,1.35043 z" /> + <path + inkscape:connector-curvature="0" + id="path20164" + style="fill:#fbcb07;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 115.58054,252.34907 c 1.54023,-1.13383 6.64492,-5.05495 14.19542,-1.89583 0,0 -3.5e-4,-3.31293 0,-3.83399 -8.14211,-1.39559 -12.43612,2.4818 -14.19542,5.72982" /> + <path + inkscape:connector-curvature="0" + id="path20168" + style="fill:#fbcb07;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 120.91634,245.73713 c -0.74824,0.51047 -1.58115,1.25518 -2.02071,1.82915 5.30119,-3.31752 11.34039,-1.71238 11.38908,-1.69792 0.0589,-0.0183 11.38237,-3.52354 11.38237,-3.52354 0,0 -12.12991,-2.49026 -20.75074,3.39231" /> + <path + inkscape:connector-curvature="0" + id="path20172" + style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 142.97917,243.37224 -11.84945,3.65478 v 3.48932 l 9.63436,4.1522 11.79406,-4.3748 v -3.70911 z" /> + <path + inkscape:connector-curvature="0" + id="path20176" + style="fill:#fbcb07;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 153.01228,246.41436 c 0,-7.1e-4 0.008,-0.29175 -0.31432,-0.43427 -0.0162,-0.007 -9.67599,-3.16124 -9.67599,-3.16124 -0.0907,-0.0293 -0.19227,-0.0307 -0.28258,-0.002 l -11.87344,3.67276 c -0.29739,0.11854 -0.32703,0.37395 -0.32985,0.42757 v 3.71405 c 0,0.18803 0.11254,0.35806 0.28716,0.43038 l 9.80405,4.12327 v -3.5e-4 c 0.17427,0.0818 0.35807,0.031 0.40499,0.0141 l 11.678,-4.43018 c 0.18239,-0.0702 0.30198,-0.24413 0.30198,-0.43815 z m -21.54096,1.21179 8.87518,3.54365 v 2.86597 l -8.87518,-3.71651 z m 9.3479,2.72521 -8.41269,-3.3588 10.46621,-3.23779 8.26347,2.6991 z m 11.25714,-0.34361 -10.79324,4.09434 v -2.92594 l 10.79324,-4.07811 z" /> + <path + inkscape:connector-curvature="0" + id="path20180" + style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 134.73465,247.23402 2.1657,-0.72531 c 0.0907,-0.0311 0.13229,-0.11959 0.0938,-0.19791 -0.0381,-0.0773 -0.14287,-0.11712 -0.23318,-0.0871 l -2.16641,0.72743 c -0.0903,0.0303 -0.13265,0.11854 -0.0942,0.19685 0.0392,0.0776 0.14322,0.11642 0.23424,0.0861" /> + <path + inkscape:connector-curvature="0" + id="path20184" + style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 135.25559,247.43976 c 0.0395,0.0776 0.14217,0.11747 0.23248,0.0868 l 2.16606,-0.72742 c 0.0903,-0.0293 0.13299,-0.11783 0.0942,-0.19615 -0.0385,-0.0787 -0.14323,-0.11712 -0.23354,-0.0871 l -2.16676,0.72813 c -0.09,0.0296 -0.13194,0.11818 -0.0924,0.19579" /> + <path + inkscape:connector-curvature="0" + id="path20188" + style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 139.79775,247.21459 2.95734,-1.07139 c 0.12135,-0.0437 0.17709,-0.16474 0.127,-0.26952 -0.0536,-0.10689 -0.19333,-0.15663 -0.31503,-0.11253 l -2.96334,1.06609 c -0.12559,0.0452 -0.18415,0.16792 -0.12947,0.27517 0.0533,0.10724 0.19826,0.15698 0.3235,0.11218" /> + <path + inkscape:connector-curvature="0" + id="path20192" + style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 140.39352,247.49399 c 0.0533,0.10442 0.19473,0.15522 0.31997,0.10936 l 2.93264,-1.06997 c 0.121,-0.0444 0.17745,-0.16581 0.12524,-0.27129 -0.0504,-0.10372 -0.19086,-0.15346 -0.31186,-0.11007 l -2.93899,1.06786 c -0.12453,0.0441 -0.18133,0.16757 -0.127,0.27411" /> + <path + inkscape:connector-curvature="0" + id="path20196" + style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 141.42561,247.86454 c 0.0533,0.10548 0.19614,0.15416 0.31891,0.10901 l 2.90583,-1.07103 c 0.11853,-0.0434 0.17463,-0.1644 0.12277,-0.26847 -0.0512,-0.10407 -0.18944,-0.15381 -0.30833,-0.11042 l -2.91112,1.06857 c -0.12242,0.0441 -0.18133,0.16686 -0.12806,0.27234" /> + <path + inkscape:connector-curvature="0" + id="path20200" + style="fill:#1d2953;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.35277778" + d="m 152.83014,255.71836 c 0.11853,0.11853 0.18239,0.27622 0.18239,0.44626 0,0.17357 -0.0639,0.32597 -0.18239,0.44274 -0.12382,0.12206 -0.28328,0.18944 -0.44979,0.18944 -0.16828,0 -0.32385,-0.0674 -0.4445,-0.18768 -0.1203,-0.12065 -0.18592,-0.27622 -0.18592,-0.4445 0,-0.16651 0.0656,-0.32596 0.18768,-0.44979 0.11677,-0.11853 0.27094,-0.18238 0.44274,-0.18238 0.1718,0 0.32949,0.0656 0.44979,0.18591 m -0.0441,0.0441 c -0.11006,-0.10972 -0.25153,-0.16828 -0.40569,-0.16828 -0.15381,0 -0.29387,0.0586 -0.39829,0.1651 -0.11006,0.11148 -0.17004,0.25471 -0.17004,0.40534 0,0.15064 0.06,0.2921 0.16793,0.40041 0.1083,0.10795 0.24976,0.16792 0.4004,0.16792 0.14887,0 0.29386,-0.06 0.40569,-0.17004 0.10619,-0.10442 0.16475,-0.24236 0.16475,-0.39829 0,-0.15416 -0.0586,-0.29562 -0.16475,-0.40216 m -0.085,0.2286 c 0,0.10089 -0.0674,0.17709 -0.17533,0.18944 l 0.16475,0.34008 h -0.11359 l -0.1577,-0.32597 h -0.18379 v 0.32597 h -0.0995 v -0.73131 h 0.26388 c 0.20214,0 0.30127,0.0603 0.30127,0.20179 m -0.46566,-0.13441 v 0.27093 h 0.14499 c 0.15416,0 0.21978,-0.0286 0.21978,-0.14005 0,-0.0921 -0.0727,-0.13088 -0.21978,-0.13088 z" /> + </g> + </g> +</svg> diff --git a/bin/images/tracking/ups.svg b/bin/images/tracking/ups.svg new file mode 100644 index 0000000000000000000000000000000000000000..f131ea5e40b136b32d4cb17429729f0bc43ccac0 --- /dev/null +++ b/bin/images/tracking/ups.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="73.478" height="87.129" viewBox="0 0 73.478 87.129"><defs><path id="a" d="M-14.272-13.996h102v115h-102z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><path clip-path="url(#b)" fill="#1E0000" d="M36.728-.122c-14.406 0-26.283 2.74-36.75 8.288v42.832c0 9.15 3.442 16.808 9.954 22.146 5.872 4.812 24.665 13.058 26.796 13.984 2.13-.927 20.924-9.172 26.796-13.984 6.512-5.34 9.954-12.997 9.954-22.146V8.168c-10.467-5.55-22.344-8.29-36.75-8.29"/><defs><path id="c" d="M.728 8.618v42.38c0 8.916 3.347 16.375 9.68 21.565 5.793 4.75 24.205 12.83 26.32 13.748 2.114-.918 20.527-8.998 26.32-13.747 6.333-5.19 9.68-12.65 9.68-21.565V8.618c-10-5.303-22.113-7.99-36-7.99S10.73 3.316.728 8.62"/></defs><clipPath id="d"><use xlink:href="#c" overflow="visible"/></clipPath><radialGradient id="e" cx="-14.272" cy="101.004" r="1" gradientTransform="matrix(0 119.608 59.804 0 -6028.71 1722.482)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#FFDC00"/><stop offset=".35" stop-color="#FFBE00"/><stop offset="1" stop-color="#C86E14"/></radialGradient><path clip-path="url(#d)" fill="url(#e)" d="M.728.63h72V86.31h-72z"/><defs><path id="f" d="M-14.272-13.996h102v115h-102z"/></defs><clipPath id="g"><use xlink:href="#f" overflow="visible"/></clipPath><path clip-path="url(#g)" fill="#C86E14" d="M59.708 81.447v3.677h.664V83.59h.095c.05.074 1 1.534 1 1.534h.803l-1.107-1.62c.486-.114.814-.467.814-.977 0-.522-.322-1.08-1.225-1.08h-1.044zm.967.537c.563 0 .638.276.638.516 0 .347-.148.577-.86.577h-.08v-1.093h.302zm2.597 1.312c0 1.368-1.114 2.484-2.493 2.484-1.373 0-2.49-1.116-2.49-2.484 0-1.372 1.117-2.495 2.49-2.495 1.378 0 2.492 1.124 2.492 2.496m-2.495-3.028c-1.665 0-3.02 1.363-3.02 3.028s1.355 3.02 3.02 3.02c1.675 0 3.026-1.355 3.026-3.02s-1.35-3.028-3.026-3.028"/><defs><path id="h" d="M35.49 33.65v19.244c.448.167 1.183.378 2.032.378 3.606 0 5.326-3.308 5.326-10.155 0-7.017-1.505-9.918-5.14-9.918-.85 0-1.71.2-2.218.45M19.757 52.396V28.79h6.252v27.17c-2.393 1.626-5.604 2.516-9.437 2.516-6.198 0-9.34-3.362-9.34-10V28.79h6.26v19.965c0 1.777.43 4.407 3.3 4.407 1.273 0 2.283-.297 2.964-.766m9.466-22.013c2.272-1.466 5.027-2.228 8.443-2.228 7.476 0 11.584 5.672 11.584 14.803 0 9.148-3.99 15.41-10.942 15.41-1.285 0-2.193-.17-2.818-.355V71.2h-6.267V30.384zm31.46 19.44c-.046-1.967-1.157-3.033-3.91-4.65-5.166-3.032-6.094-5.524-6.103-8.856-.027-5.06 4.282-8.042 8.403-8.162 3.44-.105 5.77 1.187 6.872 2.034v5.446c-1.305-1.34-3.422-2.554-5.61-2.574-1.774-.016-3.622.765-3.684 2.993-.06 2.278 1.783 3.18 4.12 4.548 5.232 3.076 6.244 5.84 6.124 9.494-.12 4.004-2.88 8.38-9.068 8.38-2.476 0-4.924-.774-6.885-1.945v-5.767c1.6 1.425 3.99 2.534 5.988 2.548h.025c2.284 0 3.784-1.313 3.73-3.49M4.037 26.76V51c0 7.896 2.92 14.49 8.468 19.01C17.402 74 32.477 80.82 36.728 82.7c4.196-1.85 19.233-8.586 24.217-12.69C66.53 65.41 69.42 58.97 69.42 51V9.51c-4.446-.414-9.064-.686-13.77-.686-17.447 0-36.15 3.75-51.614 17.934"/></defs><clipPath id="i"><use xlink:href="#h" overflow="visible"/></clipPath><radialGradient id="j" cx="-14.272" cy="101.004" r="1" gradientTransform="matrix(0 118.6833 59.3417 0 -5981.98 1709.35)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#4B3333"/><stop offset=".35" stop-color="#351A1A"/><stop offset=".85" stop-color="#1E0000"/><stop offset="1" stop-color="#1E0000"/></radialGradient><path clip-path="url(#i)" fill="url(#j)" d="M4.036 8.824H69.42V82.7H4.036z"/><defs><path id="k" d="M4.036 51c0 7.896 2.92 14.49 8.468 19.01C17.402 74 32.477 80.82 36.728 82.7v-.493c-3.53-1.562-18.982-8.505-23.94-12.546C7.357 65.236 4.485 58.783 4.485 51h-.45z"/></defs><clipPath id="l"><use xlink:href="#k" overflow="visible"/></clipPath><linearGradient id="m" gradientUnits="userSpaceOnUse" x1="-14.273" y1="100.922" x2="-13.273" y2="100.922" gradientTransform="scale(45.5362) rotate(-136 14.022 -52.6)"><stop offset="0" stop-color="#E49F15"/><stop offset=".024" stop-color="#E39C15"/><stop offset=".178" stop-color="#DC9116"/><stop offset=".396" stop-color="#D88A17"/><stop offset="1" stop-color="#D78817"/></linearGradient><path clip-path="url(#l)" fill="url(#m)" d="M20.953 99.035l-32.757-31.633 31.616-32.738 32.756 31.632"/><defs><path id="n" d="M68.97 51c0 7.84-2.796 14.12-8.312 18.662-4.796 3.95-19.294 10.5-23.93 12.545v.492c4.195-1.85 19.232-8.586 24.216-12.69C66.53 65.41 69.42 58.97 69.42 51h-.45z"/></defs><clipPath id="o"><use xlink:href="#n" overflow="visible"/></clipPath><linearGradient id="p" gradientUnits="userSpaceOnUse" x1="-14.272" y1="101.086" x2="-13.272" y2="101.086" gradientTransform="scale(45.5362) rotate(-44 120.612 -68.294)"><stop offset="0" stop-color="#FFC20E"/><stop offset="1" stop-color="#D89016"/></linearGradient><path clip-path="url(#o)" fill="url(#p)" d="M20.888 66.296l32.756-31.632L85.26 67.402 52.503 99.035"/><defs><path id="q" d="M4.036 26.758l.45.198C17.536 15.06 34.273 9.274 55.65 9.274c4.174 0 8.536.212 13.32.646l.45-.41c-4.446-.414-9.064-.686-13.77-.686-17.447 0-36.15 3.75-51.614 17.934"/></defs><clipPath id="r"><use xlink:href="#q" overflow="visible"/></clipPath><linearGradient id="s" gradientUnits="userSpaceOnUse" x1="-14.272" y1="100.969" x2="-13.272" y2="100.969" gradientTransform="scale(67.419) rotate(-19.2 292.655 -92.672)"><stop offset="0" stop-color="#E49F15"/><stop offset=".975" stop-color="#8F4A02"/><stop offset="1" stop-color="#8F4A02"/></linearGradient><path clip-path="url(#r)" fill="url(#s)" d="M-1.595 10.785l63.943-22.267L75.05 24.995 11.108 47.263"/><defs><path id="t" d="M42.398 43.117c0 5.535-1.09 9.706-4.876 9.706v.45c3.606 0 5.326-3.31 5.326-10.156h-.45z"/></defs><clipPath id="u"><use xlink:href="#t" overflow="visible"/></clipPath><linearGradient id="v" gradientUnits="userSpaceOnUse" x1="-14.271" y1="101.094" x2="-13.271" y2="101.094" gradientTransform="scale(11.4647) rotate(-63.3 80.28 -62.46)"><stop offset="0" stop-color="#FFC20E"/><stop offset=".05" stop-color="#FFC20E"/><stop offset=".95" stop-color="#BF7312"/><stop offset="1" stop-color="#BF7312"/></linearGradient><path clip-path="url(#u)" fill="url(#v)" d="M33.446 51.222l5.15-10.243 8.328 4.187-5.15 10.243"/><defs><path id="w" d="M35.49 52.894c.448.167 1.183.378 2.032.378v-.45c-.616 0-1.168-.12-1.582-.25l-.45.322z"/></defs><clipPath id="x"><use xlink:href="#w" overflow="visible"/></clipPath><linearGradient id="y" gradientUnits="userSpaceOnUse" x1="-14.272" y1="101.008" x2="-13.272" y2="101.008" gradientTransform="scale(2.064) rotate(-173 5.836 -38.644)"><stop offset="0" stop-color="#FFC20E"/><stop offset=".05" stop-color="#FFC20E"/><stop offset=".95" stop-color="#F0AF13"/><stop offset="1" stop-color="#F0AF13"/></linearGradient><path clip-path="url(#x)" fill="url(#y)" d="M37.492 53.518l-2.087-.256.115-.936 2.087.256"/><g><defs><path id="z" d="M35.49 33.65l.45.297c.436-.16 1.086-.298 1.77-.298v-.45c-.85 0-1.712.2-2.22.45"/></defs><clipPath id="A"><use xlink:href="#z" overflow="visible"/></clipPath><linearGradient id="B" gradientUnits="userSpaceOnUse" x1="-14.272" y1="101.022" x2="-13.272" y2="101.022" gradientTransform="scale(2.26) rotate(-14.7 450.378 -159.307)"><stop offset="0" stop-color="#A65E0C"/><stop offset=".05" stop-color="#A65E0C"/><stop offset=".95" stop-color="#8F4A02"/><stop offset="1" stop-color="#8F4A02"/></linearGradient><path clip-path="url(#A)" fill="url(#B)" d="M35.307 33.247l2.258-.593.327 1.245-2.26.59"/></g><g><defs><path id="C" d="M37.708 33.65c3.692 0 4.69 3.45 4.69 9.467h.45c0-7.017-1.506-9.918-5.14-9.918v.45z"/></defs><clipPath id="D"><use xlink:href="#C" overflow="visible"/></clipPath><linearGradient id="E" gradientUnits="userSpaceOnUse" x1="-14.272" y1="101.095" x2="-13.272" y2="101.095" gradientTransform="scale(11.171) rotate(-116.9 27.002 -54.175)"><stop offset="0" stop-color="#BF7312"/><stop offset=".05" stop-color="#BF7312"/><stop offset=".95" stop-color="#8F4A02"/><stop offset="1" stop-color="#8F4A02"/></linearGradient><path clip-path="url(#D)" fill="url(#E)" d="M38.76 45.19l-5.053-9.96 8.088-4.105 5.055 9.962"/></g><g><defs><path id="F" d="M50.22 36.32l.45-.003c-.027-5.06 4.282-8.042 8.403-8.162l-.014-.45c-4.554.133-8.867 3.465-8.84 8.614"/></defs><clipPath id="G"><use xlink:href="#F" overflow="visible"/></clipPath><linearGradient id="H" gradientUnits="userSpaceOnUse" x1="-14.273" y1="101.086" x2="-13.273" y2="101.086" gradientTransform="scale(12.334) rotate(137.9 -24.622 -45.742)"><stop offset="0" stop-color="#FFC20E"/><stop offset=".05" stop-color="#FFC20E"/><stop offset=".95" stop-color="#D89016"/><stop offset="1" stop-color="#D89016"/></linearGradient><path clip-path="url(#G)" fill="url(#H)" d="M63.36 32.447l-9.175 8.29-8.277-9.16 9.175-8.29"/></g><g><defs><path id="I" d="M56.652 36.055l.45.01c.016-.6.294-2.554 3.172-2.554l.062-.448h-.055c-1.756 0-3.568.788-3.628 2.993"/></defs><clipPath id="J"><use xlink:href="#I" overflow="visible"/></clipPath><linearGradient id="K" gradientUnits="userSpaceOnUse" x1="-14.272" y1="100.93" x2="-13.272" y2="100.93" gradientTransform="scale(4.7434) rotate(-41 143.997 -81.73)"><stop offset="0" stop-color="#D78817"/><stop offset=".05" stop-color="#D78817"/><stop offset=".95" stop-color="#8F4A02"/><stop offset="1" stop-color="#8F4A02"/></linearGradient><path clip-path="url(#J)" fill="url(#K)" d="M55.165 34.355l3.585-3.117 3.073 3.535-3.586 3.117"/></g><g><defs><path id="L" d="M60.274 33.51c2.59 0 4.802 1.685 6.122 3.233l-.45-1.107c-1.305-1.34-3.422-2.554-5.61-2.574l-.062.45z"/></defs><clipPath id="M"><use xlink:href="#L" overflow="visible"/></clipPath><linearGradient id="N" gradientUnits="userSpaceOnUse" x1="-14.272" y1="101.059" x2="-13.272" y2="101.059" gradientTransform="scale(7.0756) rotate(-152.5 10.56 -50.843)"><stop offset="0" stop-color="#BF7312"/><stop offset=".95" stop-color="#8F4A02"/><stop offset="1" stop-color="#8F4A02"/></linearGradient><path clip-path="url(#M)" fill="url(#N)" d="M65.09 39.25l-6.324-3.292 2.814-5.403 6.324 3.292"/></g><g><defs><path id="O" d="M59.06 27.705l.014.45c3.44-.105 5.77 1.187 6.872 2.034l.45-.222c-.944-.765-3.345-2.27-6.94-2.27-.13 0-.263.003-.396.007"/></defs><clipPath id="P"><use xlink:href="#O" overflow="visible"/></clipPath><linearGradient id="Q" gradientUnits="userSpaceOnUse" x1="-14.273" y1="100.978" x2="-13.273" y2="100.978" gradientTransform="scale(7.6762) rotate(17.9 -335.356 21.048)"><stop offset="0" stop-color="#FFC20E"/><stop offset=".05" stop-color="#FFC20E"/><stop offset=".95" stop-color="#E49F15"/><stop offset="1" stop-color="#E49F15"/></linearGradient><path clip-path="url(#P)" fill="url(#Q)" d="M59.753 25.553l7.372 2.38-1.422 4.4-7.37-2.38"/></g><g><defs><path id="R" d="M57.827 58.476v.45c5.677 0 9.367-3.78 9.52-8.813l-.45-.016c-.12 4.004-2.883 8.38-9.07 8.38"/></defs><clipPath id="S"><use xlink:href="#R" overflow="visible"/></clipPath><linearGradient id="T" gradientUnits="userSpaceOnUse" x1="-14.273" y1="100.915" x2="-13.272" y2="100.915" gradientTransform="matrix(-9.265 9.073 9.073 9.265 -980.627 -755.523)"><stop offset="0" stop-color="#D78817"/><stop offset=".05" stop-color="#D78817"/><stop offset=".95" stop-color="#8F4A02"/><stop offset="1" stop-color="#8F4A02"/></linearGradient><path clip-path="url(#S)" fill="url(#T)" d="M71.758 54.604l-9.27 9.08-9.074-9.265 9.272-9.08"/></g><g><defs><path id="U" d="M50.492 56.787c2.24 1.337 4.646 2.14 7.335 2.14v-.45c-2.476 0-4.924-.774-6.885-1.945l-.45.255z"/></defs><clipPath id="V"><use xlink:href="#U" overflow="visible"/></clipPath><linearGradient id="W" gradientUnits="userSpaceOnUse" x1="-14.272" y1="101.027" x2="-13.272" y2="101.027" gradientTransform="matrix(7.341 2.119 2.119 -7.341 -58.774 828.564)"><stop offset="0" stop-color="#BF7312"/><stop offset=".95" stop-color="#8F4A02"/><stop offset="1" stop-color="#8F4A02"/></linearGradient><path clip-path="url(#V)" fill="url(#W)" d="M51.056 54.576l7.41 2.14-1.203 4.164-7.41-2.138"/></g><g><defs><path id="X" d="M50.942 50.765c1.598 1.425 3.99 2.534 5.987 2.548l.002-.45c-2.23-.016-4.806-1.45-6.44-3.102l.45 1.005z"/></defs><clipPath id="Y"><use xlink:href="#X" overflow="visible"/></clipPath><linearGradient id="Z" gradientUnits="userSpaceOnUse" x1="-14.273" y1="100.957" x2="-13.273" y2="100.957" gradientTransform="scale(7.3418) rotate(-154.1 9.186 -49.393)"><stop offset="0" stop-color="#FFC20E"/><stop offset=".05" stop-color="#FFC20E"/><stop offset="1" stop-color="#F0AF13"/></linearGradient><path clip-path="url(#Y)" fill="url(#Z)" d="M55.704 55.844l-6.608-3.21 2.625-5.404 6.608 3.208"/></g><g><defs><path id="aa" d="M60.234 49.835c.05 1.998-1.348 3.042-3.302 3.028l-.003.45c2.296.01 3.808-1.306 3.754-3.49l-.45.012z"/></defs><clipPath id="ab"><use xlink:href="#aa" overflow="visible"/></clipPath><linearGradient id="ac" gradientUnits="userSpaceOnUse" x1="-14.273" y1="101.085" x2="-13.273" y2="101.085" gradientTransform="scale(5.1262) rotate(-42.6 141.392 -77.888)"><stop offset="0" stop-color="#FFC20E"/><stop offset=".05" stop-color="#FFC20E"/><stop offset=".95" stop-color="#D89016"/><stop offset="1" stop-color="#D89016"/></linearGradient><path clip-path="url(#ab)" fill="url(#ac)" d="M55.186 51.427l3.807-3.5 3.488 3.793-3.806 3.5"/></g><g><defs><path id="ad" d="M50.22 36.32c.01 3.508 1.048 6.144 6.324 9.24 2.822 1.658 3.65 2.617 3.69 4.275l.45-.01c-.048-1.97-1.16-3.035-3.913-4.653-5.164-3.03-6.092-5.523-6.1-8.855l-.45.002z"/></defs><clipPath id="ae"><use xlink:href="#ad" overflow="visible"/></clipPath><linearGradient id="af" gradientUnits="userSpaceOnUse" x1="-14.273" y1="101.036" x2="-13.271" y2="101.036" gradientTransform="scale(17.0604) rotate(55.2 -104.308 -32.975)"><stop offset="0" stop-color="#D89016"/><stop offset=".4" stop-color="#BF7312"/><stop offset=".6" stop-color="#BF7312"/><stop offset="1" stop-color="#D89016"/></linearGradient><path clip-path="url(#ae)" fill="url(#af)" d="M57.276 31.413l9.743 14.02-13.392 9.305-9.743-14.018"/></g><g><defs><path id="ag" d="M60.772 40.603c5.23 3.076 6.243 5.84 6.123 9.494l.45.016c.123-3.734-.896-6.693-6.346-9.897-2.214-1.342-3.954-2.073-3.898-4.15l-.45-.01c-.062 2.277 1.782 3.178 4.12 4.547"/></defs><clipPath id="ah"><use xlink:href="#ag" overflow="visible"/></clipPath><linearGradient id="ai" gradientUnits="userSpaceOnUse" x1="-14.272" y1="100.962" x2="-13.272" y2="100.962" gradientTransform="scale(17.6596) rotate(53.8 -107.037 -32.227)"><stop offset="0" stop-color="#D78817"/><stop offset=".4" stop-color="#E49F15"/><stop offset=".6" stop-color="#E49F15"/><stop offset="1" stop-color="#D78817"/></linearGradient><path clip-path="url(#ah)" fill="url(#ai)" d="M63.673 30.87l10.494 14.34-13.783 10.086L49.89 40.958"/></g><g><defs><path id="aj" d="M-14.272-13.996h102v115h-102z"/></defs><clipPath id="ak"><use xlink:href="#aj" overflow="visible"/></clipPath><path clip-path="url(#ak)" fill="#8F4A02" d="M35.49 71.2h-6.266l-.45.45h7.165"/></g><g><defs><path id="al" d="M35.94 58.59c.707.152 1.5.23 2.368.23v-.45c-1.285 0-2.193-.172-2.818-.356l.45.577z"/></defs><clipPath id="am"><use xlink:href="#al" overflow="visible"/></clipPath><linearGradient id="an" gradientUnits="userSpaceOnUse" x1="-14.272" y1="101.016" x2="-13.271" y2="101.016" gradientTransform="matrix(2.874 .445 .445 -2.874 31.535 354.878)"><stop offset="0" stop-color="#A65E0C"/><stop offset=".05" stop-color="#A65E0C"/><stop offset=".95" stop-color="#8F4A02"/><stop offset="1" stop-color="#8F4A02"/></linearGradient><path clip-path="url(#am)" fill="url(#an)" d="M35.556 57.587l2.874.445-.188 1.213-2.874-.445"/></g><g><defs><path id="ao" d="M49.25 42.958c0 9.148-3.99 15.41-10.942 15.41v.45c8.07 0 11.392-7.71 11.392-15.86h-.45z"/></defs><clipPath id="ap"><use xlink:href="#ao" overflow="visible"/></clipPath><linearGradient id="aq" gradientUnits="userSpaceOnUse" x1="-14.272" y1="100.903" x2="-13.272" y2="100.903" gradientTransform="scale(19.5286) rotate(125.6 -32.358 -45.03)"><stop offset="0" stop-color="#A65E0C"/><stop offset=".05" stop-color="#A65E0C"/><stop offset=".95" stop-color="#8F4A02"/><stop offset="1" stop-color="#8F4A02"/></linearGradient><path clip-path="url(#ap)" fill="url(#aq)" d="M57.208 48.333L45.838 64.21 30.802 53.445 42.17 37.566"/></g><g><defs><path id="ar" d="M28.773 30.137l.45.246c2.272-1.466 5.027-2.228 8.443-2.228v-.45c-3.47 0-6.49.795-8.893 2.432"/></defs><clipPath id="as"><use xlink:href="#ar" overflow="visible"/></clipPath><linearGradient id="at" gradientUnits="userSpaceOnUse" x1="-14.273" y1="101.033" x2="-13.273" y2="101.033" gradientTransform="scale(9.218) rotate(165.5 -11.71 -47.836)"><stop offset="0" stop-color="#FFC20E"/><stop offset=".05" stop-color="#FFC20E"/><stop offset=".95" stop-color="#F0AF13"/><stop offset="1" stop-color="#F0AF13"/></linearGradient><path clip-path="url(#as)" fill="url(#at)" d="M38.315 30.215L29.33 32.54l-1.206-4.667 8.985-2.324"/></g><g><defs><path id="au" d="M37.667 28.155c7.476 0 11.584 5.672 11.584 14.803h.45c0-8.078-3.38-15.253-12.033-15.253v.45z"/></defs><clipPath id="av"><use xlink:href="#au" overflow="visible"/></clipPath><linearGradient id="aw" gradientUnits="userSpaceOnUse" x1="-14.271" y1="100.898" x2="-13.271" y2="100.898" gradientTransform="scale(19.428) rotate(51.9 -111.295 -33.08)"><stop offset="0" stop-color="#FFC20E"/><stop offset=".05" stop-color="#FFC20E"/><stop offset=".95" stop-color="#A65E0C"/><stop offset="1" stop-color="#A65E0C"/></linearGradient><path clip-path="url(#av)" fill="url(#aw)" d="M45.12 21.862L57.105 37.15 42.248 48.8 30.26 33.513"/></g><g><defs><path id="ax" d="M-14.272-13.996h102v115h-102z"/></defs><clipPath id="ay"><use xlink:href="#ax" overflow="visible"/></clipPath><path clip-path="url(#ay)" fill="#FFC20E" d="M13.494 28.79H7.232l-.45-.45h7.16l-.448.45zm12.516 0h-6.252l-.45-.45h7.152l-.45.45z"/><path clip-path="url(#ay)" fill="#D78817" d="M4.037 51V26.756l.45.198v24.043h-.45zm62.36-14.257v-6.776l-.45.222v5.445l.45 1.108zM13.942 48.755V28.34l-.45.45v19.964h.45z"/><path clip-path="url(#ay)" fill="#D89016" d="M68.97 51V9.92l.45-.41V51h-.45zm-18.478-1.24v7.026l.45-.255v-5.766l-.45-1.003zm-30.735 2.636V28.79l-.45-.45v23.81l.45.246zm-12.524-3.92V28.79l-.45-.45v20.137h.45z"/></g><g><defs><path id="az" d="M6.783 48.476c0 6.63 3.108 10.45 9.79 10.45v-.45c-6.198 0-9.34-3.362-9.34-10h-.45z"/></defs><clipPath id="aA"><use xlink:href="#az" overflow="visible"/></clipPath><linearGradient id="aB" gradientUnits="userSpaceOnUse" x1="-14.273" y1="101.115" x2="-13.272" y2="101.115" gradientTransform="scale(14.319) rotate(47.1 -126.778 -31.948)"><stop offset="0" stop-color="#D89016"/><stop offset=".05" stop-color="#D89016"/><stop offset=".95" stop-color="#8F4A02"/><stop offset="1" stop-color="#8F4A02"/></linearGradient><path clip-path="url(#aA)" fill="url(#aB)" d="M12.037 43.594l9.747 10.49-10.465 9.724-9.748-10.49"/></g><g><defs><path id="aC" d="M16.573 58.476v.45c4 0 7.232-.924 9.886-2.727l-.45-.24c-2.393 1.626-5.604 2.516-9.437 2.516"/></defs><clipPath id="aD"><use xlink:href="#aC" overflow="visible"/></clipPath><linearGradient id="aE" gradientUnits="userSpaceOnUse" x1="-14.272" y1="100.977" x2="-13.272" y2="100.977" gradientTransform="matrix(-9.928 2.5676 2.5676 9.928 -374.5 -909.682)"><stop offset="0" stop-color="#A65E0C"/><stop offset=".05" stop-color="#A65E0C"/><stop offset=".95" stop-color="#8F4A02"/><stop offset="1" stop-color="#8F4A02"/></linearGradient><path clip-path="url(#aD)" fill="url(#aE)" d="M27.178 58.74l-9.985 2.582-1.34-5.176 9.986-2.582"/></g><g><defs><path id="aF" d="M16.794 52.712v.45c1.272 0 2.282-.297 2.963-.766l-.45-.25c-.636.367-1.517.566-2.513.566"/></defs><clipPath id="aG"><use xlink:href="#aF" overflow="visible"/></clipPath><linearGradient id="aH" gradientUnits="userSpaceOnUse" x1="-14.273" y1="101.012" x2="-13.273" y2="101.012" gradientTransform="matrix(2.9715 -.73 -.73 -2.9715 132.897 342.768)"><stop offset="0" stop-color="#FFC20E"/><stop offset=".05" stop-color="#FFC20E"/><stop offset=".95" stop-color="#F0AF13"/><stop offset="1" stop-color="#F0AF13"/></linearGradient><path clip-path="url(#aG)" fill="url(#aH)" d="M16.56 52.206l3.028-.744.404 1.642-3.03.745"/></g><g><defs><path id="aI" d="M13.493 48.755c0 1.777.43 4.407 3.3 4.407v-.45c-2.207 0-2.85-1.78-2.85-3.957h-.45z"/></defs><clipPath id="aJ"><use xlink:href="#aI" overflow="visible"/></clipPath><linearGradient id="aK" gradientUnits="userSpaceOnUse" x1="-14.272" y1="100.916" x2="-13.272" y2="100.916" gradientTransform="scale(5.506) rotate(-126.2 22.436 -50.022)"><stop offset="0" stop-color="#FFC20E"/><stop offset=".05" stop-color="#FFC20E"/><stop offset=".95" stop-color="#D78817"/><stop offset="1" stop-color="#D78817"/></linearGradient><path clip-path="url(#aJ)" fill="url(#aK)" d="M14.645 54.735l-3.252-4.443 4.25-3.11 3.252 4.443"/></g><g><defs><path id="aL" d="M-14.272-13.996h102v115h-102z"/></defs><clipPath id="aM"><use xlink:href="#aL" overflow="visible"/></clipPath><path clip-path="url(#aM)" fill="#D78817" d="M28.773 30.137V71.65l.45-.45V30.383"/><path clip-path="url(#aM)" fill="#BF7312" d="M35.94 52.572V33.946l-.45-.297v19.243l.45-.32zm0 6.02v13.06l-.45-.45v-13.19l.45.58zM26.46 56.2V28.34l-.45.45v27.17"/></g></svg> \ No newline at end of file diff --git a/bin/images/tracking/usps.png b/bin/images/tracking/usps.png new file mode 100644 index 0000000000000000000000000000000000000000..eb6712eb0e94a47e93a0d1daf91779a2d3131a4c Binary files /dev/null and b/bin/images/tracking/usps.png differ diff --git a/events.xml b/events.xml index 109531952f70f522f92b51bb5d572c8aa6b301c9..5685af185d381a8ccde9d2544e94ac9072e5b745 100644 --- a/events.xml +++ b/events.xml @@ -6,6 +6,12 @@ <event on="onPackageSetup" fire="\QUI\ERP\Shipping\EventHandler::onPackageSetup" /> + <event on="onPackageSetup" + fire="\QUI\ERP\Shipping\Tracking\Tracking::onPackageInstall" + /> + <event on="onPackageInstall" + fire="\QUI\ERP\Shipping\Tracking\Tracking::onPackageInstall" + /> <event on="onQuiqqerPaymentCanUsedInOrder" fire="\QUI\ERP\Shipping\EventHandler::onQuiqqerPaymentCanUsedInOrder" /> diff --git a/src/QUI/ERP/Shipping/Tracking/Tracking.php b/src/QUI/ERP/Shipping/Tracking/Tracking.php new file mode 100644 index 0000000000000000000000000000000000000000..cba3c1da2764bb0c8c44d78abd511247a7be479b --- /dev/null +++ b/src/QUI/ERP/Shipping/Tracking/Tracking.php @@ -0,0 +1,159 @@ +<?php + + +namespace QUI\ERP\Shipping\Tracking; + +use QUI\Countries\Country; + +use function array_filter; +use function file_exists; +use function file_get_contents; +use function file_put_contents; +use function json_decode; + +use const ETC_DIR; +use const JSON_PRETTY_PRINT; + +/** + * Helper class for shipping tracking + */ +class Tracking +{ + protected static array $tracking = [ + + //UPS - UNITED PARCEL SERVICE + [ + 'active' => '1', + 'type' => 'ups', + 'title' => 'UPS', + 'image' => 'quiqqer/shipping/bin/images/tracking/ups.svg', + 'url' => 'https://wwwapps.ups.com/WebTracking/processInputRequest?TypeOfInquiryNumber=T&InquiryNumber1=' + ], + + //USPS - UNITED STATES POSTAL SERVICE + [ + 'active' => '1', + 'type' => 'usps', + 'title' => 'USPS', + 'image' => 'quiqqer/shipping/bin/images/tracking/usps.png', + 'url' => 'https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1=' + ], + + //FEDEX - FEDERAL EXPRESS + [ + 'active' => '1', + 'type' => 'fedex', + 'title' => 'FedEx', + 'image' => 'quiqqer/shipping/bin/images/tracking/fedex.svg', + 'url' => 'https://www.fedex.com/fedextrack/?trknbr=' + ], + + //LaserShip + [ + 'active' => '1', + 'type' => 'laser_ship', + 'title' => 'LaserShip', + 'image' => 'quiqqer/shipping/bin/images/tracking/lasership.png', + 'url' => 'https://www.fedex.com/fedextrack/?trknbr=' + ], + + //ONTRAC + [ + 'active' => '1', + 'type' => 'ontrac', + 'title' => 'OnTrac', + 'image' => 'quiqqer/shipping/bin/images/tracking/ontrac.svg', + 'url' => 'https://www.ontrac.com/trackres.asp?tracking_number=' + ], + + //DHL + [ + 'active' => '1', + 'type' => 'dhl', + 'title' => 'DHL', + 'image' => 'quiqqer/shipping/bin/images/tracking/dhl.svg', + 'url ' => 'https://www.dhl.com/content/g0/en/express/tracking.shtml?brand=DHL&AWB=', + 'country' => [ + 'en' => 'https://www.dhl.com/content/g0/en/express/tracking.shtml?brand=DHL&AWB=', + 'de' => 'https://www.dhl.com/de-de/home/tracking/tracking-parcel.html?submit=1&tracking-id=' + ] + ], + + //DPD + [ + 'active' => '1', + 'type' => 'dpd', + 'title' => 'DPD', + 'image' => 'quiqqer/shipping/bin/images/tracking/dpd.svg', + 'url' => 'https://track.dpdnl.nl/?parcelnumber=' + ] + ]; + + /** + * @return string + */ + public static function getConfigFile(): string + { + return ETC_DIR . 'plugins/quiqqer/shippingTracking.json'; + } + + /** + * Create a shipping tracking json file into the etc folder + * + * @return void + */ + public static function onPackageInstall() + { + $file = self::getConfigFile(); + + if (!file_exists($file)) { + file_put_contents($file, json_encode(self::$tracking, JSON_PRETTY_PRINT)); + } + } + + /** + * @return array + */ + public static function getActiveCarriers(): array + { + $data = json_decode( + file_get_contents(self::getConfigFile()), + true + ); + + return array_filter($data, function ($entry) { + return (int)$entry['active']; + }); + } + + /** + * @param string|numeric $trackingId + * @param string $carrier + * @param ?Country $Country + * + * @return string + */ + public static function getUrl($trackingId, string $carrier, ?Country $Country): string + { + $carriers = self::getActiveCarriers(); + $country = false; + + if ($Country) { + $country = $Country->getCode(); + } + + foreach ($carriers as $entry) { + if ($entry['type'] !== $trackingId) { + continue; + } + + if ($country && isset($entry['country'][$country])) { + return $entry['country'][$country] . $trackingId; + } + + return $entry['url'] . $trackingId; + } + + return ''; + } +}