Compare commits

..

1 Commits

Author SHA1 Message Date
MHB 18c62a3213 add lightbox package to package.json file
3 years ago

@ -2,4 +2,3 @@
vendor vendor
node_modules node_modules
modules modules
composer.lock

@ -1,53 +0,0 @@
kind: pipeline
type: exec
name: default
steps:
- name: build to production
commands:
- docker build -t registry.willaspace.com/willaspace/willaengine-test:latest --build-arg COMPOSER_FILE_NAME=composer-prod .
when:
branch:
- master
- name: deploy to production
commands:
- cd /apps/willaengine/ ; docker-compose up -d
- docker exec willaengine-test bash -c "COMPOSER=composer-prod.json composer update"
- docker exec willaengine-test php artisan config:cache
- docker exec willaengine-test php artisan route:cache
# - docker exec willaengine_worker bash -c "COMPOSER=composer-prod.json composer update"
# - docker exec willaengine_worker service supervisor start
# - docker network connect nginx_default willaengine
when:
branch:
- master
- name: build to staging
commands:
- docker build -t registry.willaspace.com/willaspace/willaengine-staging:latest --build-arg COMPOSER_FILE_NAME=composer-staging -f Dockerfile.staging .
- docker build -t registry.willaspace.com/willaspace/willaengine-staging-nginx:latest -f Dockerfile.nginx .
when:
branch:
- dev
- name: deploy to staging
commands:
- cd /apps/willaengine-staging/ ; docker-compose up -d
- docker exec willaengine-staging_php bash -c "COMPOSER=composer-staging.json composer update"
- docker exec willaengine-staging_php bash -c "php artisan route:cache"
- docker exec willaengine-staging_php bash -c "php artisan config:cache"
- docker exec willaengine-staging_worker bash -c "COMPOSER=composer-staging.json composer update"
- docker exec willaengine-staging_worker service supervisor start
- docker exec willaengine-staging_php php artisan migrate --path=vendor/wm/finance/database/migrations --force
- docker exec willaengine-staging_php php artisan migrate --path=vendor/wm/store/database/migrations --force
when:
branch:
- dev
trigger:
branch:
- master
- dev

@ -12,4 +12,4 @@ trim_trailing_whitespace = true
trim_trailing_whitespace = false trim_trailing_whitespace = false
[*.yml] [*.yml]
indent_size = 2 indent_size = 2

1
.gitattributes vendored

@ -3,4 +3,3 @@
*.scss linguist-vendored *.scss linguist-vendored
*.js linguist-vendored *.js linguist-vendored
CHANGELOG.md export-ignore CHANGELOG.md export-ignore

4
.gitignore vendored

@ -2,9 +2,7 @@
/development/ /development/
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,laravel,vuejs,phpstorm # Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,laravel,vuejs,phpstorm
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,laravel,vuejs, phpstorm # Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,laravel,vuejs,phpstorm
resources/views/sites
### Laravel ### ### Laravel ###
/vendor/ /vendor/

@ -1,38 +0,0 @@
#!/bin/bash
# rsync script
git pull origin master
cd modules
for f in *
do
cd $f && git pull origin master && cd ..
done
cd ..
npm install
rm -r /home/administrator/apps/willaengine/public/js/vue
npm run prod
rm -r /home/administrator/apps/nginx/www/willaengine/public/js/vue
rm -r /home/administrator/apps/nginx/www/willamall/public/js/vue
rm -r /home/administrator/apps/nginx/www/willaarts/public/js/vue
cp -r /home/administrator/apps/willaengine/public/js/vue /home/administrator/apps/nginx/www/willaengine/public/js/
cp -r /home/administrator/apps/willaengine/public/js/vue /home/administrator/apps/nginx/www/willamall/public/js/
cp -r /home/administrator/apps/willaengine/public/js/vue /home/administrator/apps/nginx/www/willaarts/public/js/
cp /home/administrator/apps/willaengine/public/mix-manifest.json /home/administrator/apps/nginx/www/willaengine/public/
cp /home/administrator/apps/willaengine/public/mix-manifest.json /home/administrator/apps/nginx/www/willaarts/public/
sudo chown -R www-data:www-data /home/administrator/apps/nginx/www/willaarts/public
sudo chown -R www-data:www-data /home/administrator/apps/nginx/www/willamall/public
sudo chown -R www-data:www-data /home/administrator/apps/nginx/www/willaengine

@ -1,28 +1,23 @@
FROM willaengine/standard-laravel:7.4 FROM dfs1368/laravel-php-fpm:7.4
ARG COMPOSER_FILE_NAME=composer WORKDIR /var/www
WORKDIR /var/www/html RUN apt install -y sendmail libpng-dev
RUN docker-php-ext-install gd
RUN echo 'memory_limit = -1' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini;
##################################### COPY database /var/www/database
# Composer: COPY composer.* /var/www/
#####################################
COPY database /var/www/html/database RUN composer clearcache && composer update --no-scripts
COPY $COMPOSER_FILE_NAME.* /var/www/html/ COPY . /var/www
RUN COMPOSER=$COMPOSER_FILE_NAME.json composer install --no-scripts
COPY . /var/www/html
RUN chown -R www-data:www-data \ RUN chown -R www-data:www-data \
/var/www/html/public \ /var/www/public \
/var/www/html/storage \ /var/www/storage \
/var/www/html/bootstrap/cache \ /var/www/bootstrap/cache
/var/www/.ssh \
/var/www/html/storage/letsencrypt && \
chmod 755 /var/www/html/storage/letsencrypt/Bash/auth-hook.sh
RUN mv .env.prod .env
RUN php artisan morphmap:cache RUN php artisan optimize

@ -1,3 +0,0 @@
FROM nginx:1.21.1
COPY public /var/www/html/public

@ -1,6 +0,0 @@
FROM fsaravi/standard-laravel:7.4
WORKDIR /var/www/html
RUN php artisan morphmap:cache

42
Jenkinsfile vendored

@ -1,42 +0,0 @@
pipeline {
agent {
node {
label 'willa'
}
}
stages {
stage('build') {
when {
branch 'master'
}
steps {
sh 'cd /home/administrator/apps/${IMAGE_NAME}/;docker build -t registry.willaspace.com/willaspace/${IMAGE_NAME}:latest .'
sh 'cd /home/administrator/apps/${IMAGE_NAME}/;sudo ./BuildDocker'
}
}
stage('deploy to production') {
when {
branch 'master'
}
steps {
sh 'cd /home/administrator/apps/${IMAGE_NAME}/ ; docker-compose up -d'
sh 'docker exec willaengine bash -c "COMPOSER=composer-prod.json composer update"'
sh 'docker exec willaengine service cron start'
sh 'docker exec willaengine php artisan config:cache'
sh 'docker exec willaengine php artisan route:cache'
}
}
stage('deploy to staging') {
when {
branch 'dev'
}
steps {
sh 'echo ${IMAGE_NAME}-staging comming soon ...'
}
}
}
environment {
IMAGE_NAME = 'willaengine'
}
}

@ -1,85 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use WM\Core\Models\Business;
use WM\Core\Models\User;
class UserChangeInformation extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'transport:user';
/**
* The console command description.
*
* @var string
*/
protected $description = 'transport users';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
private function firstNameLengthUpdate(User $user)
{
$fistName = $user->first_name;
$fistNameLength = strlen(utf8_decode($fistName));
$user->update([
'first_name_length' => $fistNameLength
]);
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$users = User::all();
foreach ($users as $user) {
$business = Business::find($user->business_id);
if (!is_null($business)) {
if ($business->user_id == $user->id) {
$this->firstNameLengthUpdate($user);
$business->user()->attach($user->id, [
'responsibility' => $user->responsibility,
'is_owner' => 1
]);
$this->info("add and update user : $user->id");
} else {
$this->firstNameLengthUpdate($user);
$business->user()->attach($user->id, [
'responsibility' => $user->responsibility
]);
$this->info("add and update user : $user->id");
}
}
}
}
}

@ -102,10 +102,9 @@ class Vuex
} }
private static function replacer($data) { private static function replacer($data) {
$data = str_replace('|-module-|', Str::camel(static::$storeModule), $data); $data = str_replace('|-module-|', Str::snake(static::$storeModule), $data);
$data = str_replace('|-snake_module-|', Str::snake(static::$storeModule), $data);
$data = str_replace('|-Module-|', Str::title(static::$storeModule), $data); $data = str_replace('|-Module-|', Str::title(static::$storeModule), $data);
$data = str_replace('|-MODULE-|', Str::upper(Str::snake(static::$storeModule)), $data); $data = str_replace('|-MODULE-|', Str::upper(static::$storeModule), $data);
$data = str_replace('|-BaseModule-|', Str::title(static::$module), $data); $data = str_replace('|-BaseModule-|', Str::title(static::$module), $data);
return str_replace('|-baseModule-|', Str::camel(static::$module), $data); return str_replace('|-baseModule-|', Str::camel(static::$module), $data);
} }

@ -26,10 +26,8 @@ class Kernel extends ConsoleKernel
{ {
$schedule->command('today:schedule')->daily(); $schedule->command('today:schedule')->daily();
$schedule->command('today:run')->everyMinute(); $schedule->command('today:run')->everyMinute();
$schedule->command('sms:update:status rahyab')->everyTwoHours();
$schedule->command('domain:update_ssl_expiry_date')->daily(); # update SSL expired_at
$schedule->command('domain:update_domain_expiry_date')->daily(); # update domain expired_at $schedule->command('domain:update_domain_expiry_date')->daily(); # update domain expired_at
$schedule->command('make:sitemap')->daily(); # make sitemap $schedule->command('domain:update_ssl_expiry_date')->daily(); # update SSL expired_at
} }
/** /**

@ -2,12 +2,10 @@
namespace App\Exceptions; namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable; use Throwable;
use WM\Core\Exceptions\HasRelationException; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use WM\Core\Exceptions\ValidationErrorException; use WM\Core\Exceptions\ValidationErrorException;
use WM\Core\Services\Responser; use WM\Core\Services\Responser;
use WM\WebBuilder\Exceptions\SiteBannedException;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
{ {
@ -33,7 +31,7 @@ class Handler extends ExceptionHandler
/** /**
* Report or log an exception. * Report or log an exception.
* *
* @param \Throwable $exception * @param \Throwable $exception
* @return void * @return void
*/ */
public function report(Throwable $exception) public function report(Throwable $exception)
@ -48,24 +46,15 @@ class Handler extends ExceptionHandler
/** /**
* Render an exception into an HTTP response. * Render an exception into an HTTP response.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Throwable $exception * @param \Throwable $exception
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function render($request, Throwable $exception) public function render($request, Throwable $exception)
{ {
if ($exception instanceof ValidationErrorException) { if ($exception instanceof ValidationErrorException) {
return response()->json(Responser::error($exception->getMessageBody(), $exception->getMessageInfo()), 422); return response()->json(Responser::error($exception->getMessageBody(), $exception->getMessageInfo()), 422);
} elseif ($exception instanceof SiteBannedException) {
return response()->view('webBuilder::errors.template_disabled', ['error' => 'business banned']);
} elseif ($exception instanceof HasRelationException) {
return response()->json(Responser::error([$exception->getMessage()]), 422);
} elseif ($this->isHttpException($exception)) {
if ($exception->getStatusCode() == 404 and in_array("web",$request->route()->middleware())) {
return response()->view('webBuilder::errors.404', [], 404);
}
} }
return parent::render($request, $exception); return parent::render($request, $exception);
} }
} }

@ -19,6 +19,6 @@ class VerifyCsrfToken extends Middleware
* @var array * @var array
*/ */
protected $except = [ protected $except = [
'/verify-payment' //
]; ];
} }

@ -6,8 +6,8 @@ use Illuminate\Support\Facades\Event;
use Illuminate\Auth\Events\Registered; use Illuminate\Auth\Events\Registered;
use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Auth\Listeners\SendEmailVerificationNotification;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use WM\Notification\Services\Sms\Events\SmsSent; use WM\Common\Services\Sms\Events\SmsSent;
use WM\Notification\Services\Sms\Listeners\StoreSmsInDatabase; use WM\Common\Services\Sms\Listeners\StoreSmsInDatabase;
class EventServiceProvider extends ServiceProvider class EventServiceProvider extends ServiceProvider
{ {

@ -1,168 +0,0 @@
{
"name": "willaengine/laravel",
"type": "project",
"description": "The WillaEngine Applications.",
"keywords": [
"framework",
"laravel",
"WillaEngine"
],
"license": "MIT",
"require": {
"php": "^7.4",
"coraxster/flysystem-aws-s3-v3-minio": "^1.0",
"fideloper/proxy": "^4.0",
"io-developer/php-whois": "^4.0",
"kalnoy/nestedset": "^6.0",
"laravel/framework": "^8.0",
"laravel/passport": "^10",
"laravel/tinker": "^2.0",
"maatwebsite/excel": "^3.1",
"owen-it/laravel-auditing": "^13.5",
"sentry/sentry-laravel": "^2.3",
"silber/bouncer": "v1.0.0-rc.10",
"spatie/laravel-medialibrary": "^8.0.0",
"wm/admin": "dev-master",
"wm/app-management": "dev-master",
"wm/blog": "dev-master",
"wm/common": "dev-master",
"wm/contact-us": "dev-master",
"wm/core": "dev-master",
"wm/crm": "dev-master",
"wm/finance": "dev-master",
"wm/lms": "dev-master",
"wm/notification": "dev-master",
"wm/portfolio": "dev-master",
"wm/product": "dev-master",
"wm/roll-call": "dev-master",
"wm/service": "dev-master",
"wm/service-store": "dev-master",
"wm/store": "dev-master",
"wm/web-builder": "dev-master",
"zircote/swagger-php": "^3.0"
},
"provide": {
"ext-imagick": "*"
},
"require-dev": {
"facade/ignition": "^2.3.6",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"php-http/discovery": true
}
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Modules\\": "Modules/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi",
"@php artisan morphmap:cache"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"repositories": [
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/crm.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/common.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/core.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/blog.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/portfolio.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/product.git"
},
{
c "type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/service.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/store.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/notification.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/roll-call.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/app-management.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/web-builder.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/finance.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/service-store.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/admin.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/lms.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/contact-us.git"
}
]
}

@ -1,166 +0,0 @@
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.4",
"coraxster/flysystem-aws-s3-v3-minio": "^1.0",
"fideloper/proxy": "^4.0",
"laravel/framework": "^8.0",
"laravel/passport": "^10",
"laravel/tinker": "^2.0",
"maatwebsite/excel": "^3.1",
"matthiasmullie/minify": "^1.3",
"kalnoy/nestedset": "^6.0",
"sentry/sentry-laravel": "^2.3",
"spatie/laravel-medialibrary": "^8.0.0",
"io-developer/php-whois": "^4.0",
"silber/bouncer": "v1.0.0-rc.10",
"wm/blog": "dev-dev",
"wm/common": "dev-dev",
"wm/core": "dev-dev",
"wm/crm": "dev-dev",
"wm/portfolio": "dev-dev",
"wm/product": "dev-dev",
"wm/service": "dev-dev",
"wm/store": "dev-dev",
"wm/finance": "dev-dev",
"wm/admin": "dev-dev",
"wm/web-builder": "dev-dev",
"wm/app-management": "dev-dev",
"wm/notification": "dev-dev",
"wm/roll-call": "dev-dev",
"wm/lms": "dev-dev",
"wm/service-store": "dev-dev",
"predis/predis": "^1.1",
"wm/contact-us": "dev-dev",
"zircote/swagger-php": "^3.0"
},
"provide": {
"ext-imagick": "*"
},
"require-dev": {
"facade/ignition": "^2.3.6",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Modules\\": "Modules/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi",
"@php artisan morphmap:cache"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
"repositories": [
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/crm.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/common.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/core.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/blog.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/portfolio.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/product.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/service.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/store.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/notification.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/roll-call.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/app-management.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/web-builder.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/finance.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/service-store.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/admin.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/lms.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/contact-us.git"
}
]
}

@ -11,31 +11,22 @@
"php": "^7.4", "php": "^7.4",
"coraxster/flysystem-aws-s3-v3-minio": "^1.0", "coraxster/flysystem-aws-s3-v3-minio": "^1.0",
"fideloper/proxy": "^4.0", "fideloper/proxy": "^4.0",
"io-developer/php-whois": "^4.0",
"kalnoy/nestedset": "^6.0",
"laravel/framework": "^8.0", "laravel/framework": "^8.0",
"laravel/passport": "^10", "laravel/passport": "^10",
"laravel/tinker": "^2.0", "laravel/tinker": "^2.0",
"maatwebsite/excel": "^3.1", "maatwebsite/excel": "^3.1",
"matthiasmullie/minify": "^1.3", "nestedset/willaarts": "^5.0.7",
"owen-it/laravel-auditing": "^13.0",
"predis/predis": "^1.1",
"sentry/sentry-laravel": "^2.3", "sentry/sentry-laravel": "^2.3",
"silber/bouncer": "v1.0.0-rc.10",
"spatie/laravel-medialibrary": "^8.0.0", "spatie/laravel-medialibrary": "^8.0.0",
"wm/admin": "dev-master", "io-developer/php-whois": "^4.0",
"wm/blog": "dev-master", "wm/blog": "dev-master",
"wm/common": "dev-master", "wm/common": "dev-master",
"wm/core": "dev-master", "wm/core": "dev-master",
"wm/crm": "dev-master", "wm/crm": "dev-master",
"wm/finance": "dev-master",
"wm/notification": "dev-master",
"wm/portfolio": "dev-master", "wm/portfolio": "dev-master",
"wm/product": "dev-master", "wm/product": "dev-master",
"wm/roll-call": "dev-master",
"wm/service": "dev-master", "wm/service": "dev-master",
"wm/store": "dev-master", "wm/store": "dev-master",
"wm/web-builder": "dev-master",
"zircote/swagger-php": "^3.0" "zircote/swagger-php": "^3.0"
}, },
"provide": { "provide": {
@ -78,8 +69,7 @@
"scripts": { "scripts": {
"post-autoload-dump": [ "post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi", "@php artisan package:discover --ansi"
"@php artisan morphmap:cache"
], ],
"post-root-package-install": [ "post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
@ -91,56 +81,40 @@
"repositories": [ "repositories": [
{ {
"type": "path", "type": "vcs",
"url": "./modules/wm-crm" "url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/crm.git"
},
{
"type": "path",
"url": "./modules/wm-common"
},
{
"type": "path",
"url": "./modules/wm-core"
},
{
"type": "path",
"url": "./modules/wm-blog"
},
{
"type": "path",
"url": "./modules/wm-portfolio"
}, },
{ {
"type": "path", "type": "vcs",
"url": "./modules/wm-product" "url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/common.git"
}, },
{ {
"type": "path", "type": "vcs",
"url": "./modules/wm-service" "url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/core.git"
}, },
{ {
"type": "path", "type": "vcs",
"url": "./modules/wm-store" "url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/blog.git"
}, },
{ {
"type": "path", "type": "vcs",
"url": "./modules/wm-notification" "url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/portfolio.git"
}, },
{ {
"type": "path", "type": "vcs",
"url": "./modules/wm-roll-call" "url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/product.git"
}, },
{ {
"type": "path", "type": "vcs",
"url": "./modules/wm-web-builder" "url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/service.git"
}, },
{ {
"type": "path", "type": "vcs",
"url": "./modules/wm-finance" "url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/store.git"
}, },
{ {
"type": "path", "type": "vcs",
"url": "./modules/wm-admin" "url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/admin.git"
} }
] ]
} }

12272
composer.lock generated

File diff suppressed because it is too large Load Diff

@ -1,52 +0,0 @@
<?php
return [
/*
* If set to false, no activities will be saved to the database.
*/
'enabled' => env('ACTIVITY_LOGGER_ENABLED', true),
/*
* When the clean-command is executed, all recording activities older than
* the number of days specified here will be deleted.
*/
'delete_records_older_than_days' => 365,
/*
* If no log name is passed to the activity() helper
* we use this default log name.
*/
'default_log_name' => 'default',
/*
* You can specify an auth driver here that gets user models.
* If this is null we'll use the default Laravel auth driver.
*/
'default_auth_driver' => null,
/*
* If set to true, the subject returns soft deleted models.
*/
'subject_returns_soft_deleted_models' => false,
/*
* This model will be used to log activity.
* It should be implements the Spatie\Activitylog\Contracts\Activity interface
* and extend Illuminate\Database\Eloquent\Model.
*/
'activity_model' => \Spatie\Activitylog\Models\Activity::class,
/*
* This is the name of the table that will be created by the migration and
* used by the Activity model shipped with this package.
*/
'table_name' => 'activity_log',
/*
* This is the database connection that will be used by the migration and
* the Activity model shipped with this package. In case it's not set
* Laravel database.default will be used instead.
*/
'database_connection' => env('ACTIVITY_LOGGER_DB_CONNECTION'),
];

@ -1,171 +0,0 @@
<?php
return [
'enabled' => env('AUDITING_ENABLED', true),
/*
|--------------------------------------------------------------------------
| Audit Implementation
|--------------------------------------------------------------------------
|
| Define which Audit model implementation should be used.
|
*/
'implementation' => OwenIt\Auditing\Models\Audit::class,
/*
|--------------------------------------------------------------------------
| User Morph prefix & Guards
|--------------------------------------------------------------------------
|
| Define the morph prefix and authentication guards for the User resolver.
|
*/
'user' => [
'morph_prefix' => 'user',
'guards' => [
'web',
'api',
'apicore'
],
'resolver' => OwenIt\Auditing\Resolvers\UserResolver::class
],
/*
|--------------------------------------------------------------------------
| Audit Resolvers
|--------------------------------------------------------------------------
|
| Define the User, IP Address, User Agent and URL resolver implementations.
|
*/
'resolvers' => [
'ip_address' => OwenIt\Auditing\Resolvers\IpAddressResolver::class,
'user_agent' => OwenIt\Auditing\Resolvers\UserAgentResolver::class,
'url' => OwenIt\Auditing\Resolvers\UrlResolver::class,
'business_id'=> WM\Common\Services\Audit\BusinessResolver::class,
],
/*
|--------------------------------------------------------------------------
| Audit Events
|--------------------------------------------------------------------------
|
| The Eloquent events that trigger an Audit.
|
*/
'events' => [
'created',
'updated',
'deleted',
'restored'
],
/*
|--------------------------------------------------------------------------
| Strict Mode
|--------------------------------------------------------------------------
|
| Enable the strict mode when auditing?
|
*/
'strict' => false,
/*
|--------------------------------------------------------------------------
| Global exclude
|--------------------------------------------------------------------------
|
| Have something you always want to exclude by default? - add it here.
| Note that this is overwritten (not merged) with local exclude
|
*/
'exclude' => [],
/*
|--------------------------------------------------------------------------
| Empty Values
|--------------------------------------------------------------------------
|
| Should Audit records be stored when the recorded old_values & new_values
| are both empty?
|
| Some events may be empty on purpose. Use allowed_empty_values to exclude
| those from the empty values check. For example when auditing
| model retrieved events which will never have new and old values.
|
|
*/
'empty_values' => true,
'allowed_empty_values' => [
'retrieved'
],
/*
|--------------------------------------------------------------------------
| Audit Timestamps
|--------------------------------------------------------------------------
|
| Should the created_at, updated_at and deleted_at timestamps be audited?
|
*/
'timestamps' => false,
/*
|--------------------------------------------------------------------------
| Audit Threshold
|--------------------------------------------------------------------------
|
| Specify a threshold for the amount of Audit records a model can have.
| Zero means no limit.
|
*/
'threshold' => 0,
/*
|--------------------------------------------------------------------------
| Audit Driver
|--------------------------------------------------------------------------
|
| The default audit driver used to keep track of changes.
|
*/
'driver' => 'database',
/*
|--------------------------------------------------------------------------
| Audit Driver Configurations
|--------------------------------------------------------------------------
|
| Available audit drivers and respective configurations.
|
*/
'drivers' => [
'database' => [
'table' => 'audits',
'connection' => null,
],
],
/*
|--------------------------------------------------------------------------
| Audit Console
|--------------------------------------------------------------------------
|
| Whether console events should be audited (eg. php artisan db:seed).
|
*/
'console' => true,
];

@ -91,14 +91,6 @@ return [
'prefix_indexes' => true, 'prefix_indexes' => true,
], ],
'site' => [
'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
], ],
/* /*
@ -127,7 +119,7 @@ return [
'redis' => [ 'redis' => [
'client' => env('REDIS_CLIENT', 'predis'), 'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [ 'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'), 'cluster' => env('REDIS_CLUSTER', 'redis'),

@ -68,14 +68,7 @@ return [
'media_dev' => [ 'media_dev' => [
'driver' => 'local', 'driver' => 'local',
'root' => public_path(), 'root' => public_path(),
'url' => env('APP_URL').'/', 'url' => '',
'visibility' => 'public'
],
'site' => [
'driver' => 'local',
'root' => resource_path('views'),
'url' => env('APP_URL').'/',
'visibility' => 'public' 'visibility' => 'public'
], ],

@ -99,11 +99,6 @@ return [
'emergency' => [ 'emergency' => [
'path' => storage_path('logs/laravel.log'), 'path' => storage_path('logs/laravel.log'),
], ],
'sentry' => [
'driver' => 'sentry',
'level' => 'debug',
'bubble' => true,
],
], ],
]; ];

@ -170,5 +170,5 @@ return [
'generate_responsive_images' => Spatie\MediaLibrary\ResponsiveImages\Jobs\GenerateResponsiveImagesJob::class, 'generate_responsive_images' => Spatie\MediaLibrary\ResponsiveImages\Jobs\GenerateResponsiveImagesJob::class,
], ],
'wm-cdn' => 'https://cdn.willaspace.com/static.willaengine', 'wm-cdn' => 'https://cdn.willaspace.com',
]; ];

@ -12,12 +12,15 @@ class DatabaseSeeder extends Seeder
*/ */
public function run() public function run()
{ {
$this->call(CoreSeeder::class); $this->call(UserSeeder::class);
$this->call(CommonSeeder::class); $this->call(BusinessSeeder::class);
$this->call(CRMSeeder::class); $this->call(CategorySeeder::class);
$this->call(ProductSeeder::class); $this->call(CitySeeder::class);
$this->call(StoreSeeder::class); $this->call(DistrictSeeder::class);
$this->call(ServiceSeeder::class); $this->call(DomainSeeder::class);
$this->call(FinanceSeeder::class); $this->call(HelpSeeder::class);
$this->call(ModuleSeeder::class);
$this->call(PermissionCategorySeeder::class);
$this->call(RoleSeeder::class);
} }
} }

11958
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -2,69 +2,92 @@
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "npm run development", "dev": "npm run development",
"development": "mix", "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=webpack.config.js",
"staging": "npm run production -- --mix-config=webpack.mix.staging", "watch": "npm run development -- --watch",
"watch": "mix watch", "watch-poll": "npm run watch -- --watch-poll",
"watch-poll": "mix watch -- --watch-options-poll=1000", "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=webpack.config.js",
"hot": "mix watch --hot", "prod": "npm run production",
"prod": "npm run production -- --mix-config=webpack.mix.production", "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=webpack.config.js"
"production": "mix --production"
}, },
"dependencies": { "dependencies": {
"@ckeditor/ckeditor5-build-classic": "^12.4.0",
"@ckeditor/ckeditor5-build-decoupled-document": "^16.0.0",
"@ckeditor/ckeditor5-font": "^16.0.0",
"@ckeditor/ckeditor5-vue": "^1.0.1",
"@fortawesome/fontawesome-free": "^5.5.0",
"@morioh/v-lightbox": "^1.0.3",
"@riophae/vue-treeselect": "^0.4.0", "@riophae/vue-treeselect": "^0.4.0",
"@tinymce/tinymce-vue": "^3.0.1", "@tinymce/tinymce-vue": "^3.0.1",
"apexcharts": "^3.27.1", "ajv": "^6.10.0",
"apexcharts": "^3.8.3",
"apollo-boost": "^0.4.3",
"apollo-cache-inmemory": "^1.6.2",
"apollo-link-context": "^1.0.18",
"axios": "^0.21.1", "axios": "^0.21.1",
"babel-polyfill": "^6.26.0", "babel-polyfill": "^6.26.0",
"codemirror": "^5.60.0", "bootstrap": "^4.3.1",
"dedent": "^0.7.0", "bootstrap-select": "^1.13.3",
"fslightbox-vue": "^1.2.0", "bootstrap-v4-rtl": "^4.1.1-0",
"bootstrap-vue": "^2.0.0-rc.19",
"chart.js": "^2.7.3",
"graphql": "^14.4.2",
"graphql-tag": "^2.10.1",
"izitoast": "^1.4.0", "izitoast": "^1.4.0",
"jalali-moment": "^3.3.3", "jalali-moment": "^3.3.3",
"loadash": "^1.0.0",
"moment": "^2.29.1", "moment": "^2.29.1",
"moment-jalaali": "^0.9.2", "moment-jalaali": "^0.9.2",
"object-to-formdata": "^2.1.2", "object-to-formdata": "^2.1.2",
"postcss-loader": "^3.0.0",
"prismjs": "^1.21.0", "prismjs": "^1.21.0",
"quill": "^1.3.7", "raw-loader": "^0.5.1",
"vee-validate": "^3.4.10", "save": "^2.4.0",
"v-mask": "^2.2.3",
"vee-validate": "^3.4.5",
"vue-advanced-cropper": "^0.14.1", "vue-advanced-cropper": "^0.14.1",
"vue-apexcharts": "^1.6.1", "vue-apexcharts": "^1.4.0",
"vue-apollo": "^3.0.0-alpha.3",
"vue-chartjs": "^3.4.0", "vue-chartjs": "^3.4.0",
"vue-codemirror": "^4.0.6", "vue-ckeditor5": "^0.4.1",
"vue-color": "^2.8.1", "vue-cropperjs": "^4.0.1",
"vue-dialog-drag": "^0.1.29",
"vue-directive-tooltip": "^1.6.3",
"vue-gallery": "^2.0.1", "vue-gallery": "^2.0.1",
"vue-jalali-moment": "^1.0.0", "vue-jalali-moment": "^1.0.0",
"vue-js-toggle-button": "^1.3.3",
"vue-masonry-wall": "^0.3.2",
"vue-moment": "^4.1.0", "vue-moment": "^4.1.0",
"vue-persian-datetime-picker": "^2.6.1", "vue-persian-datetime-picker": "^2.4.1",
"vue-prism-editor": "^1.2.2", "vue-prism-editor": "^1.2.2",
"vue-quill-editor": "^3.0.6",
"vue-range-component": "^1.0.3",
"vue-router": "^3.0.2", "vue-router": "^3.0.2",
"vue-select": "^3.11.2", "vue-scroll-reveal": "^1.0.11",
"vue-the-mask": "^0.11.1",
"vue-tinymce-editor": "^1.6.2", "vue-tinymce-editor": "^1.6.2",
"vue2-dropzone": "^3.6.0", "vue2-dropzone": "^3.6.0",
"vuetify": "^2.5.4", "vuetify": "^2.3.17"
"willatoast": "^1.1.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/plugin-syntax-dynamic-import": "^7.2.0", "@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.14.5", "@babel/preset-env": "^7.6.2",
"cross-env": "^5.2.1", "@ckeditor/ckeditor5-alignment": "^16.0.0",
"laravel-mix": "^6.0.24", "@mdi/font": "^3.9.97",
"minimist": "^1.2.5", "cross-env": "^5.1",
"node-sass": "^6.0.0", "deepmerge": "^4.0.0",
"fibers": "^4.0.1",
"fslightbox-vue": "^1.2.0",
"jquery": "^3.5.1",
"laravel-mix": "^5.0.9",
"material-design-icons-iconfont": "^4.0.3",
"node-sass": "^4.14.1",
"popper.js": "^2.0.0-next.4", "popper.js": "^2.0.0-next.4",
"sass": "^1.35.1", "pug": "^2.0.3",
"sass-loader": "^12.1.0", "pug-loader": "^2.4.0",
"vue": "^2.6.14", "pug-plain-loader": "^1.0.0",
"vue-loader": "^15.9.7", "sass": "^1.22.12",
"sass-loader": "^7.3.1",
"ts-loader": "^8.0.11",
"typescript": "^4.1.2",
"vue": "^2.6.10",
"vue-masonry-css": "^1.0.3", "vue-masonry-css": "^1.0.3",
"vue-meta": "^1.5.2", "vue-meta": "^1.5.2",
"vue-template-compiler": "^2.6.14", "vue-resource": "^1.5.1",
"vue-template-compiler": "^2.6.10",
"vuex": "^3.0.1", "vuex": "^3.0.1",
"vuex-router-sync": "^5.0.0" "vuex-router-sync": "^5.0.0"
} }

@ -66,6 +66,6 @@ or generate your own password by https://bcrypt-generator.com/
## Composer Section: ## Composer Section:
1. please install and restart vscode 1. please install and restart vscode
2. add to environment in path in windows 1. add to environment in path in windows
good luck good luck

@ -1,8 +1,8 @@
import {setData, getJson, getArray} from '@|-BaseModule-|/abstraction/resources/|-module-|/|-module-|Resource' import {setData, getJson, getArray} from '@|-BaseModule-|/abstraction/resources/productCategory/|-module-|CategoryResource'
import axios from "axios"; import axios from "axios";
import url from "@|-BaseModule-|/router/urls"; import url from "@|-Module-|/router/urls";
export default class |-module-|Repository { export default class |-module-|CategoryRepository {
async index() { async index() {
@ -32,7 +32,7 @@ export default class |-module-|Repository {
const params = setData(data, true); const params = setData(data, true);
let response = await axios.post(url('url', {|-module-|: data.id}), params); let response = await axios.post(url('url', {|-module-|Category: data.id}), params);
if (response && response.status === 200) { if (response && response.status === 200) {
@ -42,7 +42,7 @@ export default class |-module-|Repository {
} }
async destroy(dataId) { async destroy(dataId) {
let response = await axios.delete(url('url', {|-module-|: dataId})); let response = await axios.delete(url('url', {|-module-|Category: dataId}));
if (response && response.status === 200) { if (response && response.status === 200) {

@ -1,4 +1,4 @@
import {setQuery, setData, getJson, getArray} from "@|-BaseModule-|/abstraction/resources/|-module-|/|-module-|Resource"; import {setQuery, setData, getJson, getArray} from "@|-BaseModule-|/abstraction/repositories/|-module-|Recource";
import axios from "axios"; import axios from "axios";
import url from "@|-BaseModule-|/router/urls"; import url from "@|-BaseModule-|/router/urls";

@ -1,7 +1,7 @@
import { Paginate, Sort } from '@Global/services/storage.|-module-|'; import { Paginate, Sort } from '@Global/services/storage.|-module-|';
const |-MODULE-| = '|-module-|'; const |-MODULE-| = '|-module-|';
const |-module-|Paginate = { const |-Module-|Paginate = {
get() { get() {
return Paginate.get(|-MODULE-|); return Paginate.get(|-MODULE-|);
}, },
@ -39,4 +39,4 @@ const SortPaginate = {
} }
export { |-module-|Paginate, SortPaginate } export { |-Module-|Paginate, SortPaginate }

@ -1,4 +1,4 @@
import |-Module-|Repository from "@|-BaseModule-|/abstraction/repositories/|-module-|/|-module-|Repository"; import |-Module-|Repository from "@|-BaseModule-|/abstraction/repositories/|-module-|Repository";
let repository = new |-Module-|Repository(); let repository = new |-Module-|Repository();

@ -1,13 +1,14 @@
export default { export default {
getList|-Module-|: state => { getList|-Module-|: state => {
if (state.has_filter) { if (state.has_filter) {
return state.filtered_|-snake_module-|; return state.filtered_|-module-|;
} }
return state.|-snake_module-|; return state.|-module-|;
}, },
get|-Module-|: state => state.|-snake_module-|, get|-Module-|: state => state.|-module-|,
isFiltered|-Module-|: state =>state.is_filtered, isFiltered|-Module-|: state =>state.is_filtered,
getFilter|-Module-|: state =>state.filter, getFilter|-Module-|: state =>state.filter,
get|-Module-|Loading: state => state.loading, get|-Module-|Loading: state => state.loading,
get|-Module-|Selected: state => state.selected,
}; };

@ -3,24 +3,26 @@ import {addIndexTreeToList} from '@Global/utils/common/ProcessTreeArray';
export default { export default {
SET_|-MODULE-|(state, |-module-|) { SET_|-MODULE-|(state, |-module-|) {
Vue.set(state, '|-snake_module-|', addIndexTreeToList(|-module-|)); Vue.set(state, '|-module-|', addIndexTreeToList(|-module-|));
}, },
UPDATE_|-MODULE-|(state, |-module-|) { UPDATE_|-MODULE-|(state, |-module-|) {
const index = state.|-snake_module-|.findIndex(x => x.id === |-module-|.id); const index = state.|-module-|.findIndex(x => x.id === |-module-|.id);
Vue.set(state.|-snake_module-|, index, |-module-|); Vue.set(state.|-module-|, index, |-module-|);
Vue.set(state, '|-snake_module-|', addIndexTreeToList(state.|-snake_module-|)); Vue.set(state, '|-module-|', addIndexTreeToList(state.|-module-|));
}, },
REMOVE_|-MODULE-|(state, id) { REMOVE_|-MODULE-|(state, id) {
const Index = state.|-snake_module-|.findIndex(x => x.id === id); const Index = state.|-module-|.findIndex(x => x.id === id);
Vue.delete(state.|-snake_module-|, Index); const selectedIndex = state.|-module-|_selected.findIndex(x => x.id === id);
Vue.set(state, '|-snake_module-|', addIndexTreeToList(state.|-snake_module-|)); Vue.delete(state.|-module-|, Index);
Vue.delete(state.|-module-|_selected, selectedIndex);
Vue.set(state, '|-module-|', addIndexTreeToList(state.|-module-|));
}, },
ADD_|-MODULE-|(state, |-module-|) { ADD_|-MODULE-|(state, |-module-|) {
Vue.set(state.|-snake_module-|, state.|-snake_module-|.length, |-module-|); Vue.set(state.|-module-|, state.|-module-|.length, |-module-|);
Vue.set(state, '|-snake_module-|', addIndexTreeToList(state.|-snake_module-|)) Vue.set(state, '|-module-|', addIndexTreeToList(state.|-module-|))
}, },
ADD_|-MODULE-|_SELECTED(state, |-module-|Id) { ADD_|-MODULE-|_SELECTED(state, |-module-|Id) {
@ -29,12 +31,12 @@ export default {
}, },
SET_FILTER_|-MODULE-|(state, value) { SET_FILTER_|-MODULE-|(state, value) {
Vue.set(state, 'filtered_|-snake_module-|', value); Vue.set(state, 'filtered_|-module-|', value);
Vue.set(state, 'has_filter', true); Vue.set(state, 'has_filter', true);
}, },
RESET_FILTERED_|-MODULE-|(state, value) { RESET_FILTERED_|-MODULE-|(state, value) {
Vue.set(state, 'filtered_|-snake_module-|', [value]); Vue.set(state, 'filtered_|-module-|', [value]);
Vue.set(state, 'is_filter', false); Vue.set(state, 'is_filter', false);
}, },
SET_LOADING(state, value) { SET_LOADING(state, value) {

@ -5,9 +5,9 @@ export default {
}, },
filter: [], filter: [],
is_filtered: false, is_filtered: false,
|-snake_module-|: [], |-module-|: [],
filtered_|-snake_module-|: [], filtered_|-module-|: [],
|-snake_module-|_selected: [], |-module-|_selected: [],
loading: false, loading: false,
default_category: { default_category: {
id: null, id: null,

@ -1,9 +1,7 @@
export default { export default {
get|-Module-|s: state => state.|-module-|_list, get|-Module-|: state => state.|-module-|,
get|-Module-|Loading: state => state.loading, get|-Module-|Loading: state => state.loading,
get|-Module-|Pagination: state => state.pagination, get|-Module-|Pagination: state => state.pagination,
getRowsPerPageItems: state => state.rowsPerPageItems, get|-Module-|Selected: state => state.selected,
get|-Module-|Selected: state => state.|-module-|_selected,
isFiltered|-Module-|: state => state.is_filtered,
}; };

@ -1,4 +1,5 @@
import Vue from 'vue'; import Vue from 'vue';
//import { |-module-|Paginate } from "@|-BaseModule-|/services/localStorage/|-module-|.storage"
export default { export default {
SET_|-MODULE-|(state, |-module-|) { SET_|-MODULE-|(state, |-module-|) {
@ -6,35 +7,34 @@ export default {
}, },
UPDATE_|-MODULE-|(state, |-module-|) { UPDATE_|-MODULE-|(state, |-module-|) {
const index = state.|-module-|_list.findIndex(x => x.id === |-module-|.id); const index = state.|-module-|.findIndex(x => x.id === |-module-|.id);
|-module-| = {...state.|-module-|_list[index], ...|-module-|}; |-module-| = {...state.|-module-|[index], ...|-module-|};
Vue.set(state.|-module-|_list, index, |-module-|); Vue.set(state.|-module-|, index, |-module-|);
}, },
SET_|-MODULE-|_PAGINATION(state, pagination) { SET_|-MODULE-|_PAGINATION(state, pagination) {
Vue.set(state, "pagination", {...state.pagination, ...pagination}); Vue.set(state, "pagination", pagination);
//|-module-|Paginate.save(pagination); //|-module-|Paginate.save(pagination);
}, },
REMOVE_|-MODULE-|(state, id) { REMOVE_|-MODULE-|(state, id) {
const Index = state.|-module-|_list.findIndex(x => x.id === id); const Index = state.|-module-|.findIndex(x => x.id === id);
const selectedIndex = state.|-module-|_selected.findIndex(x => x.id === id); const selectedIndex = state.|-module-|_selected.findIndex(x => x.id === id);
Vue.delete(state.|-module-|_list, Index); Vue.delete(state.|-module-|, Index);
Vue.delete(state.|-module-|_selected, selectedIndex); Vue.delete(state.|-module-|_selected, selectedIndex);
Vue.set(state.pagination, 'itemsLength', state.pagination.itemsLength - 1); Vue.set(state.pagination, 'itemsLength', state.pagination.itemsLength - 1);
Vue.set(state.pagination, 'pageStop', state.pagination.pageStop - 1); Vue.set(state.pagination, 'pageStop', state.pagination.pageStop - 1);
}, },
ADD_|-MODULE-|(state, |-module-|) { ADD_|-MODULE-|(state, |-module-|) {
state.|-module-|_list.unshift(|-module-|); state.|-module-|.unshift(|-module-|);
Vue.set(state, '|-module-|_list', state.|-module-|_list); Vue.set(state, '|-module-|', state.|-module-|);
Vue.set(state.pagination, 'itemsLength', state.pagination.itemsLength + 1); Vue.set(state.pagination, 'itemsLength', state.pagination.itemsLength + 1);
Vue.set(state.pagination, 'pageStop', state.pagination.pageStop + 1); Vue.set(state.pagination, 'pageStop', state.pagination.pageStop + 1);
}, },
ADD_|-MODULE-|_SELECTED(state, |-module-|Id) { ADD_|-MODULE-|_SELECTED(state, |-module-|Id) {
const |-module-| = state.|-module-|_list.find(x => x.id === |-module-|Id); const |-module-| = state.|-module-|.find(x => x.id === |-module-|Id);
Vue.set(state.|-module-|_selected, state.|-module-|_selected.length, |-module-|); Vue.set(state.|-module-|_selected, state.|-module-|_selected.length, |-module-|);
}, },
@ -43,6 +43,6 @@ export default {
}, },
SET_LOADING(state, value) { SET_LOADING(state, value) {
Vue.set(state, 'loading', value); state.loading = value;
} }
}; };

@ -1,16 +1,14 @@
//import { |-Module-|Paginate } from "@|-BaseModule-|/services/localStorage/|-module-|.storage"; //import { |-module-|Paginate } from "@|-BaseModule-|/services/localStorage/|-module-|.storage";
export default { export default {
module_info:{ module_info:{
name: '|-module-|', name: '|-module-|',
module: '|-baseModule-|', module: '|-baseModule-|',
}, },
|-module-|_list: [], |-module-|: [],
|-module-|_selected: [], |-module-|_selected: [],
filtered_|-module-|: [], //pagination: newsPaginate.getWithDefault(),
//pagination: |-Module-|Paginate.getWithDefault(),
loading: false, loading: false,
filters:{}, filters:{},
is_filtered: false,
}; };

@ -1,49 +1,49 @@
<template> <template>
<v-app> <v-app>
<div id="app" class="we-dark"> <div id="app" class="we-dark">
<wm-background C1="fff" C2="f1f1f1" C3="fff"/> <wm-background C1="fff" C2="f1f1f1" C3="fff"/>
<app-menu/> <app-menu/>
<v-main> <v-main>
<v-container fluid class="Login"> <v-container fluid class="Login">
<div class="Tile"> <div class="Tile">
<router-view/> <router-view/>
</div> <!-- <wm-tiles-layout></wm-tiles-layout> -->
</v-container> </div>
</v-main> </v-container>
</div> </v-main>
</v-app> </div>
</v-app>
</template> </template>
<script> <script>
import Background from "@Global/components/Body/Backgrounds/Gradient-CSS"; import Background from "@Global/components/Body/Backgrounds/Gradient-CSS";
import Menu from "@Global/components/Drawer/SideBar"; import Menu from "@Global/components/Drawer/SideBar";
import {mapMutations} from "vuex"; import { mapMutations } from "vuex";
export default { export default {
components: { components: {
"wm-background": Background, "wm-background": Background,
appMenu: Menu appMenu: Menu
}, },
methods: { methods: {
...mapMutations("common", ["SET_CURRENT_MODULE"]) ...mapMutations("common", ["SET_CURRENT_MODULE"])
}, },
created() { created() {
this.SET_CURRENT_MODULE("product"); this.SET_CURRENT_MODULE("");
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
#app { #app {
background-color: transparent; background-color: transparent;
// -webkit-font-smoothing: antialiased; // -webkit-font-smoothing: antialiased;
// -moz-osx-font-smoothing: grayscale; // -moz-osx-font-smoothing: grayscale;
} }
.WM-Container-Fluid {
.WM-Container-Fluid { width: 100%;
width: 100%; height: 100%;
height: 100%; }
}
</style> </style>

@ -6,21 +6,23 @@ import store from './store'
//vuetify //vuetify
import vuetify from '@Global/plugins/vuetify' import vuetify from '@Global/plugins/vuetify'
//Policy
import './policy'
//veeValidate => 0.3MB
import "@Global/plugins/veeValidate";
//components //components
import '@Global/plugins/globalComponent.js' import '@Global/plugins/globalComponent.js'
//Policy
import './policy'
//hint text //hint text
import HintText from "@Global/components/Texts/Hint.vue"; import HintText from "@Global/components/Texts/Hint.vue";
Vue.component('wm-hint-text', HintText) Vue.component('wm-hint-text', HintText)
//vue
window.Vue = Vue;
//mixin //mixin
import { global } from "@Global/mixins/global"; import { global } from "@Global/mixins/global";
import { commingSoon } from "@Global/mixins/commingSoon"; import { commingSoon } from "@Global/mixins/commingSoon";

@ -1,24 +1,28 @@
<template> <template>
<v-container class="not-fluid"> <v-container>
<v-row class="reverse"> <v-row class="reverse">
<v-col xl="8" lg="8" offset-xl="2" offset-lg="2" class="fade-in fast delay-01"> <v-col xl="8" lg="8" offset-xl="2" offset-lg="2" class="fade-in fast delay-01">
<big-section-title title_fa="سیستم مدیریت یک پارچه" title_en="Integrated Management System" desc="هر آنچه مربوط به مدیریت مجموعه ی شما می باشد."/> <big-section-title title_fa="سیستم مدیریت یک پارچه" title_en="Integrated Management System" desc="هر آنچه مربوط به مدیریت مجموعه ی شما می باشد." />
</v-col> </v-col>
</v-row> </v-row>
<v-row> <v-row>
<a <a
:href="module.hasModule ? module.href : 'javascript:void(0)'" :href="module.href"
:class="`module col col-xl-2 col-md-2 col-sm-4 col-xs-6 pa-0 fade-in fast flex-justified-center ${module.main_class}`" :class="'flex fade-in fast ' + module.main_class"
v-for="( module ,key ) in modules" v-for="( module ,key ) in getModules"
:key="key" :key="key"
:style="`animation-delay: ${key * 0.1}s;`" :style="`animation-delay: ${key * 0.1}s;`"
> >
<icon-tile <icon-tile
:theme="module.title_class" :theme="module.title_class +' Shadowed'"
:class="module.hasModule ? '' : 'has-blur'"
:TitleEn="module.title_en" :TitleEn="module.title_en"
:TitleFa="module.title_fa" :TitleFa="module.title_fa"
:GradientBegin="module.gradient_begin"
:GradientEnd="module.gradient_end"
:icon="module.img_url" :icon="module.img_url"
:height="module.img_height"
:Desc="module.description"
/> />
</a> </a>
</v-row> </v-row>
@ -31,48 +35,39 @@
</template> </template>
<script> <script>
import IconTile from '@Global/components/Tiles/Icon-Tile'; import Tile from "@Global/components/Tiles/Tile";
import {mapGetters, mapActions} from "vuex"; import IconTile from '@Global/components/Tiles/Icon-Tile';
import routes from '@Global/utils/common/routes'; import { mapGetters, mapActions } from "vuex";
import BigSectionTitle from '@Global/components/Dividers/Section-Title-Big'; import routes from '@Global/utils/common/routes';
import BigSectionTitle from '@Global/components/Dividers/Section-Title-Big';
export default {
data: () => ({ export default {
hostname: window.location.hostname, data: () => ({
originHostName: routes.originHostName() hostname : window.location.hostname,
}), originHostName : routes.originHostName()
components: { }),
IconTile, components: {
BigSectionTitle IconTile,
}, BigSectionTitle
computed: { },
...mapGetters("rolePermission", ["getModules", "getAllModules"]), computed: {
...mapGetters("auth", ["getAuthUser"]), ...mapGetters("rolePermission", ["getModules"]),
modules() { ...mapGetters("auth", ["getAuthUser"]),
let modules = this.getAllModules.filter(x => x.load_in_home === "yes"); },
return modules.map(x => { methods: {
if (this.getModules.map(y => y.id).includes(x.id)) { ...mapActions("rolePermission", ["loadModules"]),
x.hasModule = true; },
} else { created() {
x.hasModule = false; this.loadModules({ home_page: true });
} }
return x; };
});
}
},
methods: {
...mapActions("rolePermission", ["loadModules", "loadAllModules"]),
},
created() {
this.loadModules();
this.loadAllModules();
}
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.module.border-left { .container {
border-left: 1px solid #d4d4d4; max-width: 1785px;
} }
</style> </style>

@ -27,7 +27,6 @@ return [
"string" => ":attribute باید بین :min و :max کاراکتر باشد.", "string" => ":attribute باید بین :min و :max کاراکتر باشد.",
"array" => ":attribute باید بین :min و :max آیتم باشد.", "array" => ":attribute باید بین :min و :max آیتم باشد.",
], ],
"after_or_equal" => ":attribute باید بزرگتر یا مساوی :date باشد.",
"boolean" => "The :attribute field must be true or false", "boolean" => "The :attribute field must be true or false",
"confirmed" => ":attribute با تاییدیه مطابقت ندارد.", "confirmed" => ":attribute با تاییدیه مطابقت ندارد.",
"date" => ":attribute یک تاریخ معتبر نیست.", "date" => ":attribute یک تاریخ معتبر نیست.",
@ -36,7 +35,7 @@ return [
"digits" => ":attribute باید :digits رقم باشد.", "digits" => ":attribute باید :digits رقم باشد.",
"digits_between" => ":attribute باید بین :min و :max رقم باشد.", "digits_between" => ":attribute باید بین :min و :max رقم باشد.",
"email" => "فرمت :attribute معتبر نیست.", "email" => "فرمت :attribute معتبر نیست.",
"exists" => "این :attribute معتبر نمی باشد.", "exists" => "این :attribute وجود دارد.",
"image" => ":attribute باید تصویر باشد.", "image" => ":attribute باید تصویر باشد.",
"in" => ":attribute انتخاب شده، معتبر نیست.", "in" => ":attribute انتخاب شده، معتبر نیست.",
"integer" => ":attribute باید نوع داده ای عددی باشد.", "integer" => ":attribute باید نوع داده ای عددی باشد.",
@ -110,7 +109,6 @@ return [
*/ */
'attributes' => [ 'attributes' => [
'today' => 'امروز',
'blog_category_id' => 'دسته بندی', 'blog_category_id' => 'دسته بندی',
'slug' => 'نام انگلیسی', 'slug' => 'نام انگلیسی',
'email' => 'آدرس پست الکترونیکی', 'email' => 'آدرس پست الکترونیکی',

@ -12,5 +12,5 @@
*/ */
Route::view('main/{any?}', 'Home'); Route::view('main/{any?}', 'Home');
Route::view('WebsiteManagement/{any?}', 'WebsiteManagement');
Route::redirect('{any?}/{any1?}/{any3?}', '/main/home'); Route::redirect('{any?}/{any1?}/{any3?}', '/main/home');

@ -3,17 +3,8 @@
namespace Tests; namespace Tests;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase; use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Facades\Http;
abstract class TestCase extends BaseTestCase abstract class TestCase extends BaseTestCase
{ {
use CreatesApplication; use CreatesApplication;
/**
* @return \WM\Core\Services\HttpTestProvider Http request provider for test enviroment
*/
public function makeHttpReqeust($url)
{
return \WM\Core\Services\HttpTestProvider::init($url);
}
} }

15
webpack.mix.js vendored

@ -1,5 +1,4 @@
const mix = require('laravel-mix'); const mix = require('laravel-mix');
const path = require('path');
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Mix Asset Management | Mix Asset Management
@ -33,26 +32,20 @@ mix.webpackConfig({
} }
}); });
mix.js('resources/js/Home/app.js', 'public/js/vue/Home').vue({version: 2}); mix.js('resources/js/Home/app.js', 'public/js/vue/Home');
require('./modules/wm-core/webpack.mix'); require('./modules/wm-core/webpack.mix');
require('./modules/wm-common/webpack.mix'); require('./modules/wm-common/webpack.mix');
require('./modules/wm-crm/webpack.mix'); require('./modules/wm-crm/webpack.mix');
require('./modules/wm-blog/webpack.mix'); require('./modules/wm-blog/webpack.mix');
require('./modules/wm-portfolio/webpack.mix'); require('./modules/wm-portfolio/webpack.mix');
require('./modules/wm-finance/webpack.mix');
require('./modules/wm-product/webpack.mix'); require('./modules/wm-product/webpack.mix');
require('./modules/wm-service/webpack.mix'); require('./modules/wm-service/webpack.mix');
require('./modules/wm-store/webpack.mix'); require('./modules/wm-store/webpack.mix');
require('./modules/wm-warehouse/webpack.mix');
require('./modules/wm-admin/webpack.mix'); require('./modules/wm-admin/webpack.mix');
require('./modules/wm-notification/webpack.mix'); // require('./modules/wm-web-builder/webpack.mix');
require('./modules/wm-roll-call/webpack.mix');
require('./modules/wm-finance/webpack.mix');
require('./modules/wm-app-management/webpack.mix');
require('./modules/wm-web-builder/webpack.mix');
require('./modules/wm-lms/webpack.mix');
require('./modules/wm-service-store/webpack.mix');
// require('./modules/wm-warehouse/webpack.mix');
// require('./modules/wm-reservation/webpack.mix'); // require('./modules/wm-reservation/webpack.mix');
require('./modules/wm-contact-us/webpack.mix');
mix.version(); mix.version();

@ -1,58 +0,0 @@
const mix = require('laravel-mix');
const path = require('path');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.webpackConfig({
resolve: {
extensions: ["*", ".js", ".jsx", ".vue", ".ts", ".tsx", '.json', '.d.ts'],
alias: {
'@JS': path.resolve(__dirname, 'resources/js'),
'@Home': path.resolve(__dirname, 'resources/js/Home'),
},
},
output: {
chunkFilename: 'js/vue/chunks/[name].[chunkhash].js',
},
module: {
rules: [
{
test: /\.ts$/,
loader: "ts-loader",
options: { appendTsSuffixTo: [/\.vue$/] },
exclude: /node_modules/
}
]
}
});
mix.js('resources/js/Home/app.js', 'public/js/vue/Home').vue({version: 2});
require('./modules/wm-core/webpack.mix');
require('./modules/wm-common/webpack.mix');
require('./modules/wm-crm/webpack.mix');
require('./modules/wm-blog/webpack.mix');
require('./modules/wm-portfolio/webpack.mix');
require('./modules/wm-product/webpack.mix');
require('./modules/wm-service/webpack.mix');
require('./modules/wm-store/webpack.mix');
require('./modules/wm-admin/webpack.mix');
require('./modules/wm-notification/webpack.mix');
require('./modules/wm-roll-call/webpack.mix');
require('./modules/wm-finance/webpack.mix');
require('./modules/wm-app-management/webpack.mix');
require('./modules/wm-web-builder/webpack.mix');
require('./modules/wm-lms/webpack.mix');
require('./modules/wm-service-store/webpack.mix');
require('./modules/wm-contact-us/webpack.mix');
// require('./modules/wm-warehouse/webpack.mix');
// require('./modules/wm-reservation/webpack.mix');
mix.version();

@ -1,59 +0,0 @@
const mix = require('laravel-mix');
const path = require('path');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.webpackConfig({
resolve: {
extensions: ["*", ".js", ".jsx", ".vue", ".ts", ".tsx", '.json', '.d.ts'],
alias: {
'@JS': path.resolve(__dirname, 'resources/js'),
'@Home': path.resolve(__dirname, 'resources/js/Home'),
},
},
output: {
chunkFilename: 'js/vue/chunks/[name].[chunkhash].js',
},
module: {
rules: [
{
test: /\.ts$/,
loader: "ts-loader",
options: { appendTsSuffixTo: [/\.vue$/] },
exclude: /node_modules/
}
]
}
});
mix.js('resources/js/Home/app.js', 'public/js/vue/Home').vue({version: 2});
require('./vendeor/wm/core/webpack.mix');
require('./vendeor/wm/common/webpack.mix');
require('./vendeor/wm/crm/webpack.mix');
require('./vendeor/wm/blog/webpack.mix');
require('./vendeor/wm/portfolio/webpack.mix');
require('./vendeor/wm/product/webpack.mix');
require('./vendeor/wm/service/webpack.mix');
require('./vendeor/wm/store/webpack.mix');
require('./vendeor/wm/admin/webpack.mix');
require('./vendeor/wm/notification/webpack.mix');
require('./vendeor/wm/roll-call/webpack.mix');
require('./vendeor/wm/finance/webpack.mix');
require('./vendeor/wm/app-management/webpack.mix');
require('./vendeor/wm/web-builder/webpack.mix');
require('./vendeor/wm/service-store/webpack.mix');
require('./vendeor/wm/lms/webpack.mix');
require('./vendeor/wm/service-store/webpack.mix');
require('./vendeor/wm/contact-us/webpack.mix');
// require('./vendeor/wm/warehouse/webpack.mix');
// require('./vendeor/wm/reservation/webpack.mix');
mix.version();

@ -1,55 +0,0 @@
[supervisord]
nodaemon=true
user = root
[supervisorctl]
[inet_http_server]
port = 127.0.0.1:9001
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:scheduler]
process_name=%(program_name)s_%(process_num)02d
command=/bin/sh -c "while [ true ]; do (php /var/www/html/artisan schedule:run --verbose --no-interaction &); sleep 60; done"
autostart=true
autorestart=true
numprocs=1
user=www-data
redirect_stderr=true
stdout_logfile=/var/log/supervisor/scheduler.log
[program:change-store-order-status]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/artisan queue:work redis --queue=change_to_successful_store_order --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=3
redirect_stderr=true
stopwaitsecs=3600
stdout_logfile=/var/log/supervisor/change-store-order-status.log
[program:create-store-product]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/artisan queue:work redis --queue=create_store_product --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=3
redirect_stderr=true
stopwaitsecs=3600
stdout_logfile=/var/log/supervisor/create-store-product.log
# [program:check-sms-status]
# command=php /var/www/html/artisan queue:work redis --queue=check-sms-status --tries=3
# process_name=%(program_name)s_%(process_num)02d
# autostart=true
# autorestart=true
# user=www-data
# numprocs=3
# redirect_stderr=true
# stdout_logfile=/var/log/supervisor/sms-status.log

14934
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save