diff --git a/app/Http/Controllers/InfluencerController.php b/app/Http/Controllers/InfluencerController.php index 72d4bb1..f6e766e 100644 --- a/app/Http/Controllers/InfluencerController.php +++ b/app/Http/Controllers/InfluencerController.php @@ -3,7 +3,6 @@ namespace App\Http\Controllers; use App\Brand; -use App\Campaign; use App\Influencer; use App\InfluencerPost; use App\BrandInfluencer; diff --git a/app/Http/Controllers/TrackerController.php b/app/Http/Controllers/TrackerController.php index c86418e..90fadfc 100644 --- a/app/Http/Controllers/TrackerController.php +++ b/app/Http/Controllers/TrackerController.php @@ -170,12 +170,12 @@ public function create(CreateTrackerRequest $request) ]); // Dispatch scraping job - ScrapURLContentJob::dispatch($ShortLink->load('tracker'))->onQueue('trackers')->delay(Carbon::now()->addSeconds(60)); + ScrapURLContentJob::dispatch($ShortLink->load('tracker'))->onQueue('trackers'); } // Dispatch scraping job if(in_array($tracker->platform, ['instagram', 'youtube']) && $tracker->type === 'post') - ScrapPostJob::dispatch($tracker)->onQueue('trackers')->delay(Carbon::now()->addSeconds(60)); + ScrapPostJob::dispatch($tracker)->onQueue('trackers'); return response()->success( "Tracker created successfully.", diff --git a/config/scraper.php b/config/scraper.php index 23dba08..af6343e 100644 --- a/config/scraper.php +++ b/config/scraper.php @@ -1,7 +1,7 @@ '0.3.9', + 'version' => '0.4.0', 'support' => env('SUPPORT_EMAIL'), 'usd2eur' => env('USD2EUR'), 'fbcost_perimpressions' => env('FBCOSTPERIMPRESSIONS'), diff --git a/public/5.js b/public/5.js index 1f685d5..117f619 100644 --- a/public/5.js +++ b/public/5.js @@ -102,7 +102,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = ({ data: function data() { return { - isNavOpen: true + navCurrentState: true }; }, props: { @@ -113,11 +113,24 @@ __webpack_require__.r(__webpack_exports__); computed: { currentRouteName: function currentRouteName() { return this.$route.name; + }, + isNavOpen: function isNavOpen() { + return this.navCurrentState; } }, methods: { toggle: function toggle() { - this.isNavOpen = !this.isNavOpen; + this.navCurrentState = !this.navCurrentState; + + if (this.navCurrentState === false) { + document.body.classList.add("nav-collapsed"); + document.getElementById("main-sidebar").addEventListener("mouseenter", this.removeClass); + document.getElementById("main-sidebar").addEventListener("mouseleave", this.addClass); + } else { + document.getElementById("main-sidebar").removeEventListener("mouseenter", this.removeClass); + document.getElementById("main-sidebar").removeEventListener("mouseleave", this.addClass); + document.body.classList.remove("nav-collapsed"); + } }, addClass: function addClass() { document.body.classList.add("nav-collapsed"); @@ -125,21 +138,6 @@ __webpack_require__.r(__webpack_exports__); removeClass: function removeClass() { document.body.classList.remove("nav-collapsed"); } - }, - watch: { - isNavOpen: { - handler: function handler(newValue, oldValue) { - if (newValue === false) { - document.body.classList.add("nav-collapsed"); - document.getElementById("main-sidebar").addEventListener("mouseenter", this.removeClass); - document.getElementById("main-sidebar").addEventListener("mouseleave", this.addClass); - } else if (newValue === true) { - document.getElementById("main-sidebar").removeEventListener("mouseenter", this.removeClass); - document.getElementById("main-sidebar").removeEventListener("mouseleave", this.addClass); - document.body.classList.remove("nav-collapsed"); - } - } - } } }); @@ -524,23 +522,35 @@ var render = function() { { staticClass: "logo" }, [ _c("router-link", { attrs: { to: { name: "dashboard" } } }, [ - _vm.isNavOpen - ? _c("img", { - attrs: { - src: __webpack_require__(/*! @assets/img/log-inf.png */ "./resources/assets/img/log-inf.png"), - alt: "logo" - } - }) - : _vm._e(), + _c("img", { + directives: [ + { + name: "show", + rawName: "v-show", + value: _vm.isNavOpen, + expression: "isNavOpen" + } + ], + attrs: { + src: __webpack_require__(/*! @assets/img/log-inf.png */ "./resources/assets/img/log-inf.png"), + alt: "logo" + } + }), _vm._v(" "), - !_vm.isNavOpen - ? _c("img", { - attrs: { - src: __webpack_require__(/*! @assets/img/log-inf-mini.png */ "./resources/assets/img/log-inf-mini.png"), - alt: "logo" - } - }) - : _vm._e() + _c("img", { + directives: [ + { + name: "show", + rawName: "v-show", + value: !_vm.isNavOpen, + expression: "!isNavOpen" + } + ], + attrs: { + src: __webpack_require__(/*! @assets/img/log-inf-mini.png */ "./resources/assets/img/log-inf-mini.png"), + alt: "logo" + } + }) ]) ], 1 diff --git a/resources/js/components/navigations/MainNav.vue b/resources/js/components/navigations/MainNav.vue index 99f3583..601805c 100644 --- a/resources/js/components/navigations/MainNav.vue +++ b/resources/js/components/navigations/MainNav.vue @@ -4,8 +4,8 @@
@@ -92,7 +92,7 @@ export default { data() { return { - isNavOpen: true + navCurrentState: true }; }, props:{ @@ -103,11 +103,24 @@ export default { computed: { currentRouteName() { return this.$route.name; + }, + isNavOpen(){ + return this.navCurrentState; } }, methods: { toggle() { - this.isNavOpen = !this.isNavOpen; + this.navCurrentState = !this.navCurrentState; + + if(this.navCurrentState === false){ + document.body.classList.add("nav-collapsed"); + document.getElementById("main-sidebar").addEventListener("mouseenter", this.removeClass); + document.getElementById("main-sidebar").addEventListener("mouseleave", this.addClass); + }else{ + document.getElementById("main-sidebar").removeEventListener("mouseenter", this.removeClass); + document.getElementById("main-sidebar").removeEventListener("mouseleave", this.addClass); + document.body.classList.remove("nav-collapsed"); + } }, addClass() { document.body.classList.add("nav-collapsed"); @@ -116,20 +129,5 @@ export default { document.body.classList.remove("nav-collapsed"); } }, - watch: { - isNavOpen: { - handler(newValue, oldValue) { - if (newValue === false) { - document.body.classList.add("nav-collapsed"); - document.getElementById("main-sidebar").addEventListener("mouseenter", this.removeClass); - document.getElementById("main-sidebar").addEventListener("mouseleave", this.addClass); - } else if (newValue === true) { - document.getElementById("main-sidebar").removeEventListener("mouseenter", this.removeClass); - document.getElementById("main-sidebar").removeEventListener("mouseleave", this.addClass); - document.body.classList.remove("nav-collapsed"); - } - } - } - } };