product
Alireza Hassani 4 years ago
parent 0b44bf804f
commit 9f0c84fffc

BIN
.rnd

Binary file not shown.

@ -2,7 +2,7 @@
namespace App\Exceptions; namespace App\Exceptions;
use Exception; use Throwable;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
@ -29,10 +29,10 @@ class Handler extends ExceptionHandler
/** /**
* Report or log an exception. * Report or log an exception.
* *
* @param \Exception $exception * @param \Throwable $exception
* @return void * @return void
*/ */
public function report(Exception $exception) public function report(Throwable $exception)
{ {
parent::report($exception); parent::report($exception);
} }
@ -41,10 +41,10 @@ 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 \Exception $exception * @param \Throwable $exception
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function render($request, Exception $exception) public function render($request, Throwable $exception)
{ {
return parent::render($request, $exception); return parent::render($request, $exception);
} }

@ -8,15 +8,15 @@
], ],
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^7.2", "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",
"kalnoy/nestedset": "^5.0", "laravel/framework": "^8.0",
"laravel/framework": "^6.2", "laravel/passport": "^10",
"laravel/passport": "^7.3", "laravel/tinker": "^2.0",
"laravel/tinker": "^1.0",
"maatwebsite/excel": "^3.1", "maatwebsite/excel": "^3.1",
"spatie/laravel-medialibrary": "^7.0.0", "nestedset/willaarts": "^5.0.7",
"spatie/laravel-medialibrary": "^8.0.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",
@ -24,17 +24,17 @@
"wm/portfolio": "dev-master", "wm/portfolio": "dev-master",
"wm/product": "dev-master", "wm/product": "dev-master",
"wm/service": "dev-master", "wm/service": "dev-master",
"wm/store": "dev-master",
"wm/warehouse": "dev-master",
"wm/finance": "dev-master",
"zircote/swagger-php": "^3.0" "zircote/swagger-php": "^3.0"
}, },
"provide": {
"ext-imagick": "*"
},
"require-dev": { "require-dev": {
"facade/ignition": "^1.4", "facade/ignition": "^2.3.6",
"fzaninotto/faker": "^1.4", "fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0", "nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^8.0" "phpunit/phpunit": "^9.0"
}, },
"config": { "config": {
"optimize-autoloader": true, "optimize-autoloader": true,
@ -103,18 +103,6 @@
{ {
"type": "path", "type": "path",
"url": "./modules/wm-service" "url": "./modules/wm-service"
},
{
"type": "path",
"url": "./modules/wm-store"
},
{
"type": "path",
"url": "./modules/wm-warehouse"
},
{
"type": "path",
"url": "./modules/wm-finance"
} }
] ]
} }

4848
composer.lock generated

File diff suppressed because it is too large Load Diff

@ -38,9 +38,7 @@ return [
| application. If disabled, a simple generic error page is shown. | application. If disabled, a simple generic error page is shown.
| |
*/ */
'debug' => (bool) env('APP_DEBUG', false),
'debug' => env('APP_DEBUG', false),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Application URL | Application URL

@ -0,0 +1,34 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/
'paths' => ['api/*'],
'allowed_methods' => ['*'],
'allowed_origins' => ['*'],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => false,
];

@ -1,5 +1,7 @@
<?php <?php
use Illuminate\Support\Str;
return [ return [
/* /*
@ -35,6 +37,7 @@ return [
'sqlite' => [ 'sqlite' => [
'driver' => 'sqlite', 'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')), 'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '', 'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true), 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
@ -42,6 +45,7 @@ return [
'mysql' => [ 'mysql' => [
'driver' => 'mysql', 'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'), 'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'), 'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
@ -52,12 +56,16 @@ return [
'collation' => 'utf8mb4_unicode_ci', 'collation' => 'utf8mb4_unicode_ci',
'prefix' => '', 'prefix' => '',
'prefix_indexes' => true, 'prefix_indexes' => true,
'strict' => false, 'strict' => true,
'engine' => null, 'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
], ],
'pgsql' => [ 'pgsql' => [
'driver' => 'pgsql', 'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'), 'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'), 'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
@ -72,6 +80,7 @@ return [
'sqlsrv' => [ 'sqlsrv' => [
'driver' => 'sqlsrv', 'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'), 'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'), 'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
@ -110,20 +119,27 @@ return [
'redis' => [ 'redis' => [
'client' => 'predis', 'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
],
'default' => [ 'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', 0), 'database' => env('REDIS_DB', '0'),
], ],
'cache' => [ 'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', 1), 'database' => env('REDIS_CACHE_DB', '1'),
], ],
], ],

@ -13,7 +13,7 @@ return [
| |
*/ */
'default' => env('FILESYSTEM_DRIVER', 'local'), 'default' => env('FILESYSTEM_DRIVER', 'public'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -51,7 +51,7 @@ return [
'public' => [ 'public' => [
'driver' => 'local', 'driver' => 'local',
'root' => storage_path('app/public'), 'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage', 'url' => env('APP_URL').'/',
'visibility' => 'public', 'visibility' => 'public',
], ],
@ -62,11 +62,14 @@ return [
'region' => env('AWS_DEFAULT_REGION'), 'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'), 'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'), 'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
], ],
'media_dev' => [ 'media_dev' => [
'driver' => 'local', 'driver' => 'local',
'root' => public_path(), 'root' => public_path(),
'url' => '',
'visibility' => 'public'
], ],
'media' => [ 'media' => [
@ -80,4 +83,18 @@ return [
], ],
/*
|--------------------------------------------------------------------------
| Symbolic Links
|--------------------------------------------------------------------------
|
| Here you may configure the symbolic links that will be created when the
| `storage:link` Artisan command is executed. The array keys should be
| the locations of the links and the values should be their targets.
|
*/
'links' => [
public_path('/storage') => storage_path('app/public'),
],
]; ];

@ -1,5 +1,6 @@
<?php <?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler; use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler; use Monolog\Handler\SyslogUdpHandler;
@ -36,19 +37,20 @@ return [
'channels' => [ 'channels' => [
'stack' => [ 'stack' => [
'driver' => 'stack', 'driver' => 'stack',
'channels' => ['daily'], 'channels' => ['single'],
'ignore_exceptions' => false,
], ],
'single' => [ 'single' => [
'driver' => 'single', 'driver' => 'single',
'path' => storage_path('logs/laravel.log'), 'path' => storage_path('logs/laravel.log'),
'level' => 'debug', 'level' => env('LOG_LEVEL', 'debug'),
], ],
'daily' => [ 'daily' => [
'driver' => 'daily', 'driver' => 'daily',
'path' => storage_path('logs/laravel.log'), 'path' => storage_path('logs/laravel.log'),
'level' => 'debug', 'level' => env('LOG_LEVEL', 'debug'),
'days' => 14, 'days' => 14,
], ],
@ -57,12 +59,12 @@ return [
'url' => env('LOG_SLACK_WEBHOOK_URL'), 'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'Laravel Log', 'username' => 'Laravel Log',
'emoji' => ':boom:', 'emoji' => ':boom:',
'level' => 'critical', 'level' => env('LOG_LEVEL', 'critical'),
], ],
'papertrail' => [ 'papertrail' => [
'driver' => 'monolog', 'driver' => 'monolog',
'level' => 'debug', 'level' => env('LOG_LEVEL', 'debug'),
'handler' => SyslogUdpHandler::class, 'handler' => SyslogUdpHandler::class,
'handler_with' => [ 'handler_with' => [
'host' => env('PAPERTRAIL_URL'), 'host' => env('PAPERTRAIL_URL'),
@ -81,12 +83,21 @@ return [
'syslog' => [ 'syslog' => [
'driver' => 'syslog', 'driver' => 'syslog',
'level' => 'debug', 'level' => env('LOG_LEVEL', 'debug'),
], ],
'errorlog' => [ 'errorlog' => [
'driver' => 'errorlog', 'driver' => 'errorlog',
'level' => 'debug', 'level' => env('LOG_LEVEL', 'debug'),
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
], ],
], ],

@ -4,45 +4,73 @@ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Mail Driver | Default Mailer
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Laravel supports both SMTP and PHP's "mail" function as drivers for the | This option controls the default mailer that is used to send any email
| sending of e-mail. You may specify which one you're using throughout | messages sent by your application. Alternative mailers may be setup
| your application here. By default, Laravel is setup for SMTP mail. | and used as needed; however, this mailer will be used by default.
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
| "sparkpost", "log", "array"
| |
*/ */
'driver' => env('MAIL_DRIVER', 'smtp'), 'default' => env('MAIL_MAILER', 'smtp'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| SMTP Host Address | Mailer Configurations
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Here you may provide the host address of the SMTP server used by your | Here you may configure all of the mailers used by your application plus
| applications. A default option is provided that is compatible with | their respective settings. Several examples have been configured for
| the Mailgun mail service which will provide reliable deliveries. | you and you are free to add your own as your application requires.
| |
*/ | Laravel supports a variety of mail "transport" drivers to be used while
| sending an e-mail. You will specify which one you are using for your
'host' => env('MAIL_HOST', 'smtp.mailgun.org'), | mailers below. You are free to add additional mailers as required.
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
| |
| This is the SMTP port used by your application to deliver e-mails to | Supported: "smtp", "sendmail", "mailgun", "ses",
| users of the application. Like the host we have set this value to | "postmark", "log", "array"
| stay compatible with the Mailgun e-mail application by default.
| |
*/ */
'port' => env('MAIL_PORT', 587), 'mailers' => [
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'auth_mode' => null,
],
'ses' => [
'transport' => 'ses',
],
'mailgun' => [
'transport' => 'mailgun',
],
'postmark' => [
'transport' => 'postmark',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => '/usr/sbin/sendmail -bs',
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -60,47 +88,6 @@ return [
'name' => env('MAIL_FROM_NAME', 'Example'), 'name' => env('MAIL_FROM_NAME', 'Example'),
], ],
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Markdown Mail Settings | Markdown Mail Settings
@ -120,17 +107,4 @@ return [
], ],
], ],
/*
|--------------------------------------------------------------------------
| Log Channel
|--------------------------------------------------------------------------
|
| If you are using the "log" driver, you may specify the logging channel
| if you prefer to keep mail messages separate from other log entries
| for simpler reading. Otherwise, the default channel will be used.
|
*/
'log_channel' => env('MAIL_LOG_CHANNEL'),
]; ];

@ -20,17 +20,16 @@ return [
*/ */
'queue_name' => '', 'queue_name' => '',
/*
* By default all conversions will be performed on a queue.
*/
'queue_conversions_by_default' => env('QUEUE_CONVERSIONS_BY_DEFAULT', true),
/* /*
* The fully qualified class name of the media model. * The fully qualified class name of the media model.
*/ */
'media_model' => WM\Common\Services\Media\Media::class, 'media_model' => WM\Common\Services\Media\Media::class,
's3' => [
/*
* The domain that should be prepended when generating urls.
*/
'domain' => 'https://cdn.willaspace.com/' . env('MINIO_BUCKET') ,
],
'remote' => [ 'remote' => [
/* /*
@ -71,11 +70,28 @@ return [
], ],
/* /*
* When urls to files get generated, this class will be called. Leave empty * When converting Media instances to response the media library will add
* if your files are stored locally above the site root or on s3. * a `loading` attribute to the `img` tag. Here you can set the default
* value of that attribute.
*
* Possible values: 'lazy', 'eager', 'auto' or null if you don't want to set any loading instruction.
*
* More info: https://css-tricks.com/native-lazy-loading/
*/ */
'url_generator' => env('MEDIA_DISK', 'media') != 'media' ? null : 'WM\Common\Services\Media\UrlGenerator\S3UrlGenerator', 'default_loading_attribute_value' => null,
/*
* This is the class that is responsible for naming conversion files. By default,
* it will use the filename of the original and concatenate the conversion name to it.
*/
'conversion_file_namer' => Spatie\MediaLibrary\Conversions\DefaultConversionFileNamer::class,
/*
* When urls to files get generated, this class will be called. Use the default
* if your files are stored locally above the site root or on s3.
*/
'url_generator' => Spatie\MediaLibrary\Support\UrlGenerator\DefaultUrlGenerator::class ,
/* /*
* Whether to activate versioning when urls to files get generated. * Whether to activate versioning when urls to files get generated.
* When activated, this attaches a ?v=xx query string to the URL. * When activated, this attaches a ?v=xx query string to the URL.
@ -85,7 +101,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' => 'WM\Common\Services\Media\PathGenerator', 'path_generator' => WM\Common\Services\Media\PathGenerator::class,
/* /*
* Medialibrary will try to optimize all converted images by removing * Medialibrary will try to optimize all converted images by removing
@ -118,18 +134,18 @@ return [
* These generators will be used to create an image of media files. * These generators will be used to create an image of media files.
*/ */
'image_generators' => [ 'image_generators' => [
Spatie\MediaLibrary\ImageGenerators\FileTypes\Image::class, Spatie\MediaLibrary\Conversions\ImageGenerators\Image::class,
Spatie\MediaLibrary\ImageGenerators\FileTypes\Webp::class, Spatie\MediaLibrary\Conversions\ImageGenerators\Webp::class,
Spatie\MediaLibrary\ImageGenerators\FileTypes\Pdf::class, Spatie\MediaLibrary\Conversions\ImageGenerators\Pdf::class,
Spatie\MediaLibrary\ImageGenerators\FileTypes\Svg::class, Spatie\MediaLibrary\Conversions\ImageGenerators\Svg::class,
Spatie\MediaLibrary\ImageGenerators\FileTypes\Video::class, Spatie\MediaLibrary\Conversions\ImageGenerators\Video::class
], ],
/* /*
* The engine that should perform the image conversions. * The engine that should perform the image conversions.
* Should be either `gd` or `imagick`. * Should be either `gd` or `imagick`.
*/ */
'image_driver' => env( 'IMAGE_DRIVER','imagick'), 'image_driver' => env( 'IMAGE_DRIVER','gd'),
/* /*
* FFMPEG & FFProbe binaries paths, only used if you try to generate video * FFMPEG & FFProbe binaries paths, only used if you try to generate video
@ -150,8 +166,8 @@ return [
* your custom jobs extend the ones provided by the package. * your custom jobs extend the ones provided by the package.
*/ */
'jobs' => [ 'jobs' => [
'perform_conversions' => Spatie\MediaLibrary\Jobs\PerformConversions::class, 'perform_conversions' => Spatie\MediaLibrary\Conversions\Jobs\PerformConversionsJob::class,
'generate_responsive_images' => Spatie\MediaLibrary\Jobs\GenerateResponsiveImages::class, 'generate_responsive_images' => Spatie\MediaLibrary\ResponsiveImages\Jobs\GenerateResponsiveImagesJob::class,
], ],
'wm-cdn' => 'https://cdn.willaspace.com', 'wm-cdn' => 'https://cdn.willaspace.com',

@ -46,6 +46,7 @@ return [
'host' => 'localhost', 'host' => 'localhost',
'queue' => 'default', 'queue' => 'default',
'retry_after' => 90, 'retry_after' => 90,
'block_for' => 0,
], ],
'sqs' => [ 'sqs' => [
@ -79,6 +80,7 @@ return [
*/ */
'failed' => [ 'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
'database' => env('DB_CONNECTION', 'mysql'), 'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs', 'table' => 'failed_jobs',
], ],

@ -188,12 +188,12 @@ return [
| |
| This option determines how your cookies behave when cross-site requests | This option determines how your cookies behave when cross-site requests
| take place, and can be used to mitigate CSRF attacks. By default, we | take place, and can be used to mitigate CSRF attacks. By default, we
| do not enable this as other CSRF protection services are in place. | will set this value to "lax" since this is a secure default value.
| |
| Supported: "lax", "strict" | Supported: "lax", "strict", "none", null
| |
*/ */
'same_site' => null, 'same_site' => 'lax',
]; ];

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCacheTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('cache', function (Blueprint $table) {
$table->string('key')->unique();
$table->mediumText('value');
$table->integer('expiration');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('cache');
}
}

117
package-lock.json generated

@ -4007,6 +4007,59 @@
"once": "^1.4.0" "once": "^1.4.0"
} }
}, },
"enhanced-resolve": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz",
"integrity": "sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.2",
"memory-fs": "^0.5.0",
"tapable": "^1.0.0"
},
"dependencies": {
"memory-fs": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz",
"integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==",
"dev": true,
"requires": {
"errno": "^0.1.3",
"readable-stream": "^2.0.1"
}
},
"readable-stream": {
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
"integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
"dev": true,
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
"dev": true
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
"safe-buffer": "~5.1.0"
}
}
}
},
"entities": { "entities": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz",
@ -11665,6 +11718,64 @@
"tslib": "^1.9.3" "tslib": "^1.9.3"
} }
}, },
"ts-loader": {
"version": "8.0.11",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-8.0.11.tgz",
"integrity": "sha512-06X+mWA2JXoXJHYAesUUL4mHFYhnmyoCdQVMXofXF552Lzd4wNwSGg7unJpttqUP7ziaruM8d7u8LUB6I1sgzA==",
"dev": true,
"requires": {
"chalk": "^2.3.0",
"enhanced-resolve": "^4.0.0",
"loader-utils": "^1.0.2",
"micromatch": "^4.0.0",
"semver": "^6.0.0"
},
"dependencies": {
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"requires": {
"fill-range": "^7.0.1"
}
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"requires": {
"to-regex-range": "^5.0.1"
}
},
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
},
"micromatch": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
"integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
"dev": true,
"requires": {
"braces": "^3.0.1",
"picomatch": "^2.0.5"
}
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"requires": {
"is-number": "^7.0.0"
}
}
}
},
"tslib": { "tslib": {
"version": "1.10.0", "version": "1.10.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
@ -11707,6 +11818,12 @@
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
"dev": true "dev": true
}, },
"typescript": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.2.tgz",
"integrity": "sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==",
"dev": true
},
"uglify-js": { "uglify-js": {
"version": "3.4.10", "version": "3.4.10",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.10.tgz",

@ -76,6 +76,8 @@
"pug-plain-loader": "^1.0.0", "pug-plain-loader": "^1.0.0",
"sass": "^1.22.12", "sass": "^1.22.12",
"sass-loader": "^7.3.1", "sass-loader": "^7.3.1",
"ts-loader": "^8.0.11",
"typescript": "^4.1.2",
"vue": "^2.6.10", "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",

@ -1,60 +1,55 @@
<?php <?php
/** use Illuminate\Contracts\Http\Kernel;
* Laravel - A PHP Framework For Web Artisans use Illuminate\Http\Request;
*
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
define('LARAVEL_START', microtime(true)); define('LARAVEL_START', microtime(true));
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Register The Auto Loader | Check If Application Is Under Maintenance
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Composer provides a convenient, automatically generated class loader for | If the application is maintenance / demo mode via the "down" command we
| our application. We just need to utilize it! We'll simply require it | will require this file so that any prerendered template can be shown
| into the script here so that we don't have to worry about manual | instead of starting the framework, which could cause an exception.
| loading any of our classes later on. It feels great to relax.
| |
*/ */
require __DIR__.'/../vendor/autoload.php'; if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
require __DIR__.'/../storage/framework/maintenance.php';
}
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Turn On The Lights | Register The Auto Loader
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| We need to illuminate PHP development, so let us turn on the lights. | Composer provides a convenient, automatically generated class loader for
| This bootstraps the framework and gets it ready for use, then it | this application. We just need to utilize it! We'll simply require it
| will load up this application so that we can run it and send | into the script here so we don't need to manually load our classes.
| the responses back to the browser and delight our users.
| |
*/ */
$app = require_once __DIR__.'/../bootstrap/app.php'; require __DIR__.'/../vendor/autoload.php';
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Run The Application | Run The Application
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Once we have the application, we can handle the incoming request | Once we have the application, we can handle the incoming request using
| through the kernel, and send the associated response back to | the application's HTTP kernel. Then, we will send the response back
| the client's browser allowing them to enjoy the creative | to this client's browser, allowing them to enjoy our application.
| and wonderful application we have prepared for them.
| |
*/ */
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); $app = require_once __DIR__.'/../bootstrap/app.php';
$response = $kernel->handle( $kernel = $app->make(Kernel::class);
$request = Illuminate\Http\Request::capture()
);
$response->send(); $response = tap($kernel->handle(
$request = Request::capture()
))->send();
$kernel->terminate($request, $response); $kernel->terminate($request, $response);

@ -1,6 +1,6 @@
<template> <template>
<div :class="`we-number ${theme}`"> <div :class="`we-number ${theme}`">
<div class="icon-and-number"> <div class="flex-justified-right">
<v-icon v-if="prepend_icon" class="prepend-icon">WMi-{{ prepend_icon}} </v-icon> <v-icon v-if="prepend_icon" class="prepend-icon">WMi-{{ prepend_icon}} </v-icon>
<div class="number En Bold" v-html="number"></div> <div class="number En Bold" v-html="number"></div>
<v-icon v-if="append_icon" class="append-icon">WMi-{{ append_icon }} </v-icon> <v-icon v-if="append_icon" class="append-icon">WMi-{{ append_icon }} </v-icon>
@ -32,18 +32,9 @@
opacity: 0.7; opacity: 0.7;
text-align: left; text-align: left;
} }
.we-number .icon-and-number {
display: flex;
justify-content: start;
align-items: center;
}
.we-number.label-center .label { .we-number.label-center .label {
text-align: center; text-align: center;
} }
.we-number.label-center .icon-and-number {
justify-content: center;
align-items: center;
}

@ -1,8 +1,8 @@
<template> <template>
<div :class="`RTL text-lg-right section-title ${theme} ${(icon) ? 'icon-visible' : ''}`"> <div :class="`RTL text-lg-right section-title ${theme} ${(icon) ? 'icon-visible' : ''}`">
<v-icon v-if="icon" :color="color" class="icon">WMi-{{icon}}</v-icon> <v-icon v-if="icon" :color="color">WMi-{{icon}}</v-icon>
<div v-if="letterIcon" :class="`letter-icon En Bold ${color}--text`" >{{ letterIcon }}</div> <div v-if="letterIcon" :class="`letter-icon En Bold ${color}--text`" >{{ letterIcon }}</div>
<div v-if="number" :class='"step En Bold color-"+color+""' v-text="number"></div> <div v-if="number" :class='"step En color-"+color+""' v-text="number"></div>
<div class="Title"> <div class="Title">
<div class="Fa" v-text="titleFa"></div> <div class="Fa" v-text="titleFa"></div>
<div class="En" v-text="titleEn"></div> <div class="En" v-text="titleEn"></div>
@ -51,11 +51,6 @@ export default {
font-size: 40px; font-size: 40px;
margin-left: 10px; margin-left: 10px;
} }
.section-title.icon-absolute .letter-icon, .section-title.icon-absolute .icon {
position: absolute;
right: 0px;
opacity: 0.2;
}
.section-title.icon-ml-15 .v-icon { .section-title.icon-ml-15 .v-icon {
margin-left: 15px !important; margin-left: 15px !important;
} }

@ -15,7 +15,7 @@
</div>--> </div>-->
</v-container> </v-container>
<v-navigation-drawer v-model="drawer" app temporary right width="420"> <v-navigation-drawer v-model="drawer" app temporary right width="320">
<v-list class="pa-1"> <v-list class="pa-1">
<div class="row user-info"> <div class="row user-info">
<v-flex lg9 class="pa-3"> <v-flex lg9 class="pa-3">
@ -43,35 +43,11 @@
<v-list class="pt-0" dense> <v-list class="pt-0" dense>
<v-divider class="Divider"/> <v-divider class="Divider"/>
<a :href="item.href" v-for="(item, key) in Items" :key="key"> <a :href="item.href" v-for="(item, key) in Items" :key="key">
<template v-if="(!item.permissionClass || $_can(item.permissionClass, false, item.module)) && (!item.moduleName || getModules.find(x => x.slug === item.moduleName))"> <template v-if="(!item.permissionClass || $_can(item.permissionClass, false, item.module)) && ($_hasModule(item.moduleName, true))">
<wm-list-tile :TitleFa="item.titleFa" :TitleEn="item.titleEn" :icon="item.icon" :tileClass="item.tileClass"/> <wm-list-tile :TitleFa="item.titleFa" :TitleEn="item.titleEn" :icon="item.icon" :tileClass="item.tileClass"/>
</template> </template>
</a> </a>
</v-list> </v-list>
<div class="footer">
<div class="flex-justified-space-between links">
<div class="flex-justified-right texts">
<a href="https://www.willaarts.ir/ContactUs" class="WM-Link"> تماس با ما </a>
<a href="https://www.willaarts.ir/AboutUs" class="WM-Link"> درباره ی ما </a>
<a href="https://www.willaarts.ir/FAQ" class="WM-Link"> سوالات متداول </a>
</div>
<div class="social-media flex-justified-left">
<a href="https://www.aparat.com/WillaArts" class="WM-Link"> <v-icon>WMi-aparat</v-icon> </a>
<a href="https://www.instagram.com/willaarts.ir/" class="WM-Link"> <v-icon>WMi-instagram-2</v-icon> </a>
<a href="https://www.linkedin.com/in/willaartsgroup/" class="WM-Link"> <v-icon>WMi-linkedin-1</v-icon> </a>
</div>
</div>
<a href="https://www.willaarts.ir/ContactUs" class="WM-Link">
<div class="flex-justified-center water-mark">
<v-icon class="text--32">WMi-willa-engine</v-icon>
<div class="text-right">
<div class="Fa"> قدرت گرفته از سیستم ویـــــلااِنجین </div>
<div class="En"> Powered By WillaEngine IMS </div>
</div>
</div>
</a>
</div>
</v-navigation-drawer> </v-navigation-drawer>
</v-layout> </v-layout>
</template> </template>
@ -90,22 +66,20 @@ export default {
hints: true, hints: true,
drawer: false, drawer: false,
Items: [ Items: [
{ titleEn: 'My Profile', titleFa: ' حساب کاربری من ', icon: 'user', permissionClass: null, href: '/user/dashboard' }, { titleEn: 'My Profile', titleFa: ' حساب کاربری من ', icon: 'user', permissionClass: null, href: '/user/profile' },
{ {
titleEn: " My Users ", titleEn: " My Users ",
titleFa: " کاربران مجموعه ی من ", titleFa: " کاربران مجموعه ی من ",
icon: "users", icon: "users",
permissionClass: "User::index", permissionClass: "User::index",
module: "core", module: "core",
href: '/user/home', href: Routes.user(),
tileClass: 'red-theme', tileClass: 'red-theme',
}, },
{ {
titleEn: " Product Management ", titleEn: " Product Management ",
titleFa: " مدیریت محصولات ", titleFa: " مدیریت محصولات ",
icon: "dropbox", icon: "dropbox",
permissionClass: "Product::index",
module: "core",
href: '/product/home', href: '/product/home',
tileClass: 'cyan-theme', tileClass: 'cyan-theme',
}, },
@ -236,7 +210,6 @@ export default {
bottom: 0px; bottom: 0px;
background-color: white; background-color: white;
width: 600px; width: 600px;
} }
.drawer.open { .drawer.open {
@ -245,55 +218,4 @@ export default {
.v-application .caption { .v-application .caption {
font-family: iranyekan-regular!important; font-family: iranyekan-regular!important;
} }
.footer {
position: absolute;
bottom: 0px;
width: 420px;
padding-bottom: 10px;
text-align: center;
padding-left: 20px;
}
.footer .water-mark {
}
.footer .links {
width: 420px;
border-bottom: 1px solid #eeeeee;
padding-bottom: 10px;
margin: auto;
}
.footer .links .texts a {
font-size: 14px;
color: #9e9e9e;
margin-right: 20px;
transition: 0.2s;
}
.footer .links .social-media {
padding-left: 10px;
}
.footer .links .social-media a {
margin-right: 5px;
transition: 0.2s;
}
.footer .links .social-media a .v-icon {
color: #9e9e9e;
font-size: 16px;
}
.footer .links a:hover, .footer .links .social-media a:hover .v-icon {
color: #000;
}
.footer .water-mark .v-icon {
font-size: 50px;
color: #000;
}
.footer .water-mark .Fa {
font-size: 16px;
}
.footer .water-mark .En {
font-size: 8px;
text-transform: uppercase;
letter-spacing: 4px;
margin-right: -4px;
}
</style> </style>

@ -1,11 +1,9 @@
<template> <template>
<div class="Tile" :class="tileClass"> <div class="Tile" :class="tileClass">
<div class="flex-justified-right"> <i v-if="icon" class="pre-icon" :class="'WMi-'+icon"/>
<i v-if="icon" class="pre-icon" :class="'WMi-'+icon"/> <div class="Title">
<div class="Title"> <div class="TitleFa Fa">{{ TitleFa }}</div>
<div class="TitleFa Fa">{{ TitleFa }}</div> <div class="TitleEn En">{{ TitleEn }}</div>
<div class="TitleEn En">{{ TitleEn }}</div>
</div>
</div> </div>
<v-icon v-if="hasDetail" class="post-icon">WMi-left-open </v-icon> <v-icon v-if="hasDetail" class="post-icon">WMi-left-open </v-icon>
<!-- <i v-if="hasDetail" class="WMi-left-open post-icon"></i> --> <!-- <i v-if="hasDetail" class="WMi-left-open post-icon"></i> -->
@ -24,7 +22,7 @@ export default {
</script> </script>
<style scoped> <style scoped>
.Tile { .Tile {
padding: 0.4em; padding: 1em;
padding-right: 20px; padding-right: 20px;
cursor: pointer; cursor: pointer;
display: -webkit-inline-flex; display: -webkit-inline-flex;
@ -78,36 +76,29 @@ export default {
-webkit-transform: scaleX(1); -webkit-transform: scaleX(1);
transform: scaleX(1); transform: scaleX(1);
} }
.Tile:hover, .Tile:hover .post-icon, .Tile:hover .pre-icon, .Tile:hover .TitleEn {
color: #fff;
}
.Tile .pre-icon { .Tile .pre-icon {
padding-left: 5px; padding-left: 5px;
margin-top: 5px;
font-size: 35px; font-size: 35px;
opacity: 1; opacity: 0.2;
transition: 300ms cubic-bezier(1, 0, 0, 1);
} }
.Tile .Title { .Tile .Title {
padding-left: 10px; padding-left: 10px;
margin-right: 0px; margin-right:-30px;
transition: 300ms cubic-bezier(1, 0, 0, 1);
} }
.Tile .TitleFa { .Tile .TitleFa {
font-size: 18px; font-size: 16px;
line-height: 22px; line-height: 22px;
color: #000;
transition: 300ms cubic-bezier(1, 0, 0, 1);
} }
.Tile .TitleEn { .Tile .TitleEn {
letter-spacing: 3px; letter-spacing: 3px;
line-height: 20px; line-height: 20px;
font-size: 10px; font-size: 10px;
color: #a0a0a0; color: #a29da9;
text-transform: uppercase;
transition: 300ms cubic-bezier(1, 0, 0, 1);
}
.Tile:hover, .Tile:hover .post-icon, .Tile:hover .pre-icon, .Tile:hover .TitleEn, .Tile:hover .TitleFa {
color: #fff;
} }
.Tile .post-icon::before { .Tile .post-icon::before {
margin-top: 0px; margin-top: 0px;

@ -1,75 +0,0 @@
<template>
<v-row :class="`ma-0 mt-2 checklist`">
<v-col xl="12" class="pt-4 pb-0 pr-0"> <section-title theme="sm" title-fa="چک لیست" title-en="check list" /></v-col>
<v-col xl="12" class="task-item row ma-0 mt-1 pt-1 pb-1 section-bordered flex-justified-space-between" :class="(task_status) ? 'done' : ''">
<div class="flex-justified-right">
<div class="En Bold text--24 counter">1</div>
<v-switch :color="$_color('task')" inset class="mr-2" v-model="task_status" />
<div class="Fa pr-2 text"> چک کردن سئو وبسایت وردک </div>
</div>
<div class="flex-justified-left">
<v-btn fab x-small :color="$_color('task')" dark>
<v-icon dark>WMi-pencil</v-icon>
</v-btn>
<v-btn fab x-small color="red" dark>
<v-icon dark>WMi-minus</v-icon>
</v-btn>
</div>
</v-col>
<v-col xl="12" class="row ma-0 mt-1 pt-1 pb-1 section-bordered flex-justified-right">
<v-text-field
v-validate="'min:4'"
label=" متن آیتم را وارد کنید "
color="cyan"
prepend-icon="WMi-text"
></v-text-field>
<v-btn
fab
small
color="cyan"
dark
class="mr-3"
>
<v-icon dark>WMi-plus</v-icon>
</v-btn>
</v-col>
<!-- <div class="add-button-row flex-justified-center">-->
<!-- <v-icon>WMi-plus</v-icon>-->
<!-- </div>-->
</v-row>
</template>
<script>
export default {
props: {
},
data: function () {
return {
task_status: false,
};
},
};
</script>
<style lang="scss" scoped>
.checklist .counter {
width: 30px;
border-left: 1px solid #eeeeec;
}
.checklist .task-item {
transition: 0.2s;
border-radius: 5px;
}
.task-item.done {
border: 1px solid var(--color-purple);
background-color: var(--color-bg-purple);
}
.task-item .text {
transition: 2.0s;
}
.task-item.done .text {
text-decoration: line-through;
text-decoration-color: var(--color-purple);
}
</style>

@ -1,24 +1,30 @@
<template> <template>
<v-dialog v-model="modal" :max-width="maxWidth" :width="width" :transition="transition"> <v-dialog v-model="modal" :max-width="maxWidth" :width="width" :transition="transition">
<slot :modal="modal" :data="data" v-if="modal" ></slot> <slot :modal="modal" :data="data" v-if="modal"></slot>
</v-dialog> </v-dialog>
</template> </template>
<script> <script>
import {mapGetters} from "vuex"; import {mapGetters} from "vuex";
export default { export default {
props: { props: {
width:{default: null}, width: {default: null},
maxWidth:{default: null}, maxWidth: {default: null},
name:{default: null}, name: {default: null},
transition:{default: 'slide-x-transition'}, transition: {default: 'slide-x-transition'},
}, },
data: () => ({
isOpenModal: false,
}),
computed: { computed: {
...mapGetters("modal", ["isModal", "getModal"]), ...mapGetters("modal", ["isModal", "getModal"]),
modal: { modal: {
get() { get() {
return this.isModal(this.modalName); const isOpen = this.isModal(this.modalName);
this.emitModal(isOpen);
return isOpen;
}, },
set(value) { set(value) {
if (!value) { if (!value) {
@ -33,6 +39,20 @@
return this.getModal(this.modalName); return this.getModal(this.modalName);
} }
}, },
methods: {
emitModal(isOpen) {
if (this.isOpenModal && !isOpen) {
this.isOpenModal = false;
this.$emit('close');
} else if (!this.isOpenModal && isOpen) {
this.isOpenModal = true;
this.$emit('open', this.data);
this.$parent.modalData = this.data;
}
}
},
beforeDestroy() {
this.emitModal(false);
}
} }
</script> </script>

@ -0,0 +1,14 @@
import { LooseObject } from "@Global/infrastructure/Interfaces/GlobalInterface";
export default class Resource {
getJson(data: LooseObject): LooseObject {
return data;
}
getArray(data: Array<LooseObject>): Array<LooseObject> {
return data;
}
setJson(data: LooseObject): LooseObject {
return data;
}
}

@ -0,0 +1,5 @@
import {LooseObject} from './GlobalInterface'
export default interface BinderInterface {
request(data: LooseObject): void;
}

@ -0,0 +1,3 @@
export interface LooseObject {
[key: string]: any
}

@ -0,0 +1,11 @@
import {LooseObject} from './GlobalInterface'
export default interface ResourceInterface {
getJson(data: LooseObject): LooseObject;
getArray(data: Array<LooseObject>): Array<LooseObject>;
setJson(data: LooseObject): LooseObject;
}

@ -1,5 +1,5 @@
import { mapActions } from "vuex"; import { mapActions } from "vuex";
import $_can from "@Global/policy/can"; import $_can, {$_hasModule} from "@Global/policy/can";
import $_name from "@Global/utils/category-name/name"; import $_name from "@Global/utils/category-name/name";
import $_color from "@Global/utils/module-color"; import $_color from "@Global/utils/module-color";
const global = { const global = {
@ -21,15 +21,22 @@ const global = {
...mapActions("modal", [ ...mapActions("modal", [
"$_dialog", "$_dialog",
"$_helper", "$_helper",
"$_openModal", "__openModal",
"$_closeModal" "$_closeModal"
]), ]),
$_openModal(name, data = {}) {
if (typeof name == 'object') {
this.__openModal(name)
} else {
this.__openModal({...data, ...{name}})
}
},
$_can, $_can,
$_hasModule,
$_name, $_name,
$_color, $_color,
} }
}; };

@ -1,8 +1,8 @@
import policyClasses from '@Global/policy';
import { UserService } from "@Global/services/storage.services"; import { UserService } from "@Global/services/storage.services";
import globalStore from "@Global/store"; import globalStore from "@Global/store";
import authStore from "@Core/store"; import authStore from "@Core/store";
import Routes from "@Global/utils/common/routes" import Routes from "@Global/utils/common/routes"
import Vue from "vue";
export default (model, object, module = null) => { export default (model, object, module = null) => {
//Access To All Place For Site Manager //Access To All Place For Site Manager
@ -18,10 +18,17 @@ export default (model, object, module = null) => {
let permissions = rootPermissions[module] ? Object.values(rootPermissions[module]) : [] ; let permissions = rootPermissions[module] ? Object.values(rootPermissions[module]) : [] ;
//instance policty class //instance policty class
let policy = new policyClasses[policyClass]; let policy = new Vue.prototype.$policiesClasses[policyClass];
if (typeof policy == 'object' && typeof policy[policymethod] == 'function' ) { if (typeof policy == 'object' && typeof policy[policymethod] == 'function' ) {
return policy[policymethod]({module, rootPermissions, permissions}, object); return policy[policymethod]({module, rootPermissions, permissions}, object);
} else { } else {
return false; return false;
} }
}; };
export const $_hasModule = (moduleName, defaultParam) => {
if (defaultParam && typeof moduleName === 'undefined') {
return true;
}
return authStore.getters['rolePermission/getModules'].find(x => x.slug === moduleName)
};

@ -1,17 +0,0 @@
import CRMPolicy from '@CRM/policy';
import BlogPolicy from '@Blog/policy';
import PortfolioPolicy from '@Portfolio/policy';
import ProductPolicy from '@Product/policy';
import ServicePolicy from '@Service/policy';
import CorePolicy from '@Core/policy';
import CommonPolicy from '@Common/policy';
export default {
...PortfolioPolicy,
...BlogPolicy,
...CRMPolicy,
...ProductPolicy,
...ServicePolicy,
...CorePolicy,
...CommonPolicy,
}

@ -29,9 +29,7 @@
Borders :: Begin Borders :: Begin
-------------------------------------------------------- */ -------------------------------------------------------- */
.border-none {
border-width: 0px !important;
}
.border { .border {
border: 1px solid; border: 1px solid;
} }

@ -2,14 +2,14 @@ import $_can from "@Global/policy/can";
export default { export default {
$_openModal({ state, rootState }, data) { // data: {name, rel, model, form_data, data, modal_pop_data, type} __openModal({ state, rootState }, data) { // data: {name, rel, model, form_data, data, modal_pop_data, type}
let can = true; let can = true;
if (data.can) { if (data.can) {
can = $_can(data.can); can = $_can(data.can);
} }
if (can) { if (can) {
data.name = 'modal_' + data.name; data.name = 'modal_' + data.name;
if (state.modals.findIndex(x => x.name == data.name) == -1) { if (state.modals.findIndex(x => x.name === data.name) === -1) {
state.modals.push(data); state.modals.push(data);
let module = data.name.split("_"); let module = data.name.split("_");
if (data.rel) { if (data.rel) {
@ -57,7 +57,7 @@ export default {
$_dialog:({commit, dispatch}, properties) => { $_dialog:({commit, dispatch}, properties) => {
properties['name'] = 'modal_dialog'; properties['name'] = 'modal_dialog';
dispatch('$_openModal', properties); dispatch('__openModal', properties);
commit('SET_DIALOG_TYPE', properties.type); commit('SET_DIALOG_TYPE', properties.type);
commit('SET_DIALOG_PROPERTIES', properties); commit('SET_DIALOG_PROPERTIES', properties);
@ -67,6 +67,6 @@ export default {
let data = {}; let data = {};
data['name'] = 'modal_helper'; data['name'] = 'modal_helper';
data['slug'] = slug; data['slug'] = slug;
dispatch('$_openModal', data); dispatch('__openModal', data);
}, },
}; };

@ -18,8 +18,6 @@ export default {
// -------------------------- // --------------------------
sms:"orange", sms:"orange",
authorize:"blue", authorize:"blue",
user:"black",
roll_call:"black",
// -------------------------- // --------------------------
// Admin // Admin

@ -0,0 +1,9 @@
import Vue from "vue";
import {CorePolicies} from "@Core/policy";
import CommonPolicy from "@Common/policy";
Vue.prototype.$policiesClasses = {
...CorePolicies,
...CommonPolicy
};

@ -1,19 +0,0 @@
<?php
namespace Tests\Unit;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testBasicTest()
{
$this->assertTrue(true);
}
}

@ -0,0 +1,32 @@
//{
// "compilerOptions": {
// "module": "commonjs",
// "target": "es5",
// "noImplicitAny": false,
// "sourceMap": false
// }
//}
{
"compilerOptions": {
"lib": ["dom", "es5", "es2015"],
"target": "es5",
"module": "commonjs",
"noImplicitAny": false,
"moduleResolution": "node",
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"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/*"],
"@Service/*": ["./modules/wm-service/resources/js/*"],
"@Product/*": ["./modules/wm-product/resources/js/*"],
"@Blog/*": ["./modules/wm-blog/resources/js/*"]
}
}
}

14
webpack.mix.js vendored

@ -11,7 +11,7 @@ const mix = require('laravel-mix');
*/ */
mix.webpackConfig({ mix.webpackConfig({
resolve: { resolve: {
// extensions: ['.js', '.vue', '.json'], extensions: ["*", ".js", ".jsx", ".vue", ".ts", ".tsx", '.json', '.d.ts'],
alias: { alias: {
'@JS': path.resolve(__dirname, 'resources/js'), '@JS': path.resolve(__dirname, 'resources/js'),
'@Global': path.resolve(__dirname, 'resources/js/Global'), '@Global': path.resolve(__dirname, 'resources/js/Global'),
@ -21,9 +21,18 @@ mix.webpackConfig({
output: { output: {
chunkFilename: 'js/vue/chunks/[name].[chunkhash].js', 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'); mix.js('resources/js/Home/app.js', 'public/js/vue/Home');
@ -37,7 +46,6 @@ 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-warehouse/webpack.mix');
require('./modules/wm-finance/webpack.mix');
// require('./modules/wm-web-builder/webpack.mix'); // require('./modules/wm-web-builder/webpack.mix');
// require('./modules/wm-reservation/webpack.mix'); // require('./modules/wm-reservation/webpack.mix');

Loading…
Cancel
Save