]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6571 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 4 Jan 2024 19:17:23 +0000 (20:17 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 4 Jan 2024 19:17:23 +0000 (20:17 +0100)
.docker/docker-compose.yml
app/Fields/FluidbookExtranetTask.php
app/Fluidbook/Farm.php
app/Models/FluidbookPublication.php

index 3eceb68837809650bf339cbbf120983f5695fafd..eb1901718d178fcf25d8a1f378dd6d779b1ba103 100644 (file)
@@ -100,8 +100,8 @@ services:
     ports:
       - '37126:80'
     environment:
-      VIRTUAL_HOST: toolbox.fluidbook.com, ysl.toolbox.fluidbook.com
-      LETSENCRYPT_HOST: toolbox.fluidbook.com, ysl.toolbox.fluidbook.com
+      VIRTUAL_HOST: toolbox.fluidbook.com
+      LETSENCRYPT_HOST: toolbox.fluidbook.com
     networks:
       - fluidbook-toolbox
     restart: unless-stopped
index ab85d58f7ca813b33f745033285f003ffd100332..03bff017c546681b98ca90dc86a033031badc689 100644 (file)
@@ -2,6 +2,8 @@
 
 namespace App\Fields;
 
+use Cubist\Backpack\CubistCrudPanel;
+use Cubist\Backpack\Facades\App;
 use Cubist\Backpack\Magic\Fields\SelectFromArray;
 use Illuminate\Support\Facades\Cache;
 use Illuminate\Support\Facades\DB;
@@ -32,13 +34,23 @@ class FluidbookExtranetTask extends SelectFromArray
                 foreach ($tasks as $id => $task) {
                     static::$_taskOptions[$id] = $p->projet_id . ' | ' . $p->nom . ' > ' . $task->nom;
                 }
-
             }
         }
 
+        if ($this->issetCrud()) {
+            /** @var CubistCrudPanel $crud */
+            $crud=$this->getCrud();
+            $invoicable=$crud->getCurrentEntry()->invoicable_company;
+        }
+
         return static::$_taskOptions;
     }
 
+    protected function _postSetCrud()
+    {
+        $this->setAttribute('options', $this->getOptionsFiltered());
+    }
+
     protected static function _getProjects()
     {
         return Cache::remember('fluidbook_extranet_tasks_projects', 360, function () {
index ae9670212336b0f8f716cffcd9342be8f9a04a3d..f75424cf5c9dcb796149b06cb942156f3fc79fa4 100644 (file)
@@ -208,7 +208,7 @@ class Farm
     public static function lock($pdf, $operation, $callback)
     {
         $lockFile = $pdf . '.' . $operation . '.lock';
-        while (file_exists($lockFile) && filemtime($lockFile) > time() - 3600) {
+        while (file_exists($lockFile) && filemtime($lockFile) > (time() - 300)) {
             sleep(30);
         }
         touch($lockFile);
index 63319174c4ce827f84fc9b7a4d44411273499f5d..0fee1c895af698754355e992fdaa2cbc1bff7a6f 100644 (file)
@@ -315,9 +315,9 @@ class FluidbookPublication extends ToolboxStatusModel
         $this->install_online = $o;
     }
 
+
     public function onSaved(): bool
     {
-        $this->setComposedAttributes();
         $this->checkHash();
 
         $this->generateThumbnailsPreview();