From 24f77daec19666232c85df33cab0d0067def410b Mon Sep 17 00:00:00 2001 From: saeid_01 Date: Sat, 1 May 2021 23:16:42 +0000 Subject: [PATCH 01/16] Update 'webpack.mix.js' --- webpack.mix.js | 1 + 1 file changed, 1 insertion(+) diff --git a/webpack.mix.js b/webpack.mix.js index 3ee9bed..b5e0583 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -45,6 +45,7 @@ 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-web-builder/webpack.mix'); //require('./modules/wm-warehouse/webpack.mix'); From d2649936a3594692464a2b7b12316a3d9e221f2a Mon Sep 17 00:00:00 2001 From: azizi Date: Tue, 21 Sep 2021 14:02:14 +0000 Subject: [PATCH 02/16] Update '.gitignore' --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 0b81d17..fd1ded0 100644 --- a/.gitignore +++ b/.gitignore @@ -152,3 +152,5 @@ fabric.properties # Recommended template: Node.gitignore dist/ + + From 6dd982b1e7d7b35cba41a8f1590d834180efcc65 Mon Sep 17 00:00:00 2001 From: saeid_01 Date: Tue, 28 Sep 2021 10:29:58 +0000 Subject: [PATCH 03/16] Update 'Dockerfile' --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 769edbf..7b79dd9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ COPY database /var/www/database COPY composer-prod.* /var/www/ -RUN composer clearcache && COMPOSER=composer-prod.json composer update --no-scripts +RUN composer clearcache && COMPOSER=composer-prod.json composer install --no-scripts COPY . /var/www From 397008d1ccc4271b95775dc875ff45b8e4d85bfd Mon Sep 17 00:00:00 2001 From: azizi Date: Thu, 30 Sep 2021 16:41:42 +0000 Subject: [PATCH 04/16] Update '.gitattributes' --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 967315d..dbb821a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,3 +3,4 @@ *.scss linguist-vendored *.js linguist-vendored CHANGELOG.md export-ignore + From 462237cb960e7a581a802d24a8834357d1189565 Mon Sep 17 00:00:00 2001 From: "f.saravi" Date: Wed, 6 Oct 2021 18:00:13 +0000 Subject: [PATCH 05/16] Update 'Dockerfile' --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7b79dd9..b2046a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM dfs1368/laravel-php-fpm:7.4 +FROM dfs1368/laravel-php-fpm:7.4.1 WORKDIR /var/www From 0a25211f5b7e4c6212a501fa6ced09744cba9960 Mon Sep 17 00:00:00 2001 From: "f.saravi" Date: Wed, 6 Oct 2021 18:25:35 +0000 Subject: [PATCH 06/16] Update 'Dockerfile' --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b2046a8..7b79dd9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM dfs1368/laravel-php-fpm:7.4.1 +FROM dfs1368/laravel-php-fpm:7.4 WORKDIR /var/www From 766b63e61f278cc79f60119150818744f6278ec5 Mon Sep 17 00:00:00 2001 From: azizi Date: Mon, 25 Oct 2021 15:28:08 +0000 Subject: [PATCH 07/16] Update 'app/Console/Kernel.php' --- app/Console/Kernel.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 4a59bdd..58d5f72 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -29,6 +29,7 @@ class Kernel extends ConsoleKernel $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('make:sitemap')->daily(); # make sitemap } /** From 8213e289a7bc45f9c3759564f8db098b02637db8 Mon Sep 17 00:00:00 2001 From: azizi Date: Mon, 25 Oct 2021 16:42:49 +0000 Subject: [PATCH 08/16] Update 'app/Exceptions/Handler.php' --- app/Exceptions/Handler.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index a464486..7c471e8 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -6,6 +6,8 @@ use Throwable; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use WM\Core\Exceptions\ValidationErrorException; use WM\Core\Services\Responser; +use WM\WebBuilder\Exceptions\SiteBannedException; + class Handler extends ExceptionHandler { @@ -54,7 +56,10 @@ class Handler extends ExceptionHandler { if ($exception instanceof ValidationErrorException) { return response()->json(Responser::error($exception->getMessageBody(), $exception->getMessageInfo()), 422); + } elseif ($exception instanceof SiteBannedException) { + return response()->view('webBuilder::errors.template_disabled', ['error' => 'business banned']); } + return parent::render($request, $exception); } } From aeafb60f0c0a19989bfd9c87092bfa11f88463b1 Mon Sep 17 00:00:00 2001 From: azizi Date: Tue, 26 Oct 2021 16:49:12 +0000 Subject: [PATCH 09/16] Update 'app/Exceptions/Handler.php' --- app/Exceptions/Handler.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 7c471e8..7323ea7 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,13 +2,13 @@ namespace App\Exceptions; -use Throwable; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; +use Throwable; +use WM\Core\Exceptions\HasRelationException; use WM\Core\Exceptions\ValidationErrorException; use WM\Core\Services\Responser; use WM\WebBuilder\Exceptions\SiteBannedException; - class Handler extends ExceptionHandler { /** @@ -33,7 +33,7 @@ class Handler extends ExceptionHandler /** * Report or log an exception. * - * @param \Throwable $exception + * @param \Throwable $exception * @return void */ public function report(Throwable $exception) @@ -48,8 +48,8 @@ class Handler extends ExceptionHandler /** * Render an exception into an HTTP response. * - * @param \Illuminate\Http\Request $request - * @param \Throwable $exception + * @param \Illuminate\Http\Request $request + * @param \Throwable $exception * @return \Illuminate\Http\Response */ public function render($request, Throwable $exception) @@ -58,6 +58,8 @@ class Handler extends ExceptionHandler 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); } return parent::render($request, $exception); From 7f577d8ffcdd3d10134e2f53f938e4ff679bef5b Mon Sep 17 00:00:00 2001 From: azizi Date: Mon, 1 Nov 2021 06:35:34 +0000 Subject: [PATCH 10/16] Update '.gitignore' --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index fd1ded0..0b81d17 100644 --- a/.gitignore +++ b/.gitignore @@ -152,5 +152,3 @@ fabric.properties # Recommended template: Node.gitignore dist/ - - From a8fe7ea630bdcaf45b866743889277dc2c6cf98a Mon Sep 17 00:00:00 2001 From: saeid Date: Tue, 2 Nov 2021 19:20:46 +0330 Subject: [PATCH 11/16] fix --- package-lock.json | 5 +++++ package.json | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 13442c4..d5c55a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12249,6 +12249,11 @@ "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", "dev": true }, + "willatoast": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/willatoast/-/willatoast-1.1.1.tgz", + "integrity": "sha512-tf37LFQSErMh2+apOlQZAdan00MaqKeDAE2SEmglHzU+dQi3ykNy1VXSuDYmE3BQ3PSLKVwzBB9tItCC2+FXew==" + }, "wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", diff --git a/package.json b/package.json index 76e5a51..f42953d 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "dependencies": { "@riophae/vue-treeselect": "^0.4.0", "@tinymce/tinymce-vue": "^3.0.1", - "vue-tinymce-editor": "^1.6.2", "apexcharts": "^3.27.1", "axios": "^0.21.1", "babel-polyfill": "^6.26.0", @@ -45,8 +44,10 @@ "vue-range-component": "^1.0.3", "vue-router": "^3.0.2", "vue-select": "^3.11.2", + "vue-tinymce-editor": "^1.6.2", "vue2-dropzone": "^3.6.0", - "vuetify": "^2.5.4" + "vuetify": "^2.5.4", + "willatoast": "^1.1.1" }, "devDependencies": { "@babel/plugin-syntax-dynamic-import": "^7.2.0", From 26ba4ae40cf778095b44179cb466b3f8fa598d43 Mon Sep 17 00:00:00 2001 From: saeid Date: Sun, 28 Nov 2021 11:53:37 +0330 Subject: [PATCH 12/16] feat: add translate --- resources/lang/fa/validation.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/lang/fa/validation.php b/resources/lang/fa/validation.php index 81eb67d..76170c3 100644 --- a/resources/lang/fa/validation.php +++ b/resources/lang/fa/validation.php @@ -27,6 +27,7 @@ return [ "string" => ":attribute باید بین :min و :max کاراکتر باشد.", "array" => ":attribute باید بین :min و :max آیتم باشد.", ], + "after_or_equal" => ":attribute باید بزرگتر یا مساوی :date باشد.", "boolean" => "The :attribute field must be true or false", "confirmed" => ":attribute با تاییدیه مطابقت ندارد.", "date" => ":attribute یک تاریخ معتبر نیست.", @@ -109,6 +110,7 @@ return [ */ 'attributes' => [ + 'today' => 'امروز', 'blog_category_id' => 'دسته بندی', 'slug' => 'نام انگلیسی', 'email' => 'آدرس پست الکترونیکی', From e87dda977a8de3c815404800a30b134dfebfe6e7 Mon Sep 17 00:00:00 2001 From: azizi Date: Wed, 22 Dec 2021 15:22:10 +0000 Subject: [PATCH 13/16] Update '.editorconfig' --- .editorconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 6f313c6..9a9710a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,4 +12,4 @@ trim_trailing_whitespace = true trim_trailing_whitespace = false [*.yml] -indent_size = 2 +indent_size = 2 \ No newline at end of file From 1622fd90839ab5db1464d8bad78c46a6b34d335b Mon Sep 17 00:00:00 2001 From: "f.saravi" Date: Sat, 15 Jan 2022 04:45:00 +0000 Subject: [PATCH 14/16] Update 'Dockerfile' --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 7b79dd9..079dfd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,3 +23,4 @@ RUN chown -R www-data:www-data \ /var/www/public \ /var/www/storage \ /var/www/bootstrap/cache + From c94ed06f419c716aeb64bea059e5557b7e9d0fce Mon Sep 17 00:00:00 2001 From: farid Date: Sat, 15 Jan 2022 08:36:14 +0330 Subject: [PATCH 15/16] feat: add basic staging step in jenkins file --- Jenkinsfile | 58 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4dbea50..7de062f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,30 +1,38 @@ pipeline { - agent { - node { - label 'willa' + agent { + node { + label 'willa' + } } - - } - stages { - stage('build') { - 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' - } + stages { + stage('build') { + 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 ...' + } + } } - - stage('deploy') { - 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' - } + environment { + IMAGE_NAME = 'willaengine' } - - } - environment { - IMAGE_NAME = 'willaengine' - } } From f6967fae4f5b8bb1dabd6afe54b424b340a2c247 Mon Sep 17 00:00:00 2001 From: farid Date: Sat, 15 Jan 2022 08:42:20 +0330 Subject: [PATCH 16/16] fix: build staging in production --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 7de062f..4a1924f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,6 +6,9 @@ pipeline { } 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'