From aac4bf318f39249d9d3d8721ec8c370a6e71a5f2 Mon Sep 17 00:00:00 2001 From: Michel Moraes Date: Mon, 17 Sep 2018 01:57:16 +0200 Subject: [PATCH] Updates to Tickets page (implementing woocommerce products) --- app/config/wp/scripts-and-styles.php | 4 + composer.json | 3 +- composer.lock | 83 ++++++-- package-lock.json | 144 ++++++-------- package.json | 4 +- resources/assets/js/components/Purchase.vue | 179 +++++++++++------- resources/assets/js/main.js | 3 - resources/assets/sass/pages/_tickets.sass | 31 ++- resources/views/template-tickets.twig | 6 +- ...252.css => admin.4a7e01efaf89bcf71b1f.css} | 0 ...be252.css => app.4a7e01efaf89bcf71b1f.css} | 28 ++- ...252.css => login.4a7e01efaf89bcf71b1f.css} | 0 ...be252.js => admin.4a7e01efaf89bcf71b1f.js} | 0 ...67be252.js => app.4a7e01efaf89bcf71b1f.js} | 4 +- ...be252.js => login.4a7e01efaf89bcf71b1f.js} | 0 ...e252.js => vendor.4a7e01efaf89bcf71b1f.js} | 0 static/manifest.json | 14 +- template-tickets.php | 33 +++- 18 files changed, 342 insertions(+), 194 deletions(-) rename static/css/{admin.fb16c74627daf67be252.css => admin.4a7e01efaf89bcf71b1f.css} (100%) rename static/css/{app.fb16c74627daf67be252.css => app.4a7e01efaf89bcf71b1f.css} (99%) rename static/css/{login.fb16c74627daf67be252.css => login.4a7e01efaf89bcf71b1f.css} (100%) rename static/js/{admin.fb16c74627daf67be252.js => admin.4a7e01efaf89bcf71b1f.js} (100%) rename static/js/{app.fb16c74627daf67be252.js => app.4a7e01efaf89bcf71b1f.js} (90%) rename static/js/{login.fb16c74627daf67be252.js => login.4a7e01efaf89bcf71b1f.js} (100%) rename static/js/{vendor.fb16c74627daf67be252.js => vendor.4a7e01efaf89bcf71b1f.js} (100%) diff --git a/app/config/wp/scripts-and-styles.php b/app/config/wp/scripts-and-styles.php index 6ee2773..b64cd4e 100644 --- a/app/config/wp/scripts-and-styles.php +++ b/app/config/wp/scripts-and-styles.php @@ -1,5 +1,9 @@ = 5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "*", + "squizlabs/php_codesniffer": "3.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "Automattic\\WooCommerce\\": [ + "src/WooCommerce" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Claudio Sanches", + "email": "claudio.sanches@automattic.com" + } + ], + "description": "A PHP wrapper for the WooCommerce REST API", + "keywords": [ + "api", + "woocommerce" + ], + "time": "2018-03-29 18:43:43" }, { "name": "composer/installers", @@ -229,7 +278,7 @@ "zend", "zikula" ], - "time": "2017-12-29T09:13:20+00:00" + "time": "2017-12-29 09:13:20" }, { "name": "league/flysystem", @@ -313,7 +362,7 @@ "sftp", "storage" ], - "time": "2018-05-07T08:44:23+00:00" + "time": "2018-05-07 08:44:23" }, { "name": "suomato/luna", @@ -354,7 +403,7 @@ } ], "description": "Command-line interface for Base Camp theme", - "time": "2018-07-27T11:09:37+00:00" + "time": "2018-07-27 11:09:37" }, { "name": "symfony/console", @@ -422,7 +471,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:24:31+00:00" + "time": "2018-07-26 11:24:31" }, { "name": "symfony/finder", @@ -471,7 +520,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-07-26T11:24:31+00:00" + "time": "2018-07-26 11:24:31" }, { "name": "symfony/polyfill-ctype", @@ -529,7 +578,7 @@ "polyfill", "portable" ], - "time": "2018-08-06T14:22:27+00:00" + "time": "2018-08-06 14:22:27" }, { "name": "symfony/polyfill-mbstring", @@ -588,7 +637,7 @@ "portable", "shim" ], - "time": "2018-08-06T14:22:27+00:00" + "time": "2018-08-06 14:22:27" }, { "name": "symfony/polyfill-php72", @@ -643,7 +692,7 @@ "portable", "shim" ], - "time": "2018-08-06T14:22:27+00:00" + "time": "2018-08-06 14:22:27" }, { "name": "symfony/var-dumper", @@ -718,7 +767,7 @@ "debug", "dump" ], - "time": "2018-07-26T11:24:31+00:00" + "time": "2018-07-26 11:24:31" }, { "name": "timber/timber", @@ -779,7 +828,7 @@ "timber", "twig" ], - "time": "2018-05-21T15:00:50+00:00" + "time": "2018-05-21 15:00:50" }, { "name": "twig/twig", @@ -846,7 +895,7 @@ "keywords": [ "templating" ], - "time": "2018-07-13T07:18:09+00:00" + "time": "2018-07-13 07:18:09" }, { "name": "upstatement/routes", @@ -897,7 +946,7 @@ "routes", "routing" ], - "time": "2016-07-06T12:53:24+00:00" + "time": "2016-07-06 12:53:24" }, { "name": "vlucas/phpdotenv", @@ -947,7 +996,7 @@ "env", "environment" ], - "time": "2018-07-29T20:33:41+00:00" + "time": "2018-07-29 20:33:41" } ], "packages-dev": [], diff --git a/package-lock.json b/package-lock.json index 32c6a69..fe63691 100644 --- a/package-lock.json +++ b/package-lock.json @@ -833,7 +833,6 @@ "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, "requires": { "safer-buffer": "~2.1.0" } @@ -878,8 +877,7 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, "assign-symbols": { "version": "1.0.0", @@ -926,8 +924,7 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "atob": { "version": "2.1.1", @@ -952,22 +949,20 @@ "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, "axios": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.17.1.tgz", - "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=", + "version": "0.18.0", + "resolved": "http://registry.npmjs.org/axios/-/axios-0.18.0.tgz", + "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "dev": true, "requires": { - "follow-redirects": "^1.2.5", + "follow-redirects": "^1.3.0", "is-buffer": "^1.1.5" } }, @@ -1652,7 +1647,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, "optional": true, "requires": { "tweetnacl": "^0.14.3" @@ -1804,8 +1798,7 @@ "bluebird": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", - "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", - "dev": true + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" }, "bn.js": { "version": "4.11.8", @@ -2225,8 +2218,7 @@ "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "caw": { "version": "1.2.0", @@ -2522,7 +2514,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -2698,8 +2689,7 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "create-ecdh": { "version": "4.0.3", @@ -2982,7 +2972,6 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -3301,8 +3290,7 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, "delegates": { "version": "1.0.0", @@ -3520,7 +3508,6 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, "optional": true, "requires": { "jsbn": "~0.1.0", @@ -4255,8 +4242,7 @@ "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "extend-shallow": { "version": "2.0.1", @@ -4290,8 +4276,7 @@ "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fancy-log": { "version": "1.3.2", @@ -4313,8 +4298,7 @@ "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", - "dev": true + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, "fast-levenshtein": { "version": "2.0.6", @@ -4490,12 +4474,12 @@ } }, "follow-redirects": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.2.tgz", - "integrity": "sha512-kssLorP/9acIdpQ2udQVTiCS5LQmdEz9mvdIfDcl1gYX2tPKFADHSyFdvJS040XdFsPzemWtgI3q8mFVCxtX8A==", + "version": "1.5.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.8.tgz", + "integrity": "sha512-sy1mXPmv7kLAMKW/8XofG7o9T+6gAjzdZK4AJF6ryqQYUa/hnzgiypoeUecZ53x7XiqKNEpNqLtS97MshW2nxg==", "dev": true, "requires": { - "debug": "^3.1.0" + "debug": "=3.1.0" }, "dependencies": { "debug": { @@ -4539,14 +4523,12 @@ "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "1.0.6", @@ -5228,7 +5210,6 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -5544,14 +5525,12 @@ "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "dev": true, "requires": { "ajv": "^5.1.0", "har-schema": "^2.0.0" @@ -5561,7 +5540,6 @@ "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, "requires": { "co": "^4.6.0", "fast-deep-equal": "^1.0.0", @@ -5572,20 +5550,17 @@ "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, "fast-deep-equal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" }, "json-schema-traverse": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" } } }, @@ -5823,7 +5798,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, "requires": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -6703,8 +6677,7 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "is-url": { "version": "1.2.4", @@ -6768,8 +6741,7 @@ "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "isurl": { "version": "1.0.0", @@ -6812,7 +6784,6 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true, "optional": true }, "jsesc": { @@ -6830,8 +6801,7 @@ "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, "json-schema-traverse": { "version": "0.4.1", @@ -6857,8 +6827,7 @@ "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json5": { "version": "0.5.1", @@ -6885,7 +6854,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -7010,6 +6978,16 @@ "yargs": "6.6.0" }, "dependencies": { + "axios": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.17.1.tgz", + "integrity": "sha1-LY4+XQvb1zJ/kbyBT1xXZg+Bgk0=", + "dev": true, + "requires": { + "follow-redirects": "^1.2.5", + "is-buffer": "^1.1.5" + } + }, "debug": { "version": "2.6.8", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", @@ -7571,14 +7549,12 @@ "mime-db": { "version": "1.35.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", - "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", - "dev": true + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==" }, "mime-types": { "version": "2.1.19", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", - "dev": true, "requires": { "mime-db": "~1.35.0" } @@ -8121,11 +8097,15 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, + "oauth-1.0a": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/oauth-1.0a/-/oauth-1.0a-2.2.4.tgz", + "integrity": "sha512-qHqZLUIcd+mrOKYMFosi9lC0KW602BeLdJ660M3MNhT7WruzFSgJbFZE5sdN+nV55Xk/ls9k1FusaCiDItli1g==" + }, "oauth-sign": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=", - "dev": true + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" }, "object-assign": { "version": "4.1.1", @@ -8611,8 +8591,7 @@ "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "pify": { "version": "3.0.0", @@ -10545,7 +10524,6 @@ "version": "2.87.0", "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", - "dev": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.6.0", @@ -10572,14 +10550,12 @@ "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, "requires": { "safe-buffer": "^5.0.1" } @@ -10754,8 +10730,7 @@ "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "safe-regex": { "version": "1.1.0", @@ -10769,8 +10744,7 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sass-graph": { "version": "2.2.4", @@ -11464,7 +11438,6 @@ "version": "1.14.2", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", - "dev": true, "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -12092,7 +12065,6 @@ "version": "2.3.4", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", - "dev": true, "requires": { "punycode": "^1.4.1" }, @@ -12100,8 +12072,7 @@ "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" } } }, @@ -12172,7 +12143,6 @@ "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true, "optional": true }, "type-check": { @@ -12540,8 +12510,7 @@ "uuid": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, "v8-compile-cache": { "version": "2.0.2", @@ -12575,7 +12544,6 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -13867,6 +13835,16 @@ "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", "dev": true }, + "woocommerce-api": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/woocommerce-api/-/woocommerce-api-1.4.2.tgz", + "integrity": "sha1-/fe5Hip+EQjqAHxQ4qexPRJ1xAw=", + "requires": { + "bluebird": "^3.4.6", + "oauth-1.0a": "^2.0.0", + "request": "^2.75.0" + } + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", diff --git a/package.json b/package.json index 8ec6b89..4e150a8 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "author": "Toni Suomalainen", "license": "MIT", "devDependencies": { + "axios": "^0.18.0", "babel-core": "^6.26.3", "babel-eslint": "^8.2.5", "babel-loader": "^7.1.4", @@ -46,6 +47,7 @@ "bulma": "0.6.2", "i": "^0.3.6", "jquery": "^3.3.1", - "vue": "^2.5.16" + "vue": "^2.5.16", + "woocommerce-api": "^1.4.2" } } diff --git a/resources/assets/js/components/Purchase.vue b/resources/assets/js/components/Purchase.vue index 6b0846b..4fca907 100644 --- a/resources/assets/js/components/Purchase.vue +++ b/resources/assets/js/components/Purchase.vue @@ -6,16 +6,15 @@
1 Select the parade type
- + + +
{{ product.categories }}
@@ -23,16 +22,13 @@
2 Select the date
- +
@@ -42,10 +38,11 @@ 3 Select the seat type
- - +
@@ -55,10 +52,18 @@
4 Select the sector
- +
+ + +
@@ -69,7 +74,9 @@
- 3 + + {{ quantity }} +
@@ -81,7 +88,7 @@ 6 Add to cart
- 3x $18.40 + {{ quantity }}x $18.40
- + {% set current_lang = function('pll_current_language', 'slug') %} + + -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/static/css/admin.fb16c74627daf67be252.css b/static/css/admin.4a7e01efaf89bcf71b1f.css similarity index 100% rename from static/css/admin.fb16c74627daf67be252.css rename to static/css/admin.4a7e01efaf89bcf71b1f.css diff --git a/static/css/app.fb16c74627daf67be252.css b/static/css/app.4a7e01efaf89bcf71b1f.css similarity index 99% rename from static/css/app.fb16c74627daf67be252.css rename to static/css/app.4a7e01efaf89bcf71b1f.css index c53c223..c9cf5f1 100644 --- a/static/css/app.fb16c74627daf67be252.css +++ b/static/css/app.4a7e01efaf89bcf71b1f.css @@ -7659,7 +7659,7 @@ nav.navbar .navbar-menu { .tickets .purchase__item:not(:last-child) { margin-right: 30px; } } .tickets .purchase__item.button, .tickets .blog-comment .purchase__item#cancel-comment-reply-link, .blog-comment .tickets .purchase__item#cancel-comment-reply-link, .tickets .purchase__add-to-cart-btn, .woocommerce .tickets button.purchase__add-to-cart-btn, .tickets .woocommerce button.purchase__add-to-cart-btn, .tickets .woocommerce #respond input.purchase__item#submit, .woocommerce #respond .tickets input.purchase__item#submit { - font-size: 22px; + font-size: 20px; transition: 0.2s; width: 100%; max-width: 350px; @@ -7682,10 +7682,12 @@ nav.navbar .navbar-menu { .tickets .purchase__item.button:hover:not(.selected), .tickets .blog-comment .purchase__item#cancel-comment-reply-link:hover:not(.selected), .blog-comment .tickets .purchase__item#cancel-comment-reply-link:hover:not(.selected), .tickets .purchase__add-to-cart-btn:hover:not(.selected), .tickets .woocommerce #respond input.purchase__item#submit:hover:not(.selected), .woocommerce #respond .tickets input.purchase__item#submit:hover:not(.selected) { transform: scale(1.05); } .tickets .purchase__item.button.sector, .tickets .blog-comment .purchase__item.sector#cancel-comment-reply-link, .blog-comment .tickets .purchase__item.sector#cancel-comment-reply-link, .tickets .sector.purchase__add-to-cart-btn, .tickets .woocommerce #respond input.purchase__item.sector#submit, .woocommerce #respond .tickets input.purchase__item.sector#submit { - max-width: calc(50% - 25px); } + display: block; + max-width: calc(50% - 10px); + height: 105px; } @media screen and (min-width: 769px), print { .tickets .purchase__item.button.sector, .tickets .blog-comment .purchase__item.sector#cancel-comment-reply-link, .blog-comment .tickets .purchase__item.sector#cancel-comment-reply-link, .tickets .sector.purchase__add-to-cart-btn, .tickets .woocommerce #respond input.purchase__item.sector#submit, .woocommerce #respond .tickets input.purchase__item.sector#submit { - max-width: 110px; } } + max-width: 195px; } } .tickets .purchase__item-total { display: flex; align-items: center; } @@ -7695,6 +7697,26 @@ nav.navbar .navbar-menu { letter-spacing: 0.86px; text-align: center; margin-right: 30px; } + .tickets .purchase__item-price { + display: block; + color: #fff; + font-size: 14px; + position: relative; + top: -3px; } + .tickets .purchase__item-quantity { + display: flex; + align-items: center; } + .tickets .purchase__item-quantity span { + font-size: 24px; + color: #595656; + margin-right: 10px; + margin-left: 10px; } + .tickets .purchase__item-quantity .button, .tickets .purchase__item-quantity .blog-comment #cancel-comment-reply-link, .blog-comment .tickets .purchase__item-quantity #cancel-comment-reply-link, .tickets .purchase__item-quantity .woocommerce #respond input#submit, .woocommerce #respond .tickets .purchase__item-quantity input#submit { + color: #fff; + background-color: #989898; + border-color: transparent; + font-size: 18px; + font-weight: bold; } .tickets .purchase__add-to-cart-btn { background-color: #2B9AE5; diff --git a/static/css/login.fb16c74627daf67be252.css b/static/css/login.4a7e01efaf89bcf71b1f.css similarity index 100% rename from static/css/login.fb16c74627daf67be252.css rename to static/css/login.4a7e01efaf89bcf71b1f.css diff --git a/static/js/admin.fb16c74627daf67be252.js b/static/js/admin.4a7e01efaf89bcf71b1f.js similarity index 100% rename from static/js/admin.fb16c74627daf67be252.js rename to static/js/admin.4a7e01efaf89bcf71b1f.js diff --git a/static/js/app.fb16c74627daf67be252.js b/static/js/app.4a7e01efaf89bcf71b1f.js similarity index 90% rename from static/js/app.fb16c74627daf67be252.js rename to static/js/app.4a7e01efaf89bcf71b1f.js index 4792017..9cd72db 100644 --- a/static/js/app.fb16c74627daf67be252.js +++ b/static/js/app.4a7e01efaf89bcf71b1f.js @@ -186,7 +186,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexports.default = {\n data: function data() {\n return {\n currentStep: 1,\n activeItem: -1,\n itemSelected: '',\n selected: {\n parade: String,\n date: String,\n seat: String\n\n },\n parades: [{\n id: 'parade-1',\n name: 'Preliminary Parades',\n dates: ['Friday (March 01)', 'Saturday (March 02)']\n }, {\n id: 'parade-2',\n name: 'Main Parades',\n dates: ['Sunday (March 03)', 'Monday (March 04)']\n }, {\n id: 'parade-3',\n name: 'Champions’ Parade',\n dates: ['Sábado (09 de Março)']\n }],\n products: [{ name: '1', price: '1,00' }, { name: '2', price: '1,00' }, { name: '3', price: '1,00' }, { name: '4', price: '1,00' }, { name: '5', price: '1,00' }, { name: '6', price: '1,00' }, { name: '7', price: '1,00' }, { name: '8', price: '1,00' }, { name: '9', price: '1,00' }, { name: '10', price: '1,00' }, { name: '11', price: '1,00' }]\n };\n },\n\n\n computed: {\n paradeDate: function paradeDate() {\n var _this = this;\n\n var dates = this.parades.filter(function (parade) {\n return parade.name == _this.selected.parade;\n });\n\n var resultMap = dates.map(function (a) {\n return a.dates;\n });\n\n return resultMap[0];\n }\n },\n\n methods: {\n nextStep: function nextStep(val, idx) {\n this.currentStep = val;\n var selected = event.target;\n\n var prevStep = val - 1;\n console.log(\"prevStep: \" + prevStep);\n\n var divParent = document.querySelector(\".step-\" + prevStep);\n var purchaseItem = divParent.querySelectorAll(\".purchase__item\");\n\n purchaseItem.forEach(function (item) {\n item.classList.remove('selected');\n });\n\n selected.classList.add('selected');\n\n console.log(this.currentStep);\n },\n isStep: function isStep(val) {\n return this.currentStep >= val;\n }\n },\n\n mounted: function mounted() {\n console.log('current step: ' + this.currentStep);\n }\n};\n\n//# sourceURL=webpack:///./resources/assets/js/components/Purchase.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexports.default = {\n props: ['products'],\n data: function data() {\n return {\n currentStep: 1,\n quantity: 1,\n selected: {\n parade: String,\n date: Object,\n seat: Object,\n sector: String,\n quantity: Number\n },\n productsList: Array,\n parades: [{\n name: 'Preliminary Parades',\n dates: [{ name: 'Friday (March 01)', slug: 'friday-march-01' }, { name: 'Saturday (March 02)', slug: 'saturday-march-02' }],\n seats: [{ name: 'Grandstand tickets', slug: 'grandstand-tickets' }, { name: 'Open Front Box seats', slug: 'open-front-box-seats' }]\n }, {\n name: 'Main Parades',\n dates: [{ name: 'Sunday (March 03)', slug: 'sunday-march-03' }, { name: 'Monday (March 04)', slug: 'monday-march-04' }],\n seats: [{ name: 'Grandstand tickets', slug: 'grandstand-tickets' }, { name: 'Open Front Box seats', slug: 'open-front-box-seats' }, { name: 'Private Chairs', slug: 'private-chairs' }]\n }, {\n name: 'Champions’ Parade',\n dates: [{ name: 'Saturdar (March 09)', slug: 'saturday-march-09' }],\n seats: [{ name: 'Grandstand tickets', slug: 'grandstand-tickets' }, { name: 'Open Front Box seats', slug: 'open-front-box-seats' }, { name: 'Private Chairs', slug: 'private-chairs' }]\n }]\n };\n },\n\n\n computed: {\n productsFilter: function productsFilter() {\n var _this = this;\n\n var filteredProducts = this.productsList.filter(function (el) {\n return el.acf.date.slug == _this.selected.date.slug && el.acf.seat_type.slug == _this.selected.seat.slug;\n });\n\n return filteredProducts;\n },\n setQuantity: function setQuantity() {\n return this.selected.quantity = this.quantity;\n }\n },\n\n methods: {\n setData: function setData(data) {\n var _this2 = this;\n\n var filteredParade = this.parades.filter(function (parade) {\n return parade.name == _this2.selected.parade;\n });\n var filtered = filteredParade.map(function (a) {\n return a[data];\n });\n return filtered[0];\n },\n nextStep: function nextStep(step, idx) {\n this.currentStep = step;\n var selected = event.target.parentElement;\n var prevStep = this.currentStep - 1;\n var divParent = document.querySelector(\".step-\" + prevStep);\n var purchaseItem = divParent.querySelectorAll(\".purchase__item\");\n\n purchaseItem.forEach(function (item) {\n item.classList.remove('selected');\n });\n\n selected.classList.add('selected');\n this.clearNextStep(step);\n },\n clearNextStep: function clearNextStep(step) {\n // clear next step when call the methods\n var divParentNextStep = document.querySelector(\".step-\" + step);\n var purchaseItemNextSep = divParentNextStep.querySelectorAll(\".purchase__item\");\n\n purchaseItemNextSep.forEach(function (item) {\n item.classList.remove('selected');\n });\n },\n isStep: function isStep(val) {\n return this.currentStep >= val;\n },\n increase: function increase() {\n return this.quantity += 1;\n },\n decrease: function decrease() {\n if (this.quantity > 1) {\n return this.quantity -= 1;\n }\n }\n },\n\n created: function created() {\n this.productsList = JSON.parse(this.products);\n }\n};\n\n//# sourceURL=webpack:///./resources/assets/js/components/Purchase.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -267,7 +267,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"section\", { staticClass: \"purchase section\" }, [\n _c(\n \"div\",\n { staticClass: \"container\" },\n [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isStep(1),\n expression: \"isStep(1)\"\n }\n ],\n staticClass: \"purchase__step step-1\"\n },\n [\n _vm._m(0),\n _vm._v(\" \"),\n _c(\n \"ul\",\n { staticClass: \"purchase__items\" },\n _vm._l(_vm.parades, function(parade, index) {\n return _c(\n \"label\",\n {\n key: index,\n staticClass: \"purchase__item button\",\n attrs: { for: \"parade-\" + index },\n on: {\n click: function($event) {\n _vm.nextStep(2, index)\n }\n }\n },\n [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selected.parade,\n expression: \"selected.parade\"\n }\n ],\n staticClass: \"is-hidden\",\n attrs: { id: \"parade-\" + index, type: \"radio\" },\n domProps: {\n value: parade.name,\n checked: _vm._q(_vm.selected.parade, parade.name)\n },\n on: {\n change: function($event) {\n _vm.$set(_vm.selected, \"parade\", parade.name)\n }\n }\n }),\n _vm._v(\n \"\\n \" +\n _vm._s(parade.name) +\n \"\\n \"\n )\n ]\n )\n })\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\"transition\", { attrs: { name: \"fade\" } }, [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isStep(2),\n expression: \"isStep(2)\"\n }\n ],\n staticClass: \"purchase__step step-2\"\n },\n [\n _c(\"div\", { staticClass: \"purchase__step-label\" }, [\n _c(\"span\", { staticClass: \"number\" }, [_vm._v(\"2\")]),\n _vm._v(\" Select the date\\n \")\n ]),\n _vm._v(\" \"),\n _c(\n \"ul\",\n { staticClass: \"purchase__items\" },\n _vm._l(_vm.paradeDate, function(date, index) {\n return _c(\n \"label\",\n {\n key: index,\n staticClass: \"purchase__item button\",\n attrs: { for: \"date-\" + index },\n on: {\n click: function($event) {\n _vm.nextStep(3, index)\n }\n }\n },\n [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selected.date,\n expression: \"selected.date\"\n }\n ],\n staticClass: \"is-hidden\",\n attrs: { id: \"date-\" + index, type: \"radio\" },\n domProps: {\n value: date,\n checked: _vm._q(_vm.selected.date, date)\n },\n on: {\n change: function($event) {\n _vm.$set(_vm.selected, \"date\", date)\n }\n }\n }),\n _vm._v(\n \"\\n \" +\n _vm._s(date) +\n \"\\n \"\n )\n ]\n )\n })\n )\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\"transition\", { attrs: { name: \"fade\" } }, [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isStep(3),\n expression: \"isStep(3)\"\n }\n ],\n staticClass: \"purchase__step step-3\"\n },\n [\n _c(\"div\", { staticClass: \"purchase__step-label\" }, [\n _c(\"span\", { staticClass: \"number\" }, [_vm._v(\"3\")]),\n _vm._v(\" Select the seat type\\n \")\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"purchase__items\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selected.seat,\n expression: \"selected.seat\"\n }\n ],\n staticClass: \"purchase__item button\",\n attrs: { value: \"Grandstand tickets\" },\n domProps: { value: _vm.selected.seat },\n on: {\n click: function($event) {\n _vm.nextStep(4)\n },\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.$set(_vm.selected, \"seat\", $event.target.value)\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selected.seat,\n expression: \"selected.seat\"\n }\n ],\n staticClass: \"purchase__item button\",\n attrs: { value: \"Open front box seats\" },\n domProps: { value: _vm.selected.seat },\n on: {\n click: function($event) {\n _vm.nextStep(4)\n },\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.$set(_vm.selected, \"seat\", $event.target.value)\n }\n }\n })\n ])\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\"transition\", { attrs: { name: \"fade\" } }, [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isStep(4),\n expression: \"isStep(4)\"\n }\n ],\n staticClass: \"purchase__step step-4\"\n },\n [\n _c(\"div\", { staticClass: \"purchase__step-label\" }, [\n _c(\"span\", { staticClass: \"number\" }, [_vm._v(\"4\")]),\n _vm._v(\" Select the sector\\n \")\n ]),\n _vm._v(\" \"),\n _c(\n \"ul\",\n { staticClass: \"purchase__items\" },\n _vm._l(_vm.products, function(product, i) {\n return _c(\n \"li\",\n {\n key: i,\n staticClass: \"purchase__item button sector\",\n on: {\n click: function($event) {\n _vm.nextStep(5)\n }\n }\n },\n [_vm._v(_vm._s(product.name))]\n )\n })\n )\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\"transition\", { attrs: { name: \"fade\" } }, [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isStep(5),\n expression: \"isStep(5)\"\n }\n ],\n staticClass: \"purchase__step step-5\"\n },\n [\n _c(\"div\", { staticClass: \"purchase__step-label\" }, [\n _c(\"span\", { staticClass: \"number\" }, [_vm._v(\"5\")]),\n _vm._v(\" Enter the quantity\\n \")\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"purchase__items\" }, [\n _c(\"div\", { staticClass: \"purchase__item-quantity\" }, [\n _c(\"button\", { staticClass: \"button\" }, [_vm._v(\"-\")]),\n _vm._v(\" 3 \"),\n _c(\"button\", { staticClass: \"button\" }, [_vm._v(\"+\")])\n ])\n ])\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\"transition\", { attrs: { name: \"fade\" } }, [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isStep(5),\n expression: \"isStep(5)\"\n }\n ],\n staticClass: \"purchase__step step-6\"\n },\n [\n _c(\"div\", { staticClass: \"purchase__step-label\" }, [\n _c(\"span\", { staticClass: \"number\" }, [_vm._v(\"6\")]),\n _vm._v(\" Add to cart\\n \")\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"purchase__item-total\" }, [\n _c(\"span\", [_vm._v(\"3x $18.40\")]),\n _vm._v(\" \"),\n _c(\n \"button\",\n { staticClass: \"purchase__add-to-cart-btn button\" },\n [\n _vm._v(\n \"\\n Add to cart\\n \"\n )\n ]\n )\n ])\n ]\n )\n ])\n ],\n 1\n )\n ])\n}\nvar staticRenderFns = [\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", { staticClass: \"purchase__step-label\" }, [\n _c(\"span\", { staticClass: \"number\" }, [_vm._v(\"1\")]),\n _vm._v(\" Select the parade type\\n \")\n ])\n }\n]\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./resources/assets/js/components/Purchase.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"section\", { staticClass: \"purchase section\" }, [\n _c(\n \"div\",\n { staticClass: \"container\" },\n [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isStep(1),\n expression: \"isStep(1)\"\n }\n ],\n staticClass: \"purchase__step step-1\"\n },\n [\n _vm._m(0),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"purchase__items\" },\n _vm._l(_vm.parades, function(parade, index) {\n return _c(\n \"label\",\n {\n key: index,\n staticClass: \"purchase__item button\",\n attrs: { for: \"parade-\" + index },\n on: {\n click: function($event) {\n _vm.nextStep(2, index)\n }\n }\n },\n [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selected.parade,\n expression: \"selected.parade\"\n }\n ],\n staticClass: \"is-hidden\",\n attrs: { id: \"parade-\" + index, type: \"radio\" },\n domProps: {\n value: parade.name,\n checked: _vm._q(_vm.selected.parade, parade.name)\n },\n on: {\n change: function($event) {\n _vm.$set(_vm.selected, \"parade\", parade.name)\n }\n }\n }),\n _vm._v(\n \"\\n \" +\n _vm._s(parade.name) +\n \"\\n \"\n )\n ]\n )\n })\n ),\n _vm._v(\" \"),\n _vm._l(_vm.products, function(product, index) {\n return _c(\"div\", { key: index }, [\n _vm._v(_vm._s(product.categories))\n ])\n })\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\"transition\", { attrs: { name: \"fade\" } }, [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isStep(2),\n expression: \"isStep(2)\"\n }\n ],\n staticClass: \"purchase__step step-2\"\n },\n [\n _c(\"div\", { staticClass: \"purchase__step-label\" }, [\n _c(\"span\", { staticClass: \"number\" }, [_vm._v(\"2\")]),\n _vm._v(\" Select the date\\n \")\n ]),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"purchase__items\" },\n _vm._l(_vm.setData(\"dates\"), function(date, index) {\n return _c(\n \"label\",\n {\n key: index,\n staticClass: \"purchase__item button\",\n attrs: { for: \"date-\" + index },\n on: {\n click: function($event) {\n _vm.nextStep(3, index)\n }\n }\n },\n [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selected.date,\n expression: \"selected.date\"\n }\n ],\n staticClass: \"is-hidden\",\n attrs: { id: \"date-\" + index, type: \"radio\" },\n domProps: {\n value: date,\n checked: _vm._q(_vm.selected.date, date)\n },\n on: {\n change: function($event) {\n _vm.$set(_vm.selected, \"date\", date)\n }\n }\n }),\n _vm._v(\n \"\\n \" +\n _vm._s(date.name) +\n \"\\n \"\n )\n ]\n )\n })\n )\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\"transition\", { attrs: { name: \"fade\" } }, [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isStep(3),\n expression: \"isStep(3)\"\n }\n ],\n staticClass: \"purchase__step step-3\"\n },\n [\n _c(\"div\", { staticClass: \"purchase__step-label\" }, [\n _c(\"span\", { staticClass: \"number\" }, [_vm._v(\"3\")]),\n _vm._v(\" Select the seat type\\n \")\n ]),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"purchase__items\" },\n _vm._l(_vm.setData(\"seats\"), function(seat, index) {\n return _c(\n \"label\",\n {\n key: index,\n staticClass: \"purchase__item button\",\n attrs: { for: \"seat-\" + index },\n on: {\n click: function($event) {\n _vm.nextStep(4, index)\n }\n }\n },\n [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selected.seat,\n expression: \"selected.seat\"\n }\n ],\n staticClass: \"is-hidden\",\n attrs: { id: \"seat-\" + index, type: \"radio\" },\n domProps: {\n value: seat,\n checked: _vm._q(_vm.selected.seat, seat)\n },\n on: {\n change: function($event) {\n _vm.$set(_vm.selected, \"seat\", seat)\n }\n }\n }),\n _vm._v(\n \"\\n \" +\n _vm._s(seat.name) +\n \"\\n \"\n )\n ]\n )\n })\n )\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\"transition\", { attrs: { name: \"fade\" } }, [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isStep(4),\n expression: \"isStep(4)\"\n }\n ],\n staticClass: \"purchase__step step-4\"\n },\n [\n _c(\"div\", { staticClass: \"purchase__step-label\" }, [\n _c(\"span\", { staticClass: \"number\" }, [_vm._v(\"4\")]),\n _vm._v(\" Select the sector\\n \")\n ]),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"purchase__items\" },\n _vm._l(_vm.productsFilter, function(ticket, index) {\n return _c(\n \"label\",\n {\n key: index,\n staticClass: \"purchase__item button sector\",\n attrs: { for: \"sector-\" + index },\n on: {\n click: function($event) {\n _vm.nextStep(5, index)\n }\n }\n },\n [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selected.sector,\n expression: \"selected.sector\"\n }\n ],\n staticClass: \"is-hidden\",\n attrs: { id: \"sector-\" + index, type: \"radio\" },\n domProps: {\n value: ticket.name,\n checked: _vm._q(_vm.selected.sector, ticket.name)\n },\n on: {\n change: function($event) {\n _vm.$set(_vm.selected, \"sector\", ticket.name)\n }\n }\n }),\n _vm._v(\n \"\\n \" + _vm._s(ticket.name) + \" \"\n ),\n _c(\"br\"),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"purchase__item-price\" }, [\n _vm._v(\"$ \" + _vm._s(ticket.price))\n ])\n ]\n )\n })\n )\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\"transition\", { attrs: { name: \"fade\" } }, [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isStep(5),\n expression: \"isStep(5)\"\n }\n ],\n staticClass: \"purchase__step step-5\"\n },\n [\n _c(\"div\", { staticClass: \"purchase__step-label\" }, [\n _c(\"span\", { staticClass: \"number\" }, [_vm._v(\"5\")]),\n _vm._v(\" Enter the quantity\\n \")\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"purchase__items\" }, [\n _c(\"div\", { staticClass: \"purchase__item-quantity\" }, [\n _c(\n \"button\",\n {\n staticClass: \"button\",\n on: {\n click: function($event) {\n _vm.decrease()\n }\n }\n },\n [_vm._v(\"-\")]\n ),\n _vm._v(\" \"),\n _c(\"span\", [_vm._v(_vm._s(_vm.quantity))]),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n staticClass: \"button\",\n on: {\n click: function($event) {\n _vm.increase()\n }\n }\n },\n [_vm._v(\"+\")]\n )\n ])\n ])\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\"transition\", { attrs: { name: \"fade\" } }, [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isStep(5),\n expression: \"isStep(5)\"\n }\n ],\n staticClass: \"purchase__step step-6\"\n },\n [\n _c(\"div\", { staticClass: \"purchase__step-label\" }, [\n _c(\"span\", { staticClass: \"number\" }, [_vm._v(\"6\")]),\n _vm._v(\" Add to cart\\n \")\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"purchase__item-total\" }, [\n _c(\"span\", [_vm._v(_vm._s(_vm.quantity) + \"x $18.40\")]),\n _vm._v(\" \"),\n _c(\n \"button\",\n { staticClass: \"purchase__add-to-cart-btn button\" },\n [\n _vm._v(\n \"\\n Add to cart\\n \"\n )\n ]\n )\n ])\n ]\n )\n ])\n ],\n 1\n )\n ])\n}\nvar staticRenderFns = [\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", { staticClass: \"purchase__step-label\" }, [\n _c(\"span\", { staticClass: \"number\" }, [_vm._v(\"1\")]),\n _vm._v(\" Select the parade type\\n \")\n ])\n }\n]\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./resources/assets/js/components/Purchase.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), diff --git a/static/js/login.fb16c74627daf67be252.js b/static/js/login.4a7e01efaf89bcf71b1f.js similarity index 100% rename from static/js/login.fb16c74627daf67be252.js rename to static/js/login.4a7e01efaf89bcf71b1f.js diff --git a/static/js/vendor.fb16c74627daf67be252.js b/static/js/vendor.4a7e01efaf89bcf71b1f.js similarity index 100% rename from static/js/vendor.fb16c74627daf67be252.js rename to static/js/vendor.4a7e01efaf89bcf71b1f.js diff --git a/static/manifest.json b/static/manifest.json index 4d854a7..77a1ef1 100644 --- a/static/manifest.json +++ b/static/manifest.json @@ -1,10 +1,10 @@ { - "admin.css": "css/admin.fb16c74627daf67be252.css", - "admin.js": "js/admin.fb16c74627daf67be252.js", - "app.css": "css/app.fb16c74627daf67be252.css", - "app.js": "js/app.fb16c74627daf67be252.js", - "login.css": "css/login.fb16c74627daf67be252.css", - "login.js": "js/login.fb16c74627daf67be252.js", - "vendor.js": "js/vendor.fb16c74627daf67be252.js", + "admin.css": "css/admin.4a7e01efaf89bcf71b1f.css", + "admin.js": "js/admin.4a7e01efaf89bcf71b1f.js", + "app.css": "css/app.4a7e01efaf89bcf71b1f.css", + "app.js": "js/app.4a7e01efaf89bcf71b1f.js", + "login.css": "css/login.4a7e01efaf89bcf71b1f.css", + "login.js": "js/login.4a7e01efaf89bcf71b1f.js", + "vendor.js": "js/vendor.4a7e01efaf89bcf71b1f.js", "images/base-camp-logo.png": "images/base-camp-logo.png" } \ No newline at end of file diff --git a/template-tickets.php b/template-tickets.php index ce042c8..bd2fe82 100644 --- a/template-tickets.php +++ b/template-tickets.php @@ -1,11 +1,40 @@ true, + 'version' => 'wc/v2', + 'verify_ssl' => false, + ] +); + $context = Timber::get_context(); $post = new TimberPost(); $context['post'] = $post; -Timber::render('template-tickets.twig', $context); +$products = array(); + +$data = array( + 'status' => 'publish', + 'orderby' => 'date', + 'order' => 'asc' +); + +$products = $woocommerce->get('products', $data); + +$context['products'] = $products; + +// Adding ACF to each product +foreach ($products as $key => $product) { + $context['products'][$key]->acf = get_fields($product->id); +} + +Timber::render('template-tickets.twig', $context); \ No newline at end of file