work in Home on task => hasBug

pull/1/head
saeid_01 5 years ago
commit 85d87e57c1

@ -9,11 +9,12 @@
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^7.1.3", "php": "^7.1.3",
"kalnoy/nestedset": "^5.0",
"fideloper/proxy": "^4.0", "fideloper/proxy": "^4.0",
"kalnoy/nestedset": "^5.0",
"laravel/framework": "6.*", "laravel/framework": "6.*",
"laravel/passport": "^7.3", "laravel/passport": "^7.3",
"laravel/tinker": "^1.0", "laravel/tinker": "^1.0",
"spatie/laravel-medialibrary": "^7.0.0",
"wm/common": "dev-master", "wm/common": "dev-master",
"wm/core": "dev-master", "wm/core": "dev-master",
"wm/crm": "dev-master", "wm/crm": "dev-master",

522
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "0a26b53029eed85894d6f45cc5bb36d3", "content-hash": "40be9045e2b8a425ef001b08f362c834",
"packages": [ "packages": [
{ {
"name": "defuse/php-encryption", "name": "defuse/php-encryption",
@ -676,6 +676,76 @@
], ],
"time": "2019-07-01T23:21:34+00:00" "time": "2019-07-01T23:21:34+00:00"
}, },
{
"name": "intervention/image",
"version": "2.5.0",
"source": {
"type": "git",
"url": "https://github.com/Intervention/image.git",
"reference": "39eaef720d082ecc54c64bf54541c55f10db546d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Intervention/image/zipball/39eaef720d082ecc54c64bf54541c55f10db546d",
"reference": "39eaef720d082ecc54c64bf54541c55f10db546d",
"shasum": ""
},
"require": {
"ext-fileinfo": "*",
"guzzlehttp/psr7": "~1.1",
"php": ">=5.4.0"
},
"require-dev": {
"mockery/mockery": "~0.9.2",
"phpunit/phpunit": "^4.8 || ^5.7"
},
"suggest": {
"ext-gd": "to use GD library based image processing.",
"ext-imagick": "to use Imagick based image processing.",
"intervention/imagecache": "Caching extension for the Intervention Image library"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.4-dev"
},
"laravel": {
"providers": [
"Intervention\\Image\\ImageServiceProvider"
],
"aliases": {
"Image": "Intervention\\Image\\Facades\\Image"
}
}
},
"autoload": {
"psr-4": {
"Intervention\\Image\\": "src/Intervention/Image"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Oliver Vogel",
"email": "oliver@olivervogel.com",
"homepage": "http://olivervogel.com/"
}
],
"description": "Image handling and manipulation library with support for Laravel integration",
"homepage": "http://image.intervention.io/",
"keywords": [
"gd",
"image",
"imagick",
"laravel",
"thumbnail",
"watermark"
],
"time": "2019-06-24T14:06:31+00:00"
},
{ {
"name": "jakub-onderka/php-console-color", "name": "jakub-onderka/php-console-color",
"version": "v0.2", "version": "v0.2",
@ -1292,6 +1362,67 @@
], ],
"time": "2019-10-16T21:01:05+00:00" "time": "2019-10-16T21:01:05+00:00"
}, },
{
"name": "league/glide",
"version": "1.5.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/glide.git",
"reference": "a5477e9e822ed57b39861a17092b92553634932d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/glide/zipball/a5477e9e822ed57b39861a17092b92553634932d",
"reference": "a5477e9e822ed57b39861a17092b92553634932d",
"shasum": ""
},
"require": {
"intervention/image": "^2.4",
"league/flysystem": "^1.0",
"php": "^5.5 | ^7.0",
"psr/http-message": "^1.0"
},
"require-dev": {
"mockery/mockery": "~0.9",
"phpunit/php-token-stream": "^1.4",
"phpunit/phpunit": "~4.4"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1-dev"
}
},
"autoload": {
"psr-4": {
"League\\Glide\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jonathan Reinink",
"email": "jonathan@reinink.ca",
"homepage": "http://reinink.ca"
}
],
"description": "Wonderfully easy on-demand image manipulation library with an HTTP based API.",
"homepage": "http://glide.thephpleague.com",
"keywords": [
"ImageMagick",
"editing",
"gd",
"image",
"imagick",
"league",
"manipulation",
"processing"
],
"time": "2019-04-03T23:46:42+00:00"
},
{ {
"name": "league/oauth2-server", "name": "league/oauth2-server",
"version": "7.4.0", "version": "7.4.0",
@ -1369,6 +1500,67 @@
], ],
"time": "2019-05-05T09:22:01+00:00" "time": "2019-05-05T09:22:01+00:00"
}, },
{
"name": "maennchen/zipstream-php",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/maennchen/ZipStream-PHP.git",
"reference": "6373eefe0b3274d7b702d81f2c99aa977ff97dc2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/6373eefe0b3274d7b702d81f2c99aa977ff97dc2",
"reference": "6373eefe0b3274d7b702d81f2c99aa977ff97dc2",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"myclabs/php-enum": "^1.5",
"php": ">= 7.1",
"psr/http-message": "^1.0"
},
"require-dev": {
"ext-zip": "*",
"guzzlehttp/guzzle": ">= 6.3",
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": ">= 7.5"
},
"type": "library",
"autoload": {
"psr-4": {
"ZipStream\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Paul Duncan",
"email": "pabs@pablotron.org"
},
{
"name": "Jesse Donat",
"email": "donatj@gmail.com"
},
{
"name": "Jonatan Männchen",
"email": "jonatan@maennchen.ch"
},
{
"name": "András Kolesár",
"email": "kolesar@kolesar.hu"
}
],
"description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.",
"keywords": [
"stream",
"zip"
],
"time": "2019-07-17T11:01:58+00:00"
},
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
"version": "2.0.0", "version": "2.0.0",
@ -1450,6 +1642,51 @@
], ],
"time": "2019-08-30T09:56:44+00:00" "time": "2019-08-30T09:56:44+00:00"
}, },
{
"name": "myclabs/php-enum",
"version": "1.7.2",
"source": {
"type": "git",
"url": "https://github.com/myclabs/php-enum.git",
"reference": "45f01adf6922df6082bcda36619deb466e826acf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/45f01adf6922df6082bcda36619deb466e826acf",
"reference": "45f01adf6922df6082bcda36619deb466e826acf",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "^4.8.35|^5.7|^6.0",
"squizlabs/php_codesniffer": "1.*"
},
"type": "library",
"autoload": {
"psr-4": {
"MyCLabs\\Enum\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP Enum contributors",
"homepage": "https://github.com/myclabs/php-enum/graphs/contributors"
}
],
"description": "PHP Enum implementation",
"homepage": "http://github.com/myclabs/php-enum",
"keywords": [
"enum"
],
"time": "2019-08-19T13:53:00+00:00"
},
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
"version": "2.25.3", "version": "2.25.3",
@ -2258,6 +2495,289 @@
], ],
"time": "2018-07-19T23:38:55+00:00" "time": "2018-07-19T23:38:55+00:00"
}, },
{
"name": "spatie/image",
"version": "1.7.4",
"source": {
"type": "git",
"url": "https://github.com/spatie/image.git",
"reference": "19ed0a6322e3f700d40d5b84b05c76b58323385c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/image/zipball/19ed0a6322e3f700d40d5b84b05c76b58323385c",
"reference": "19ed0a6322e3f700d40d5b84b05c76b58323385c",
"shasum": ""
},
"require": {
"ext-exif": "*",
"league/glide": "^1.4",
"php": "^7.0",
"spatie/image-optimizer": "^1.0",
"spatie/temporary-directory": "^1.0.0",
"symfony/process": "^3.0|^4.0"
},
"require-dev": {
"larapack/dd": "^1.1",
"phpunit/phpunit": "^6.0|^7.0",
"symfony/var-dumper": "^3.2"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\Image\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Manipulate images with an expressive API",
"homepage": "https://github.com/spatie/image",
"keywords": [
"image",
"spatie"
],
"time": "2019-08-28T12:40:25+00:00"
},
{
"name": "spatie/image-optimizer",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/image-optimizer.git",
"reference": "e7527edc984c98ab61db092742856fb15cf71e68"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/image-optimizer/zipball/e7527edc984c98ab61db092742856fb15cf71e68",
"reference": "e7527edc984c98ab61db092742856fb15cf71e68",
"shasum": ""
},
"require": {
"ext-fileinfo": "*",
"php": "^7.2",
"psr/log": "^1.0",
"symfony/process": "^4.2"
},
"require-dev": {
"phpunit/phpunit": "^8.0",
"symfony/var-dumper": "^4.2"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\ImageOptimizer\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Easily optimize images using PHP",
"homepage": "https://github.com/spatie/image-optimizer",
"keywords": [
"image-optimizer",
"spatie"
],
"time": "2019-08-28T14:33:06+00:00"
},
{
"name": "spatie/laravel-medialibrary",
"version": "7.14.2",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-medialibrary.git",
"reference": "f96fd75f70e893b1b2c85224526e6d4a2c235ef8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/f96fd75f70e893b1b2c85224526e6d4a2c235ef8",
"reference": "f96fd75f70e893b1b2c85224526e6d4a2c235ef8",
"shasum": ""
},
"require": {
"ext-fileinfo": "*",
"illuminate/bus": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0",
"illuminate/console": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0",
"illuminate/database": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0",
"illuminate/pipeline": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0",
"illuminate/support": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|^6.0",
"league/flysystem": "^1.0.8",
"maennchen/zipstream-php": "^0.4|^1.0",
"php": "^7.2",
"spatie/image": "^1.4.0",
"spatie/pdf-to-image": "^1.2",
"spatie/temporary-directory": "^1.1"
},
"conflict": {
"php-ffmpeg/php-ffmpeg": "<0.6.1"
},
"require-dev": {
"doctrine/dbal": "^2.5.2",
"ext-pdo_sqlite": "*",
"guzzlehttp/guzzle": "^6.3",
"league/flysystem-aws-s3-v3": "^1.0.13",
"mockery/mockery": "^1.0.0",
"orchestra/testbench": "~3.8.0|^4.0",
"phpunit/phpunit": "^8.0",
"spatie/phpunit-snapshot-assertions": "^2.0"
},
"suggest": {
"league/flysystem-aws-s3-v3": "Required to use AWS S3 file storage",
"php-ffmpeg/php-ffmpeg": "Required for generating video thumbnails"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Spatie\\MediaLibrary\\MediaLibraryServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Spatie\\MediaLibrary\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://murze.be",
"role": "Developer"
}
],
"description": "Associate files with Eloquent models",
"homepage": "https://github.com/spatie/laravel-medialibrary",
"keywords": [
"cms",
"conversion",
"downloads",
"images",
"laravel",
"laravel-medialibrary",
"media",
"spatie"
],
"time": "2019-10-16T13:46:56+00:00"
},
{
"name": "spatie/pdf-to-image",
"version": "1.2.2",
"source": {
"type": "git",
"url": "https://github.com/spatie/pdf-to-image.git",
"reference": "9a5cb264a99e87e010c65d4ece03b51f821d55bd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/pdf-to-image/zipball/9a5cb264a99e87e010c65d4ece03b51f821d55bd",
"reference": "9a5cb264a99e87e010c65d4ece03b51f821d55bd",
"shasum": ""
},
"require": {
"php": ">=5.5.0"
},
"require-dev": {
"phpunit/phpunit": "4.*",
"scrutinizer/ocular": "~1.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\PdfToImage\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Convert a pdf to an image",
"homepage": "https://github.com/spatie/pdf-to-image",
"keywords": [
"convert",
"image",
"pdf",
"pdf-to-image",
"spatie"
],
"time": "2016-12-14T15:37:00+00:00"
},
{
"name": "spatie/temporary-directory",
"version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/spatie/temporary-directory.git",
"reference": "3e51af9a8361f85cffc1fb2c52135f3e064758cc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/temporary-directory/zipball/3e51af9a8361f85cffc1fb2c52135f3e064758cc",
"reference": "3e51af9a8361f85cffc1fb2c52135f3e064758cc",
"shasum": ""
},
"require": {
"php": "^7.2"
},
"require-dev": {
"phpunit/phpunit": "^8.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\TemporaryDirectory\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Alex Vanderbist",
"email": "alex@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Easily create, use and destroy temporary directories",
"homepage": "https://github.com/spatie/temporary-directory",
"keywords": [
"spatie",
"temporary-directory"
],
"time": "2019-08-28T06:53:51+00:00"
},
{ {
"name": "swiftmailer/swiftmailer", "name": "swiftmailer/swiftmailer",
"version": "v6.2.1", "version": "v6.2.1",

@ -64,9 +64,17 @@ return [
'url' => env('AWS_URL'), 'url' => env('AWS_URL'),
], ],
'media' => [ 'media_dev' => [
'driver' => 'local', 'driver' => 'local',
'root' => public_path('uploads'), 'root' => public_path(),
],
'media' => [
'driver' => 'ftp',
'host' => '185.142.158.22',
'username' => 'willacdn',
'password' => 'F9NvDsT*HVhLA@$',
'root' => 'private_html',
], ],
], ],

@ -6,7 +6,7 @@ return [
* The disk on which to store added files and derived images by default. Choose * The disk on which to store added files and derived images by default. Choose
* one or more of the disks you've configured in config/filesystems.php. * one or more of the disks you've configured in config/filesystems.php.
*/ */
'disk_name' => env('MEDIA_DISK', 'media'), 'disk_name' => env('APP_DEBUG', true) ? 'media_dev' : 'media',
/* /*
* The maximum file size of an item in bytes. * The maximum file size of an item in bytes.
@ -74,7 +74,7 @@ return [
* When urls to files get generated, this class will be called. Leave empty * When urls to files get generated, this class will be called. Leave empty
* if your files are stored locally above the site root or on s3. * if your files are stored locally above the site root or on s3.
*/ */
'url_generator' => null, 'url_generator' => env('APP_DEBUG', true) ? null : 'WM\Common\Services\Media\UrlGenerator\FtpUrlGenerator',
/* /*
* Whether to activate versioning when urls to files get generated. * Whether to activate versioning when urls to files get generated.
@ -85,7 +85,7 @@ return [
/* /*
* The class that contains the strategy for determining a media file's path. * The class that contains the strategy for determining a media file's path.
*/ */
'path_generator' => null, 'path_generator' => 'WM\Common\Services\Media\PathGenerator',
/* /*
* Medialibrary will try to optimize all converted images by removing * Medialibrary will try to optimize all converted images by removing
@ -153,4 +153,6 @@ return [
'perform_conversions' => Spatie\MediaLibrary\Jobs\PerformConversions::class, 'perform_conversions' => Spatie\MediaLibrary\Jobs\PerformConversions::class,
'generate_responsive_images' => Spatie\MediaLibrary\Jobs\GenerateResponsiveImages::class, 'generate_responsive_images' => Spatie\MediaLibrary\Jobs\GenerateResponsiveImages::class,
], ],
'wm-cdn' => 'https://cdn.willamall.com',
]; ];

@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "es6",
"target": "es2017",
"allowSyntheticDefaultImports": true,
"baseUrl": "./",
"paths": {
"@JS/*": ["./resources/js/*"],
"@Global/*": ["./resources/js/Global/*"],
"@Home/*": ["./resources/js/Home/*"],
"@CRM/*": ["./modules/wm-crm/resources/js/*"],
"@Common/*": ["./modules/wm-common/resources/js/*"],
"@Core/*": ["./modules/wm-core/resources/js/*"],
"@User/*": ["./modules/wm-core/resources/js/Modules/User/*"],
"@Auth/*": ["./modules/wm-core/resources/js/Modules/Authentication/*"]
}
},
"exclude": ["node_modules"]
}

4290
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -41,6 +41,7 @@
"vue-scroll-reveal": "^1.0.11", "vue-scroll-reveal": "^1.0.11",
"vue-the-mask": "^0.11.1", "vue-the-mask": "^0.11.1",
"vue-tinymce-editor": "^1.6.2", "vue-tinymce-editor": "^1.6.2",
"vue2-dropzone": "^3.6.0",
"vuetify": "^2.0.19" "vuetify": "^2.0.19"
}, },
"devDependencies": { "devDependencies": {

@ -1,6 +1,6 @@
{ {
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=69a485a398e10ecf1480", "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=ef1264c79c4715437c5f",
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=7afee120275aa1ba59cf", "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=effcde9e131519164ea0",
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=c369ba53a87cf86d69ee", "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=f672b310d08bd18def06",
"/js/vue/User/app.js": "/js/vue/User/app.js?id=5b6de9215672f63f22ce" "/js/vue/User/app.js": "/js/vue/User/app.js?id=f8e9ae158d99d0712bd3"
} }

@ -0,0 +1,75 @@
<template>
<div>
<vue-dropzone ref="myVueDropzone" id="dropzone" :destroyDropzone="false" @vdropzone-sending="setParams" @vdropzone-removed-file="removeFile" :options="dropzoneOptions" @vdropzone-success="responseSuccess"></vue-dropzone>
</div>
</template>
<script>
import vue2Dropzone from 'vue2-dropzone'
import { TokenService } from '@Global/services/storage.services'
import commonState from '@Global/store/modules/common/state';
import { url } from '@Common/mixins/urls';
import axios from 'axios';
import 'vue2-dropzone/dist/vue2Dropzone.min.css'
export default {
props: {
defaultMessage: { default: "<i class='fa fa-cloud-upload'></i>آپلود فایل" },
files: {default:() => ([])},
batch_id: { required: true, type: String }
},
components: {
vueDropzone: vue2Dropzone
},
data() {
return {
dropzoneOptions: {
url: url('storeFile'),
thumbnailWidth: 200,
headers: { "Authorization": `Bearer ${TokenService.getToken()}`, "Module": `${commonState.current_module}` },
addRemoveLinks: true,
dictDefaultMessage: this.defaultMessage,
sendingMultiple: true,
removeType: "server"
},
}
},
computed: {
batchId() {
return this.batch_id;
},
},
methods: {
responseSuccess(file, response) {
if (response.data && response.data.id) {
file['id'] = response.data.id;
}
},
removeFile(file, error, xhr) {
if(this.dropzoneOptions.removeType == "server") {
axios.delete(url('deleteFile', {file: file.id}));
}
},
manuallyLoadFiles(files) { //file =[ {size: 123, name: "Icon", type: "image/png", url: "https://myvizo.com/img/logo_sm.png"}]
if(Array.isArray(files) && files.length) {
for (const file of files) {
this.$refs.myVueDropzone.manuallyAddFile({name: file.collection_name, type: file.mime_type, id: file.id, size: file.size}, file.address);
}
}
},
manuallyRemoveAllFiles() {
this.dropzoneOptions.removeType = "client";
this.$refs.myVueDropzone.removeAllFiles();
this.dropzoneOptions.removeType = "server";
},
setParams(file, xhr, formData) {
formData.append('batch_id', this.batchId);
},
},
watch: {
files(files) {
this.manuallyRemoveAllFiles();
this.manuallyLoadFiles(files);
}
},
};
</script>

@ -3,14 +3,11 @@ var CommingSoonArray = [
"discount", "discount",
"transaction", "transaction",
"email", "email",
// "sms",
"prescription", "prescription",
"user_sms", "user_sms",
"crm-setting", "crm-setting",
// "crm-client-filter",
"crm-statistics", "crm-statistics",
// "user-list-filter",
]; ];
const commingSoon = { const commingSoon = {
methods: { methods: {

@ -12,8 +12,8 @@ const global = {
//Modal //Modal
...mapActions("modal", ["$_openModal", "$_closeModal", "dialog"]), ...mapActions("modal", ["$_openModal", "$_closeModal", "$_openModalCallback", "$_closeModalCallback", "dialog"]),
//Alert //Alert
$_dialog(options) { $_dialog(options) {

@ -3,21 +3,21 @@ export default {
let modalArray = modal.split("/"); let modalArray = modal.split("/");
if (modalArray.length == 2) { if (modalArray.length == 2) {
rootState[modalArray[0]]['modal'][modalArray[1]] = true; rootState[modalArray[0]]['modal'][modalArray[1]] = true;
// if (typeof rootState[modalArray[0]]['callback_modal'] != "undefined" && typeof rootState[modalArray[0]]['callback_modal'][modalArray[1]] != "undefined") {
// }
} else { } else {
rootState.modal[modalArray[0]] = true; rootState.modal[modalArray[0]] = true;
} }
}, },
$_openModalCallback: ({ commit }, data) => {
commit(data.module + '/OPEN_MODAL_' + data.type.toUpperCase(), data, { root: true });
},
$_closeModalCallback: ({ commit }, data) => {
commit(data.module + '/CLOSE_MODAL_' + data.type.toUpperCase(), data, { root: true });
},
$_closeModal: ({ state, rootState }, modal) => { $_closeModal: ({ state, rootState }, modal) => {
let modalArray = modal.split("/"); let modalArray = modal.split("/");
if (modalArray.length == 2) { if (modalArray.length == 2) {
rootState[modalArray[0]]['modal'][modalArray[1]] = false; rootState[modalArray[0]]['modal'][modalArray[1]] = false;
// if (typeof rootState[modalArray[0]]['callback_modal'] != "undefined" && typeof rootState[modalArray[0]]['callback_modal'][modalArray[1]] != "undefined") {
// }
} else { } else {
rootState.modal[modalArray[0]] = false; rootState.modal[modalArray[0]] = false;
} }

@ -10,7 +10,7 @@ const createFilterObject = filters => {
} }
} }
} }
return {filter: filterObject}; return {filters: filterObject};
}; };
window['between'] = function (filter) { window['between'] = function (filter) {
var value = null; var value = null;

@ -0,0 +1,10 @@
const makeid = function makeid(length) {
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < length; i++)
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
export { makeid };
Loading…
Cancel
Save