- bump kwaadpepepr/crud-policies to 0.1.4

- added default to site colors
- fixed json issue
This commit is contained in:
Jérémy Munsch 2021-07-21 14:53:36 +02:00
parent 773ce22643
commit 78e26359b0
4 changed files with 13 additions and 10 deletions

View file

@ -32,6 +32,8 @@ class Societe extends Model
'colors' => 'array',
];
private $defaultColors = '{"primary":"#1D1646", "secondary": "#F6BE00", "color-background": "#FFF"}';
protected $attributes = [
'style' => '',
'colors' => '{"primary":"#1D1646", "secondary": "#F6BE00", "color-background": "#FFF"}'
@ -110,6 +112,8 @@ class Societe extends Model
'colors' => [
'label' => trans('Couleurs'),
'type' => CrudType::json(),
'default' => $this->defaultColors,
'mode' => 'form',
'validate' => [
'json',
// phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed

View file

@ -12,7 +12,7 @@
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"htmlmin/htmlmin": "^8.0",
"kwaadpepper/crud-policies": "^0.1.1",
"kwaadpepper/crud-policies": "^0.1.4",
"kwaadpepper/enum": "^0.1.4",
"kwaadpepper/image-resizer": "^0.0.3",
"laravel/framework": "^8.12",

14
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "24d9aa36e131e7867c72fa78c51cfcb5",
"content-hash": "f727f0633a7e5af6a3e7cbb9c3726797",
"packages": [
{
"name": "asm89/stack-cors",
@ -1683,16 +1683,16 @@
},
{
"name": "kwaadpepper/crud-policies",
"version": "0.1.1",
"version": "0.1.4",
"source": {
"type": "git",
"url": "https://github.com/Kwaadpepper/crud-policies.git",
"reference": "cb3bce79d646c8530add808f04d4406ded910fc9"
"reference": "c93285a231bf7c5d161d42517988c4b17ceeda61"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Kwaadpepper/crud-policies/zipball/cb3bce79d646c8530add808f04d4406ded910fc9",
"reference": "cb3bce79d646c8530add808f04d4406ded910fc9",
"url": "https://api.github.com/repos/Kwaadpepper/crud-policies/zipball/c93285a231bf7c5d161d42517988c4b17ceeda61",
"reference": "c93285a231bf7c5d161d42517988c4b17ceeda61",
"shasum": ""
},
"require": {
@ -1740,9 +1740,9 @@
],
"support": {
"issues": "https://github.com/Kwaadpepper/crud-policies/issues",
"source": "https://github.com/Kwaadpepper/crud-policies/tree/0.1.1"
"source": "https://github.com/Kwaadpepper/crud-policies/tree/0.1.4"
},
"time": "2021-07-19T13:20:33+00:00"
"time": "2021-07-21T12:49:30+00:00"
},
{
"name": "kwaadpepper/enum",

View file

@ -27,9 +27,8 @@
@stack('scriptsConstants')
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha256-edRDsV9ULIqKzKjpN/KjyQ7Lp4vUn9usbJuHjH8Sk+k=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.16/dist/sweetalert2.all.min.js" integrity="sha256-551HBsteMvKOSqjUXSmRy/EOF0bBNbWB96b5L3Deh8A=" crossorigin="anonymous"></script>
<script src="//cdn.jsdelivr.net/npm/sweetalert2@10"></script>
<script src="{{ asset('js/preload-back.js') }}"></script>
@stack('scripts')
@crudPoliciesJS()
@stack('scripts')
</body>
</html>