mirror of
https://github.com/anonaddy/anonaddy.git
synced 2025-12-27 23:45:59 +00:00
Added applied columns to rules
This commit is contained in:
parent
9677d53db5
commit
731d33ac2c
@ -20,6 +20,8 @@ class RuleResource extends JsonResource
|
||||
'replies' => $this->replies,
|
||||
'sends' => $this->sends,
|
||||
'active' => $this->active,
|
||||
'applied' => $this->applied,
|
||||
'last_applied' => $this->last_applied?->toDateTimeString(),
|
||||
'created_at' => $this->created_at->toDateTimeString(),
|
||||
'updated_at' => $this->updated_at->toDateTimeString(),
|
||||
];
|
||||
|
||||
@ -10,6 +10,52 @@ class EmailData
|
||||
{
|
||||
private static $mimeTypes;
|
||||
|
||||
public $sender;
|
||||
|
||||
public $display_from;
|
||||
|
||||
public $reply_to_address;
|
||||
|
||||
public $originalCc;
|
||||
|
||||
public $originalTo;
|
||||
|
||||
public $subject;
|
||||
|
||||
public $text;
|
||||
|
||||
public $html;
|
||||
|
||||
public $attachments;
|
||||
|
||||
public $inlineAttachments;
|
||||
|
||||
public $size;
|
||||
|
||||
public $messageId;
|
||||
|
||||
public $listUnsubscribe;
|
||||
|
||||
public $inReplyTo;
|
||||
|
||||
public $references;
|
||||
|
||||
public $originalEnvelopeFrom;
|
||||
|
||||
public $originalFromHeader;
|
||||
|
||||
public $originalReplyToHeader;
|
||||
|
||||
public $originalSenderHeader;
|
||||
|
||||
public $authenticationResults;
|
||||
|
||||
public $receivedHeaders;
|
||||
|
||||
public $encryptedParts;
|
||||
|
||||
public $isInlineEncrypted;
|
||||
|
||||
public function __construct(Parser $parser, $sender, $size, $emailType = 'F')
|
||||
{
|
||||
if (isset($parser->getAddresses('from')[0]['address'])) {
|
||||
|
||||
@ -24,6 +24,8 @@ class Rule extends Model
|
||||
'replies',
|
||||
'sends',
|
||||
'active',
|
||||
'applied',
|
||||
'last_applied',
|
||||
'order',
|
||||
];
|
||||
|
||||
@ -36,6 +38,8 @@ class Rule extends Model
|
||||
'sends' => 'boolean',
|
||||
'conditions' => 'array',
|
||||
'actions' => 'array',
|
||||
'applied' => 'integer',
|
||||
'last_applied' => 'datetime',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
];
|
||||
|
||||
@ -16,6 +16,9 @@ trait CheckUserRules
|
||||
collect($rule->actions)->each(function ($action) {
|
||||
$this->applyAction($action);
|
||||
});
|
||||
|
||||
// Increment applied count
|
||||
$rule->increment('applied', 1, ['last_applied' => now()]);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -125,7 +128,14 @@ trait CheckUserRules
|
||||
break;
|
||||
case 'banner':
|
||||
if (in_array($action['value'], ['top', 'bottom', 'off'])) {
|
||||
$this->email->bannerLocation = $action['value'];
|
||||
|
||||
if ($this->emailHtml) {
|
||||
// Turn off the banner for the plain text version
|
||||
$this->bannerLocationText = 'off';
|
||||
$this->bannerLocationHtml = $action['value'];
|
||||
} else {
|
||||
$this->bannerLocationText = $action['value'];
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'block':
|
||||
|
||||
562
composer.lock
generated
562
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('rules', function (Blueprint $table) {
|
||||
$table->after('active', function (Blueprint $table) {
|
||||
$table->unsignedInteger('applied')->default(0);
|
||||
$table->timestamp('last_applied')->nullable();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('rules', function (Blueprint $table) {
|
||||
$table->dropColumn('applied');
|
||||
$table->dropColumn('last_applied');
|
||||
});
|
||||
}
|
||||
};
|
||||
239
package-lock.json
generated
239
package-lock.json
generated
@ -52,9 +52,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.24.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.4.tgz",
|
||||
"integrity": "sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==",
|
||||
"version": "7.24.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz",
|
||||
"integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==",
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
},
|
||||
@ -63,9 +63,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.24.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.4.tgz",
|
||||
"integrity": "sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==",
|
||||
"version": "7.24.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.5.tgz",
|
||||
"integrity": "sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==",
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.14.0"
|
||||
},
|
||||
@ -442,9 +442,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@headlessui/vue": {
|
||||
"version": "1.7.19",
|
||||
"resolved": "https://registry.npmjs.org/@headlessui/vue/-/vue-1.7.19.tgz",
|
||||
"integrity": "sha512-VFjKPybogux/5/QYGSq4zgG/x3RcxId15W8uguAJAjPBxelI23dwjOjTx/mIiMkM/Hd3rzFxcf2aIp56eEWRcA==",
|
||||
"version": "1.7.21",
|
||||
"resolved": "https://registry.npmjs.org/@headlessui/vue/-/vue-1.7.21.tgz",
|
||||
"integrity": "sha512-95cPFP5X9luB8/+smPENFv0ruaotT6epFnqK9EKldX2YpNkYM/qkN44oFoqQo+higlCAxDK5Pkg2E3FuD1Anyg==",
|
||||
"dependencies": {
|
||||
"@tanstack/vue-virtual": "^3.0.0-beta.60"
|
||||
},
|
||||
@ -464,9 +464,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@inertiajs/core": {
|
||||
"version": "1.0.15",
|
||||
"resolved": "https://registry.npmjs.org/@inertiajs/core/-/core-1.0.15.tgz",
|
||||
"integrity": "sha512-7h73+manxkpXdSPlVa2uSjo10AbSS0z9Q1jV7r/otqHfTYCNp7JJxHUX4QpKq/3Z88U8bDUe1RRix1o76pyd5Q==",
|
||||
"version": "1.0.16",
|
||||
"resolved": "https://registry.npmjs.org/@inertiajs/core/-/core-1.0.16.tgz",
|
||||
"integrity": "sha512-j0nS1KwNv2aNSC10u3qfOswhSMcHSURypPlVSimyRrxKSdrLRmPidow06avunkLU6T7nI9oDXt71WOeO3wCLQg==",
|
||||
"dependencies": {
|
||||
"axios": "^1.6.0",
|
||||
"deepmerge": "^4.0.0",
|
||||
@ -475,11 +475,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@inertiajs/vue3": {
|
||||
"version": "1.0.15",
|
||||
"resolved": "https://registry.npmjs.org/@inertiajs/vue3/-/vue3-1.0.15.tgz",
|
||||
"integrity": "sha512-9Im1DAei5OrMDGu3XkVBE45hb5KEyujqGq9D3eE/Va1/NMHF76+SpGUQc+A5cJcBDjo3JG31Fl2R4li7WiIecw==",
|
||||
"version": "1.0.16",
|
||||
"resolved": "https://registry.npmjs.org/@inertiajs/vue3/-/vue3-1.0.16.tgz",
|
||||
"integrity": "sha512-tHQYk9djAVRiXhJKv5T5uB15YmT/0w1iCKl0iiChRfmWtwNkUonezbtb1kHzmsLa3MJtKYaDKPEJh/X1Xfqmvg==",
|
||||
"dependencies": {
|
||||
"@inertiajs/core": "1.0.15",
|
||||
"@inertiajs/core": "1.0.16",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"lodash.isequal": "^4.5.0"
|
||||
},
|
||||
@ -668,20 +668,20 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tanstack/virtual-core": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.2.1.tgz",
|
||||
"integrity": "sha512-nO0d4vRzsmpBQCJYyClNHPPoUMI4nXNfrm6IcCRL33ncWMoNVpURh9YebEHPw8KrtsP2VSJIHE4gf4XFGk1OGg==",
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.5.0.tgz",
|
||||
"integrity": "sha512-KnPRCkQTyqhanNC0K63GBG3wA8I+D1fQuVnAvcBF8f13akOKeQp1gSbu6f77zCxhEk727iV5oQnbHLYzHrECLg==",
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/tannerlinsley"
|
||||
}
|
||||
},
|
||||
"node_modules/@tanstack/vue-virtual": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@tanstack/vue-virtual/-/vue-virtual-3.2.1.tgz",
|
||||
"integrity": "sha512-NWJL8zJ4kwCkUzWd2jLKN9NTxj9RjYyaJwtA16j9urfbnMIdKe2g2HNymq0jGj+fmX/9nd58d6h78LrZ7I/J+A==",
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@tanstack/vue-virtual/-/vue-virtual-3.5.0.tgz",
|
||||
"integrity": "sha512-wvRQ8sFxn/NDr3WvI5XabhFovZ5MBmpEck2GHpTxYunmV63Ovpl30lRu6W5BPQo35a1GqDZ+Pvzlz6WDWRNqqw==",
|
||||
"dependencies": {
|
||||
"@tanstack/virtual-core": "3.2.1"
|
||||
"@tanstack/virtual-core": "3.5.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
@ -692,9 +692,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@types/eslint": {
|
||||
"version": "8.56.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.9.tgz",
|
||||
"integrity": "sha512-W4W3KcqzjJ0sHg2vAq9vfml6OhsJ53TcUjUqfzzZf/EChUtwspszj/S0pzMxnfRcO55/iGq47dscXw71Fxc4Zg==",
|
||||
"version": "8.56.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz",
|
||||
"integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@types/estree": "*",
|
||||
@ -723,9 +723,9 @@
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz",
|
||||
"integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==",
|
||||
"version": "20.12.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.8.tgz",
|
||||
"integrity": "sha512-NU0rJLJnshZWdE/097cdCBbyW1h4hEg0xpovcoAQYHl8dnEyp/NAOiE45pvc+Bd1Dt+2r94v2eGFpQJ4R7g+2w==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
@ -745,94 +745,94 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-core": {
|
||||
"version": "3.4.21",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.21.tgz",
|
||||
"integrity": "sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==",
|
||||
"version": "3.4.26",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.26.tgz",
|
||||
"integrity": "sha512-N9Vil6Hvw7NaiyFUFBPXrAyETIGlQ8KcFMkyk6hW1Cl6NvoqvP+Y8p1Eqvx+UdqsnrnI9+HMUEJegzia3mhXmQ==",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.23.9",
|
||||
"@vue/shared": "3.4.21",
|
||||
"@babel/parser": "^7.24.4",
|
||||
"@vue/shared": "3.4.26",
|
||||
"entities": "^4.5.0",
|
||||
"estree-walker": "^2.0.2",
|
||||
"source-map-js": "^1.0.2"
|
||||
"source-map-js": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-dom": {
|
||||
"version": "3.4.21",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.21.tgz",
|
||||
"integrity": "sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==",
|
||||
"version": "3.4.26",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.26.tgz",
|
||||
"integrity": "sha512-4CWbR5vR9fMg23YqFOhr6t6WB1Fjt62d6xdFPyj8pxrYub7d+OgZaObMsoxaF9yBUHPMiPFK303v61PwAuGvZA==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-core": "3.4.21",
|
||||
"@vue/shared": "3.4.21"
|
||||
"@vue/compiler-core": "3.4.26",
|
||||
"@vue/shared": "3.4.26"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-sfc": {
|
||||
"version": "3.4.21",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.21.tgz",
|
||||
"integrity": "sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ==",
|
||||
"version": "3.4.26",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.26.tgz",
|
||||
"integrity": "sha512-It1dp+FAOCgluYSVYlDn5DtZBxk1NCiJJfu2mlQqa/b+k8GL6NG/3/zRbJnHdhV2VhxFghaDq5L4K+1dakW6cw==",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.23.9",
|
||||
"@vue/compiler-core": "3.4.21",
|
||||
"@vue/compiler-dom": "3.4.21",
|
||||
"@vue/compiler-ssr": "3.4.21",
|
||||
"@vue/shared": "3.4.21",
|
||||
"@babel/parser": "^7.24.4",
|
||||
"@vue/compiler-core": "3.4.26",
|
||||
"@vue/compiler-dom": "3.4.26",
|
||||
"@vue/compiler-ssr": "3.4.26",
|
||||
"@vue/shared": "3.4.26",
|
||||
"estree-walker": "^2.0.2",
|
||||
"magic-string": "^0.30.7",
|
||||
"postcss": "^8.4.35",
|
||||
"source-map-js": "^1.0.2"
|
||||
"magic-string": "^0.30.10",
|
||||
"postcss": "^8.4.38",
|
||||
"source-map-js": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/compiler-ssr": {
|
||||
"version": "3.4.21",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.21.tgz",
|
||||
"integrity": "sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q==",
|
||||
"version": "3.4.26",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.26.tgz",
|
||||
"integrity": "sha512-FNwLfk7LlEPRY/g+nw2VqiDKcnDTVdCfBREekF8X74cPLiWHUX6oldktf/Vx28yh4STNy7t+/yuLoMBBF7YDiQ==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.4.21",
|
||||
"@vue/shared": "3.4.21"
|
||||
"@vue/compiler-dom": "3.4.26",
|
||||
"@vue/shared": "3.4.26"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/reactivity": {
|
||||
"version": "3.4.21",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.21.tgz",
|
||||
"integrity": "sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw==",
|
||||
"version": "3.4.26",
|
||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.26.tgz",
|
||||
"integrity": "sha512-E/ynEAu/pw0yotJeLdvZEsp5Olmxt+9/WqzvKff0gE67tw73gmbx6tRkiagE/eH0UCubzSlGRebCbidB1CpqZQ==",
|
||||
"dependencies": {
|
||||
"@vue/shared": "3.4.21"
|
||||
"@vue/shared": "3.4.26"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/runtime-core": {
|
||||
"version": "3.4.21",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.21.tgz",
|
||||
"integrity": "sha512-pQthsuYzE1XcGZznTKn73G0s14eCJcjaLvp3/DKeYWoFacD9glJoqlNBxt3W2c5S40t6CCcpPf+jG01N3ULyrA==",
|
||||
"version": "3.4.26",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.26.tgz",
|
||||
"integrity": "sha512-AFJDLpZvhT4ujUgZSIL9pdNcO23qVFh7zWCsNdGQBw8ecLNxOOnPcK9wTTIYCmBJnuPHpukOwo62a2PPivihqw==",
|
||||
"dependencies": {
|
||||
"@vue/reactivity": "3.4.21",
|
||||
"@vue/shared": "3.4.21"
|
||||
"@vue/reactivity": "3.4.26",
|
||||
"@vue/shared": "3.4.26"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/runtime-dom": {
|
||||
"version": "3.4.21",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.21.tgz",
|
||||
"integrity": "sha512-gvf+C9cFpevsQxbkRBS1NpU8CqxKw0ebqMvLwcGQrNpx6gqRDodqKqA+A2VZZpQ9RpK2f9yfg8VbW/EpdFUOJw==",
|
||||
"version": "3.4.26",
|
||||
"resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.26.tgz",
|
||||
"integrity": "sha512-UftYA2hUXR2UOZD/Fc3IndZuCOOJgFxJsWOxDkhfVcwLbsfh2CdXE2tG4jWxBZuDAs9J9PzRTUFt1PgydEtItw==",
|
||||
"dependencies": {
|
||||
"@vue/runtime-core": "3.4.21",
|
||||
"@vue/shared": "3.4.21",
|
||||
"@vue/runtime-core": "3.4.26",
|
||||
"@vue/shared": "3.4.26",
|
||||
"csstype": "^3.1.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/server-renderer": {
|
||||
"version": "3.4.21",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.21.tgz",
|
||||
"integrity": "sha512-aV1gXyKSN6Rz+6kZ6kr5+Ll14YzmIbeuWe7ryJl5muJ4uwSwY/aStXTixx76TwkZFJLm1aAlA/HSWEJ4EyiMkg==",
|
||||
"version": "3.4.26",
|
||||
"resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.26.tgz",
|
||||
"integrity": "sha512-xoGAqSjYDPGAeRWxeoYwqJFD/gw7mpgzOvSxEmjWaFO2rE6qpbD1PC172YRpvKhrihkyHJkNDADFXTfCyVGhKw==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-ssr": "3.4.21",
|
||||
"@vue/shared": "3.4.21"
|
||||
"@vue/compiler-ssr": "3.4.26",
|
||||
"@vue/shared": "3.4.26"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "3.4.21"
|
||||
"vue": "3.4.26"
|
||||
}
|
||||
},
|
||||
"node_modules/@vue/shared": {
|
||||
"version": "3.4.21",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.21.tgz",
|
||||
"integrity": "sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g=="
|
||||
"version": "3.4.26",
|
||||
"resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.26.tgz",
|
||||
"integrity": "sha512-Fg4zwR0GNnjzodMt3KRy2AWGMKQXByl56+4HjN87soxLNU9P5xcJkstAlIeEF3cU6UYOzmJl1tV0dVPGIljCnQ=="
|
||||
},
|
||||
"node_modules/@vueform/multiselect": {
|
||||
"version": "2.6.7",
|
||||
@ -1269,9 +1269,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001610",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001610.tgz",
|
||||
"integrity": "sha512-QFutAY4NgaelojVMjY63o6XlZyORPaLfyMnsl3HgnWdJUcX6K0oaJymHjH8PT5Gk7sTm8rvC/c5COUQKXqmOMA==",
|
||||
"version": "1.0.30001615",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001615.tgz",
|
||||
"integrity": "sha512-1IpazM5G3r38meiae0bHRnPhz+CBQ3ZLqbQMtrg+AsTPKAXgW38JNsXkyZ+v8waCsDmPq87lmfun5Q2AGysNEQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@ -1528,9 +1528,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/dayjs": {
|
||||
"version": "1.11.10",
|
||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz",
|
||||
"integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ=="
|
||||
"version": "1.11.11",
|
||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz",
|
||||
"integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg=="
|
||||
},
|
||||
"node_modules/de-indent": {
|
||||
"version": "1.0.2",
|
||||
@ -1602,9 +1602,9 @@
|
||||
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.736",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.736.tgz",
|
||||
"integrity": "sha512-Rer6wc3ynLelKNM4lOCg7/zPQj8tPOCB2hzD32PX9wd3hgRRi9MxEbmkFCokzcEhRVMiOVLjnL9ig9cefJ+6+Q=="
|
||||
"version": "1.4.755",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.755.tgz",
|
||||
"integrity": "sha512-9nop+3jZxSHIxe1EzEUcjDXzK+3qOv3fY5w0sE88nIZUntbv1aXWmoxGWlklX5XSO4txCpLssWkUSh8RQPovBg=="
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "10.3.0",
|
||||
@ -1664,9 +1664,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/es-module-lexer": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.0.tgz",
|
||||
"integrity": "sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw==",
|
||||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.2.tgz",
|
||||
"integrity": "sha512-l60ETUTmLqbVbVHv1J4/qj+M8nq7AwMzEcg3kmJDt9dCNrTk+yHcYFf/Kw75pMDwd9mPcIGCG5LcS20SxYRzFA==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
@ -2450,14 +2450,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/magic-string": {
|
||||
"version": "0.30.9",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.9.tgz",
|
||||
"integrity": "sha512-S1+hd+dIrC8EZqKyT9DstTH/0Z+f76kmmvZnkfQVmOpDEF9iVgdYif3Q/pIWHmCoo59bQVGW0kVL3e2nl+9+Sw==",
|
||||
"version": "0.30.10",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz",
|
||||
"integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==",
|
||||
"dependencies": {
|
||||
"@jridgewell/sourcemap-codec": "^1.4.15"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/merge-stream": {
|
||||
@ -2706,9 +2703,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/path-scurry/node_modules/lru-cache": {
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz",
|
||||
"integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==",
|
||||
"version": "10.2.2",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz",
|
||||
"integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==",
|
||||
"engines": {
|
||||
"node": "14 || >=16.14"
|
||||
}
|
||||
@ -3140,9 +3137,9 @@
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"name": "@rollup/wasm-node",
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.14.3.tgz",
|
||||
"integrity": "sha512-UyFUQV/iAu/Wt6rY6uQMYBQlfTMsynzYVIz6i7s9ySwjoG9WDNgtkK1TrazCSrUFbmuPZi2gbJm6VWdJCVw2yA==",
|
||||
"version": "4.17.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.17.2.tgz",
|
||||
"integrity": "sha512-4F6C3XaUn02XY/GJMQTXncWrLyCkRHdRZe4OyWuQUprWKmU2u+esISOtCYdr3Bp9AqCIo/X3So2Ik7N9dNDwow==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/estree": "1.0.5"
|
||||
@ -3595,9 +3592,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/terser": {
|
||||
"version": "5.30.3",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.30.3.tgz",
|
||||
"integrity": "sha512-STdUgOUx8rLbMGO9IOwHLpCqolkDITFFQSMYYwKE1N2lY6MVSaeoi10z/EhWxRc6ybqoVmKSkhKYH/XUpl7vSA==",
|
||||
"version": "5.31.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.31.0.tgz",
|
||||
"integrity": "sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/source-map": "^0.3.3",
|
||||
@ -3702,9 +3699,9 @@
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/update-browserslist-db": {
|
||||
"version": "1.0.13",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
|
||||
"integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==",
|
||||
"version": "1.0.14",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.14.tgz",
|
||||
"integrity": "sha512-JixKH8GR2pWYshIPUg/NujK3JO7JiqEEUiNArE86NQyrgUuZeTlZQN3xuS/yiV5Kb48ev9K6RqNkaJjXsdg7Jw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
@ -3720,7 +3717,7 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"escalade": "^3.1.1",
|
||||
"escalade": "^3.1.2",
|
||||
"picocolors": "^1.0.0"
|
||||
},
|
||||
"bin": {
|
||||
@ -3745,9 +3742,9 @@
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "5.2.8",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.2.8.tgz",
|
||||
"integrity": "sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==",
|
||||
"version": "5.2.11",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.2.11.tgz",
|
||||
"integrity": "sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"esbuild": "^0.20.1",
|
||||
@ -3810,15 +3807,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vue": {
|
||||
"version": "3.4.21",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.21.tgz",
|
||||
"integrity": "sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==",
|
||||
"version": "3.4.26",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.4.26.tgz",
|
||||
"integrity": "sha512-bUIq/p+VB+0xrJubaemrfhk1/FiW9iX+pDV+62I/XJ6EkspAO9/DXEjbDFoe8pIfOZBqfk45i9BMc41ptP/uRg==",
|
||||
"dependencies": {
|
||||
"@vue/compiler-dom": "3.4.21",
|
||||
"@vue/compiler-sfc": "3.4.21",
|
||||
"@vue/runtime-dom": "3.4.21",
|
||||
"@vue/server-renderer": "3.4.21",
|
||||
"@vue/shared": "3.4.21"
|
||||
"@vue/compiler-dom": "3.4.26",
|
||||
"@vue/compiler-sfc": "3.4.26",
|
||||
"@vue/runtime-dom": "3.4.26",
|
||||
"@vue/server-renderer": "3.4.26",
|
||||
"@vue/shared": "3.4.26"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "*"
|
||||
|
||||
62
postfix/composer.lock
generated
62
postfix/composer.lock
generated
@ -290,7 +290,7 @@
|
||||
},
|
||||
{
|
||||
"name": "illuminate/collections",
|
||||
"version": "v10.48.7",
|
||||
"version": "v10.48.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/collections.git",
|
||||
@ -345,7 +345,7 @@
|
||||
},
|
||||
{
|
||||
"name": "illuminate/conditionable",
|
||||
"version": "v10.48.7",
|
||||
"version": "v10.48.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/conditionable.git",
|
||||
@ -391,7 +391,7 @@
|
||||
},
|
||||
{
|
||||
"name": "illuminate/container",
|
||||
"version": "v10.48.7",
|
||||
"version": "v10.48.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/container.git",
|
||||
@ -442,7 +442,7 @@
|
||||
},
|
||||
{
|
||||
"name": "illuminate/contracts",
|
||||
"version": "v10.48.7",
|
||||
"version": "v10.48.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/contracts.git",
|
||||
@ -490,16 +490,16 @@
|
||||
},
|
||||
{
|
||||
"name": "illuminate/database",
|
||||
"version": "v10.48.7",
|
||||
"version": "v10.48.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/database.git",
|
||||
"reference": "635b0319641f7c746300f615838232ae30b0760c"
|
||||
"reference": "eb8edf206d3a6eea8894bc6e21f53469e27dd5c9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/illuminate/database/zipball/635b0319641f7c746300f615838232ae30b0760c",
|
||||
"reference": "635b0319641f7c746300f615838232ae30b0760c",
|
||||
"url": "https://api.github.com/repos/illuminate/database/zipball/eb8edf206d3a6eea8894bc6e21f53469e27dd5c9",
|
||||
"reference": "eb8edf206d3a6eea8894bc6e21f53469e27dd5c9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -559,11 +559,11 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2024-04-10T14:11:27+00:00"
|
||||
"time": "2024-04-29T13:23:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "illuminate/macroable",
|
||||
"version": "v10.48.7",
|
||||
"version": "v10.48.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/macroable.git",
|
||||
@ -609,7 +609,7 @@
|
||||
},
|
||||
{
|
||||
"name": "illuminate/support",
|
||||
"version": "v10.48.7",
|
||||
"version": "v10.48.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/illuminate/support.git",
|
||||
@ -1081,16 +1081,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
"version": "v3.4.0",
|
||||
"version": "v3.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||
"reference": "7c3aff79d10325257a001fcf92d991f24fc967cf"
|
||||
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf",
|
||||
"reference": "7c3aff79d10325257a001fcf92d991f24fc967cf",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
|
||||
"reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1099,7 +1099,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "3.4-dev"
|
||||
"dev-main": "3.5-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
@ -1128,7 +1128,7 @@
|
||||
"description": "A generic function and convention to trigger deprecation notices",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0"
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1144,7 +1144,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-05-23T14:45:45+00:00"
|
||||
"time": "2024-04-18T09:32:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
@ -1387,16 +1387,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
"version": "v6.4.4",
|
||||
"version": "v6.4.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation.git",
|
||||
"reference": "bce6a5a78e94566641b2594d17e48b0da3184a8e"
|
||||
"reference": "7495687c58bfd88b7883823747b0656d90679123"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/bce6a5a78e94566641b2594d17e48b0da3184a8e",
|
||||
"reference": "bce6a5a78e94566641b2594d17e48b0da3184a8e",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/7495687c58bfd88b7883823747b0656d90679123",
|
||||
"reference": "7495687c58bfd88b7883823747b0656d90679123",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1462,7 +1462,7 @@
|
||||
"description": "Provides tools to internationalize your application",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/translation/tree/v6.4.4"
|
||||
"source": "https://github.com/symfony/translation/tree/v6.4.7"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1478,20 +1478,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-02-20T13:16:58+00:00"
|
||||
"time": "2024-04-18T09:22:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation-contracts",
|
||||
"version": "v3.4.2",
|
||||
"version": "v3.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation-contracts.git",
|
||||
"reference": "43810bdb2ddb5400e5c5e778e27b210a0ca83b6b"
|
||||
"reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/43810bdb2ddb5400e5c5e778e27b210a0ca83b6b",
|
||||
"reference": "43810bdb2ddb5400e5c5e778e27b210a0ca83b6b",
|
||||
"url": "https://api.github.com/repos/symfony/translation-contracts/zipball/b9d2189887bb6b2e0367a9fc7136c5239ab9b05a",
|
||||
"reference": "b9d2189887bb6b2e0367a9fc7136c5239ab9b05a",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1500,7 +1500,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "3.4-dev"
|
||||
"dev-main": "3.5-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/contracts",
|
||||
@ -1540,7 +1540,7 @@
|
||||
"standards"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/translation-contracts/tree/v3.4.2"
|
||||
"source": "https://github.com/symfony/translation-contracts/tree/v3.5.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1556,7 +1556,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-01-23T14:51:35+00:00"
|
||||
"time": "2024-04-18T09:32:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/phpdotenv",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<!-- This example requires Tailwind CSS v2.0+ -->
|
||||
<template>
|
||||
<TransitionRoot as="template" :show="open">
|
||||
<Dialog as="div" class="relative z-10" @close="open = false">
|
||||
<Dialog as="div" class="relative z-10" @close="setIsOpen">
|
||||
<TransitionChild
|
||||
as="template"
|
||||
enter="ease-out duration-300"
|
||||
@ -52,4 +52,9 @@
|
||||
import { Dialog, DialogPanel, DialogTitle, TransitionChild, TransitionRoot } from '@headlessui/vue'
|
||||
|
||||
defineProps(['open', 'maxWidth'])
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
|
||||
function setIsOpen(value) {
|
||||
emit('update:modelValue', value)
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -30,55 +30,97 @@
|
||||
</div>
|
||||
|
||||
<div v-if="rows.length" class="bg-white shadow">
|
||||
<draggable
|
||||
:component-data="{ name: 'flip-list' }"
|
||||
item-key="id"
|
||||
v-model="rows"
|
||||
:group="{ name: 'description' }"
|
||||
ghost-class="ghost"
|
||||
handle=".handle"
|
||||
@change="reorderRules"
|
||||
>
|
||||
<template #item="{ element }">
|
||||
<div class="relative flex items-center py-3 px-5 border-b border-grey-100">
|
||||
<div class="flex items-center w-2/5 md:w-3/5">
|
||||
<icon
|
||||
name="menu"
|
||||
class="handle block w-6 h-6 text-grey-300 fill-current cursor-pointer"
|
||||
/>
|
||||
|
||||
<span class="m-4">{{ element.name }} </span>
|
||||
</div>
|
||||
|
||||
<div class="w-1/5 relative flex">
|
||||
<Toggle
|
||||
v-model="element.active"
|
||||
@on="activateRule(element.id)"
|
||||
@off="deactivateRule(element.id)"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="w-2/5 md:w-1/5 flex justify-end">
|
||||
<button
|
||||
@click="openEditModal(element)"
|
||||
as="button"
|
||||
type="button"
|
||||
class="text-indigo-500 hover:text-indigo-800 font-medium mr-3"
|
||||
<table class="table-auto w-full">
|
||||
<thead class="border-b border-grey-100 text-grey-400">
|
||||
<tr>
|
||||
<th scope="col" class="p-3"></th>
|
||||
<th scope="col" class="p-3 text-left">Created</th>
|
||||
<th scope="col" class="p-3 text-left">Name</th>
|
||||
<th scope="col" class="p-3 text-left">Active</th>
|
||||
<th scope="col" class="p-3 text-left">
|
||||
Applied
|
||||
<span
|
||||
class="tooltip outline-none"
|
||||
data-tippy-content="This is the number of times that the rule has been applied. Hover over the count to see when it was last applied."
|
||||
>
|
||||
Edit
|
||||
</button>
|
||||
<button
|
||||
@click="openDeleteModal(element.id)"
|
||||
as="button"
|
||||
type="button"
|
||||
class="text-indigo-500 hover:text-indigo-800 font-medium"
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</draggable>
|
||||
<icon name="info" class="inline-block w-4 h-4 text-grey-300 fill-current" />
|
||||
</span>
|
||||
</th>
|
||||
<th scope="col" class="p-3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<draggable
|
||||
:component-data="{ type: 'transition', name: 'flip-list' }"
|
||||
v-model="rows"
|
||||
item-key="id"
|
||||
tag="tbody"
|
||||
handle=".handle"
|
||||
:group="{ name: 'description' }"
|
||||
ghost-class="ghost"
|
||||
@change="reorderRules"
|
||||
@update="debounceToolips"
|
||||
>
|
||||
<template #item="{ element }">
|
||||
<tr class="border-b border-grey-100 h-20">
|
||||
<td scope="row" class="p-3">
|
||||
<icon
|
||||
name="menu"
|
||||
class="handle block w-6 h-6 text-grey-300 fill-current cursor-pointer"
|
||||
/>
|
||||
</td>
|
||||
<td scope="row" class="p-3">
|
||||
<span
|
||||
class="tooltip outline-none cursor-default text-sm text-grey-500"
|
||||
:data-tippy-content="$filters.formatDate(element.created_at)"
|
||||
>{{ $filters.timeAgo(element.created_at) }}
|
||||
</span>
|
||||
</td>
|
||||
<td scope="row" class="p-3">
|
||||
<span class="font-medium text-grey-700">{{ element.name }}</span>
|
||||
</td>
|
||||
<td scope="row" class="p-3">
|
||||
<Toggle
|
||||
v-model="element.active"
|
||||
@on="activateRule(element.id)"
|
||||
@off="deactivateRule(element.id)"
|
||||
/>
|
||||
</td>
|
||||
<td scope="row" class="p-3">
|
||||
<span
|
||||
v-if="element.last_applied"
|
||||
class="tooltip outline-none cursor-default font-semibold text-indigo-800"
|
||||
:data-tippy-content="
|
||||
$filters.timeAgo(element.last_applied) +
|
||||
' (' +
|
||||
$filters.formatDate(element.last_applied) +
|
||||
')'
|
||||
"
|
||||
>{{ element.applied.toLocaleString() }}
|
||||
</span>
|
||||
<span v-else>{{ element.applied.toLocaleString() }} </span>
|
||||
</td>
|
||||
<td scope="row" class="p-3 text-right w-0 min-w-fit whitespace-nowrap">
|
||||
<button
|
||||
@click="openEditModal(element)"
|
||||
as="button"
|
||||
type="button"
|
||||
class="text-indigo-500 hover:text-indigo-800 font-medium"
|
||||
>
|
||||
Edit
|
||||
</button>
|
||||
<button
|
||||
@click="openDeleteModal(element.id)"
|
||||
as="button"
|
||||
type="button"
|
||||
class="text-indigo-500 hover:text-indigo-800 font-medium ml-4"
|
||||
>
|
||||
Delete
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</draggable>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div v-else-if="search" class="text-center">
|
||||
@ -150,7 +192,7 @@
|
||||
<div class="relative">
|
||||
<select
|
||||
v-model="createRuleObject.operator"
|
||||
id="edit_rule_operator"
|
||||
:id="`create_rule_operator_${key}`"
|
||||
class="block appearance-none w-full text-grey-700 bg-white p-2 pr-8 rounded shadow focus:ring"
|
||||
required
|
||||
>
|
||||
@ -170,7 +212,7 @@
|
||||
<div class="relative">
|
||||
<select
|
||||
v-model="createRuleObject.conditions[key].type"
|
||||
id="edit_rule_condition_types"
|
||||
:id="`create_rule_condition_types_${key}`"
|
||||
class="block appearance-none w-full sm:w-32 text-grey-700 bg-white p-2 pr-8 rounded shadow focus:ring"
|
||||
required
|
||||
>
|
||||
@ -192,7 +234,7 @@
|
||||
<div class="relative sm:mr-4">
|
||||
<select
|
||||
v-model="createRuleObject.conditions[key].match"
|
||||
id="edit_rule_condition_matches"
|
||||
:id="`create_rule_condition_matches_${key}`"
|
||||
class="block appearance-none w-full sm:w-40 text-grey-700 bg-white p-2 pr-8 rounded shadow focus:ring"
|
||||
required
|
||||
>
|
||||
@ -209,7 +251,7 @@
|
||||
<div class="flex">
|
||||
<input
|
||||
v-model="createRuleObject.conditions[key].currentConditionValue"
|
||||
@keyup.enter="addValueToCondition(editRuleObect, key)"
|
||||
@keyup.enter="addValueToCondition(createRuleObect, key)"
|
||||
type="text"
|
||||
class="w-full appearance-none bg-white border border-transparent rounded-l text-grey-700 focus:outline-none p-2"
|
||||
:class="errors.ruleConditions ? 'border-red-500' : ''"
|
||||
@ -292,7 +334,7 @@
|
||||
<select
|
||||
v-model="createRuleObject.actions[key].type"
|
||||
@change="ruleActionChange(createRuleObject.actions[key])"
|
||||
id="rule_action_types"
|
||||
:id="`rule_action_types_${key}`"
|
||||
class="w-full block appearance-none text-grey-700 bg-white p-2 pr-8 rounded shadow focus:ring"
|
||||
required
|
||||
>
|
||||
@ -333,7 +375,7 @@
|
||||
<div class="relative sm:mr-4 w-full">
|
||||
<select
|
||||
v-model="createRuleObject.actions[key].value"
|
||||
id="edit_rule_action_banner"
|
||||
:id="`create_rule_action_banner_${key}`"
|
||||
class="w-full block appearance-none sm:w-40 text-grey-700 bg-white p-2 pr-8 rounded shadow focus:ring"
|
||||
required
|
||||
>
|
||||
@ -370,7 +412,7 @@
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="border border-cyan-400 p-4 my-4 rounded-sm">
|
||||
<legend class="px-2 leading-none text-sm">Run rule on</legend>
|
||||
<legend class="px-2 leading-none text-sm">Apply rule on</legend>
|
||||
<div class="w-full flex">
|
||||
<div class="relative flex items-center">
|
||||
<input
|
||||
@ -458,7 +500,7 @@
|
||||
<div class="relative">
|
||||
<select
|
||||
v-model="editRuleObject.operator"
|
||||
id="edit_rule_operator"
|
||||
:id="`edit_rule_operator_${key}`"
|
||||
class="block appearance-none w-full text-grey-700 bg-white p-2 pr-8 rounded shadow focus:ring"
|
||||
required
|
||||
>
|
||||
@ -478,7 +520,7 @@
|
||||
<div class="relative">
|
||||
<select
|
||||
v-model="editRuleObject.conditions[key].type"
|
||||
id="edit_rule_condition_types"
|
||||
:id="`edit_rule_condition_types_${key}`"
|
||||
class="block appearance-none w-full sm:w-32 text-grey-700 bg-white p-2 pr-8 rounded shadow focus:ring"
|
||||
required
|
||||
>
|
||||
@ -500,7 +542,7 @@
|
||||
<div class="relative sm:mr-4">
|
||||
<select
|
||||
v-model="editRuleObject.conditions[key].match"
|
||||
id="edit_rule_condition_matches"
|
||||
:id="`edit_rule_condition_matches_${key}`"
|
||||
class="block appearance-none w-full sm:w-40 text-grey-700 bg-white p-2 pr-8 rounded shadow focus:ring"
|
||||
required
|
||||
>
|
||||
@ -597,7 +639,7 @@
|
||||
<select
|
||||
v-model="editRuleObject.actions[key].type"
|
||||
@change="ruleActionChange(editRuleObject.actions[key])"
|
||||
id="rule_action_types"
|
||||
:id="`rule_action_types_${key}`"
|
||||
class="w-full block appearance-none text-grey-700 bg-white p-2 pr-8 rounded shadow focus:ring"
|
||||
required
|
||||
>
|
||||
@ -638,7 +680,7 @@
|
||||
<div class="relative sm:mr-4 w-full">
|
||||
<select
|
||||
v-model="editRuleObject.actions[key].value"
|
||||
id="edit_rule_action_banner"
|
||||
:id="`edit_rule_action_banner_${key}`"
|
||||
class="w-full block appearance-none sm:w-40 text-grey-700 bg-white p-2 pr-8 rounded shadow focus:ring"
|
||||
required
|
||||
>
|
||||
@ -675,7 +717,7 @@
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="border border-cyan-400 p-4 my-4 rounded-sm">
|
||||
<legend class="px-2 leading-none text-sm">Run rule on</legend>
|
||||
<legend class="px-2 leading-none text-sm">Apply rule on</legend>
|
||||
<div class="w-full flex">
|
||||
<div class="relative flex items-center">
|
||||
<input
|
||||
@ -764,7 +806,11 @@
|
||||
if so then to replace the email subject.
|
||||
</p>
|
||||
<p class="mt-4 text-grey-700">
|
||||
You can choose to run rules on forwards, replies and/or sends.
|
||||
You can choose to apply rules on forwards, replies and/or sends.
|
||||
</p>
|
||||
<p class="mt-4 text-grey-700">
|
||||
Rules are applied in the order displayed on this page from top to bottom. You can re-order
|
||||
your rules by dragging them using the icon on the left of each row.
|
||||
</p>
|
||||
|
||||
<div class="mt-6 flex flex-col">
|
||||
@ -781,10 +827,12 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { onMounted, ref, computed } from 'vue'
|
||||
import { Head, Link } from '@inertiajs/vue3'
|
||||
import Modal from '../Components/Modal.vue'
|
||||
import Toggle from '../Components/Toggle.vue'
|
||||
import { roundArrow } from 'tippy.js'
|
||||
import tippy from 'tippy.js'
|
||||
import draggable from 'vuedraggable'
|
||||
import { notify } from '@kyvg/vue3-notification'
|
||||
import { InformationCircleIcon, FunnelIcon } from '@heroicons/vue/24/outline'
|
||||
@ -831,6 +879,7 @@ const createRuleObject = ref({
|
||||
replies: false,
|
||||
sends: false,
|
||||
})
|
||||
const tippyInstance = ref(null)
|
||||
const errors = ref({})
|
||||
|
||||
const conditionTypeOptions = [
|
||||
@ -886,6 +935,10 @@ const indexToHuman = {
|
||||
4: 'fifth',
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
addTooltips()
|
||||
})
|
||||
|
||||
const activeRules = () => {
|
||||
return _.filter(rows.value, rule => rule.active)
|
||||
}
|
||||
@ -894,6 +947,21 @@ const rowsIds = computed(() => {
|
||||
return _.map(rows.value, row => row.id)
|
||||
})
|
||||
|
||||
const addTooltips = () => {
|
||||
if (tippyInstance.value) {
|
||||
_.each(tippyInstance.value, instance => instance.destroy())
|
||||
}
|
||||
|
||||
tippyInstance.value = tippy('.tooltip', {
|
||||
arrow: roundArrow,
|
||||
allowHTML: true,
|
||||
})
|
||||
}
|
||||
|
||||
const debounceToolips = _.debounce(function () {
|
||||
addTooltips()
|
||||
}, 50)
|
||||
|
||||
const createNewRule = () => {
|
||||
errors.value = {}
|
||||
|
||||
@ -948,6 +1016,8 @@ const createNewRule = () => {
|
||||
resetCreateRuleObject()
|
||||
rows.value.push(data.data)
|
||||
createRuleModalOpen.value = false
|
||||
debounceToolips()
|
||||
reorderRules(false)
|
||||
successMessage('New rule created successfully')
|
||||
})
|
||||
.catch(error => {
|
||||
@ -1022,8 +1092,7 @@ const editRule = () => {
|
||||
rule.forwards = editRuleObject.value.forwards
|
||||
rule.replies = editRuleObject.value.replies
|
||||
rule.sends = editRuleObject.value.sends
|
||||
editRuleObject.value = {}
|
||||
editRuleModalOpen.value = false
|
||||
closeEditModal()
|
||||
successMessage('Rule successfully updated')
|
||||
})
|
||||
.catch(error => {
|
||||
@ -1091,7 +1160,7 @@ const deactivateRule = id => {
|
||||
})
|
||||
}
|
||||
|
||||
const reorderRules = () => {
|
||||
const reorderRules = (displaySuccess = true) => {
|
||||
axios
|
||||
.post(
|
||||
`/api/v1/reorder-rules`,
|
||||
@ -1103,7 +1172,9 @@ const reorderRules = () => {
|
||||
},
|
||||
)
|
||||
.then(response => {
|
||||
successMessage('Rule order successfully updated')
|
||||
if (displaySuccess) {
|
||||
successMessage('Rule order successfully updated')
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
if (error.response !== undefined) {
|
||||
@ -1252,3 +1323,10 @@ const errorMessage = (text = 'An error has occurred, please try again later') =>
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.ghost {
|
||||
opacity: 0.5;
|
||||
background: #c8ebfb;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -212,7 +212,7 @@ class RulesTest extends TestCase
|
||||
/** @test */
|
||||
public function it_can_apply_user_rules()
|
||||
{
|
||||
Rule::factory()->create([
|
||||
$rule = Rule::factory()->create([
|
||||
'user_id' => $this->user->id,
|
||||
'conditions' => [
|
||||
[
|
||||
@ -247,6 +247,8 @@ class RulesTest extends TestCase
|
||||
'forwards' => true,
|
||||
'replies' => false,
|
||||
'sends' => false,
|
||||
'applied' => 0,
|
||||
'last_applied' => null,
|
||||
]);
|
||||
|
||||
$alias = Alias::factory()->create([
|
||||
@ -269,12 +271,19 @@ class RulesTest extends TestCase
|
||||
$email = $job->build();
|
||||
|
||||
$this->assertEquals('New Subject!', $email->subject);
|
||||
|
||||
$this->assertDatabaseHas('rules', [
|
||||
'id' => $rule->id,
|
||||
'user_id' => $this->user->id,
|
||||
'applied' => 1,
|
||||
'last_applied' => now(),
|
||||
]);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function it_does_not_apply_rules_if_email_type_is_not_selected()
|
||||
{
|
||||
Rule::factory()->create([
|
||||
$rule = Rule::factory()->create([
|
||||
'user_id' => $this->user->id,
|
||||
'conditions' => [
|
||||
[
|
||||
@ -331,6 +340,13 @@ class RulesTest extends TestCase
|
||||
$email = $job->build();
|
||||
|
||||
$this->assertEquals($parser->getHeader('subject'), $email->subject);
|
||||
|
||||
$this->assertDatabaseHas('rules', [
|
||||
'id' => $rule->id,
|
||||
'user_id' => $this->user->id,
|
||||
'applied' => 0,
|
||||
'last_applied' => null,
|
||||
]);
|
||||
}
|
||||
|
||||
/** @test */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user