pull/1/head
alireza hassani 5 years ago
commit 6007253c90

1
.gitignore vendored

@ -4,6 +4,7 @@
/vendor /vendor
/modules /modules
/development/ /development/
jsconfig.json
.env .env
.phpunit.result.cache .phpunit.result.cache
Homestead.json Homestead.json

@ -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',
]; ];

4279
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,6 +1,6 @@
{ {
"/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=e8827d6a8df175dec6eb", "/js/vue/Authentication/app.js": "/js/vue/Authentication/app.js?id=24f5bed12f192390ce81",
"/js/vue/Home/app.js": "/js/vue/Home/app.js?id=e8a76a223d745c246893", "/js/vue/Home/app.js": "/js/vue/Home/app.js?id=4e9396249c2b9fe3b6a7",
"/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=452eb0cd1f0a0f069263", "/js/vue/Modules/CRM/app.js": "/js/vue/Modules/CRM/app.js?id=60e45aa9d845306eae56",
"/js/vue/User/app.js": "/js/vue/User/app.js?id=e820cd83f0d4d54312b8" "/js/vue/User/app.js": "/js/vue/User/app.js?id=76c44d0bd93d50c67446"
} }

@ -29,6 +29,7 @@ export default {
addRemoveLinks: true, addRemoveLinks: true,
dictDefaultMessage: this.defaultMessage, dictDefaultMessage: this.defaultMessage,
sendingMultiple: true, sendingMultiple: true,
removeType: "server"
}, },
} }
}, },
@ -49,9 +50,16 @@ export default {
} }
}, },
manuallyLoadFiles(files) { //file =[ {size: 123, name: "Icon", type: "image/png", url: "https://myvizo.com/img/logo_sm.png"}] 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) { for (const file of files) {
this.$refs.myVueDropzone.manuallyAddFile(file, file.url); 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) { setParams(file, xhr, formData) {
formData.append('batch_id', this.batchId); formData.append('batch_id', this.batchId);
@ -59,6 +67,7 @@ export default {
}, },
watch: { watch: {
files(files) { files(files) {
this.manuallyRemoveAllFiles();
this.manuallyLoadFiles(files); this.manuallyLoadFiles(files);
} }
}, },

@ -12,13 +12,7 @@ const global = {
//Modal //Modal
...mapActions("modal", ["openModal", "closeModal", "dialog"]), ...mapActions("modal", ["$_openModal", "$_closeModal", "$_openModalCallback", "$_closeModalCallback", "dialog", "$_openModalStack", "$_closeModalStack"]),
$_openModal(options) {
this.openModal(options);
},
$_closeModal(options) {
this.closeModal(options);
},
//Alert //Alert

@ -1,5 +1,5 @@
export default { export default {
openModal: ({ rootState }, modal) => { $_openModal: ({ rootState }, modal) => {
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;
@ -7,8 +7,7 @@ export default {
rootState.modal[modalArray[0]] = true; rootState.modal[modalArray[0]] = 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;
@ -18,8 +17,42 @@ export default {
state.properties = null; state.properties = null;
}, },
$_openModalCallback ({ dispatch }, data) {
dispatch(data.module + '/openModal' + data.type.charAt(0).toUpperCase() + data.type.slice(1), data, { root: true });
},
$_closeModalCallback: ({ dispatch }, data) => {
dispatch(data.module + '/closeModal' + data.type.charAt(0).toUpperCase() + data.type.slice(1) , data, { root: true });
},
$_openModalStack({ state, rootState }, data) { // data: {name, rel, model, form_data, data, modal_pop_data, type}
data.name = 'modal_' + data.name;
if (state.modals.findIndex(x => x.name == data.name) == -1) {
state.modals.push(data);
let module = data.name.split("_");
rootState[module[1]].relation = data.rel ? data.rel : {};
rootState[module[1]].currentModel = data.model ? data.model : {};
rootState[module[1]].page_type = data.page_type ? data.page_type : 'modal';
}
},
$_closeModalStack({ state, rootState }) {
if (state.modals.length) {
let last_data = [...state.modals].pop();
if (state.modals.length > 1) {
state.modals[state.modals.length - 2]['last_modal_data'] = last_data;
}
let module = last_data.name.split("_");
rootState[module[1]].relation = {};
rootState[module[1]].currentModel = {};
rootState[module[1]].page_type = '';
state.modals.pop();
}
},
dialog:({state, commit}, properties) => { dialog:({state, commit}, properties) => {
state.modal.dialog = true; state.dialog = true;
commit('SET_DIALOG_TYPE', properties.type); commit('SET_DIALOG_TYPE', properties.type);
commit('SET_DIALOG_PROPERTIES', properties); commit('SET_DIALOG_PROPERTIES', properties);
}, },

@ -10,4 +10,17 @@ export default {
getDialogProperties:(state) => state.dialogProperties, getDialogProperties:(state) => state.dialogProperties,
getDialogType:(state) => state.dialogType, getDialogType:(state) => state.dialogType,
isModalStack: (state) => (...names) => {
for (const name of names) {
if (state.modals.findIndex(x => x.name == name) != -1) {
return true;
}
}
return false;
},
getModal:(state) => (name) => state.modals[state.modals.findIndex(x => x.name == name)],
getModals:(state) => state.modals,
getActiveModal:(state) => state.modals[state.modals.length],
isActiveModal:(state) => (name) => state.modals[state.modals.length].name == name,
}; };

@ -5,6 +5,7 @@ export default {
modal:{ modal:{
dialog: false, dialog: false,
}, },
modals: [],
dialogProperties: {}, dialogProperties: {},
dialogType: {}, dialogType: {},
}; };

@ -10,7 +10,13 @@ const createFilterObject = filters => {
} }
} }
} }
return {filters: filterObject}; var filters= {};
for (var filter in filterObject) {
if(filterObject.hasOwnProperty(filter)){
filters[`filters[${filter}]`] = filterObject[filter];
}
}
return filters;
}; };
window['between'] = function (filter) { window['between'] = function (filter) {
var value = null; var value = null;

Loading…
Cancel
Save