]> _ Git - psq.git/commitdiff
wip #7904 @2.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Dec 2025 16:40:54 +0000 (17:40 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Dec 2025 16:40:54 +0000 (17:40 +0100)
.idea/runConfigurations/Docker_terminal.xml [new file with mode: 0644]
.idea/runConfigurations/Restart_workers.xml [new file with mode: 0644]
app/Http/Controllers/Admin/PublishController.php
app/Jobs/ProcessEmailBatch.php
database/migrations/2025_12_18_152837_add_batch_uuid_column_to_pdf_files.php [new file with mode: 0644]
resources/js/components/Publish/PublishLetter.vue
resources/js/components/Publish/Step1UploadFile.vue

diff --git a/.idea/runConfigurations/Docker_terminal.xml b/.idea/runConfigurations/Docker_terminal.xml
new file mode 100644 (file)
index 0000000..336f6c8
--- /dev/null
@@ -0,0 +1,17 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="Docker terminal" type="ShConfigurationType">
+    <option name="SCRIPT_TEXT" value="" />
+    <option name="INDEPENDENT_SCRIPT_PATH" value="false" />
+    <option name="SCRIPT_PATH" value="$PROJECT_DIR$/.docker/production/dockerterminal.bat" />
+    <option name="SCRIPT_OPTIONS" value="" />
+    <option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
+    <option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+    <option name="INDEPENDENT_INTERPRETER_PATH" value="false" />
+    <option name="INTERPRETER_PATH" value="C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" />
+    <option name="INTERPRETER_OPTIONS" value="" />
+    <option name="EXECUTE_IN_TERMINAL" value="true" />
+    <option name="EXECUTE_SCRIPT_FILE" value="true" />
+    <envs />
+    <method v="2" />
+  </configuration>
+</component>
\ No newline at end of file
diff --git a/.idea/runConfigurations/Restart_workers.xml b/.idea/runConfigurations/Restart_workers.xml
new file mode 100644 (file)
index 0000000..3df8300
--- /dev/null
@@ -0,0 +1,17 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="Restart workers" type="ShConfigurationType">
+    <option name="SCRIPT_TEXT" value="" />
+    <option name="INDEPENDENT_SCRIPT_PATH" value="false" />
+    <option name="SCRIPT_PATH" value="$PROJECT_DIR$/.docker/production/restartworkers.bat" />
+    <option name="SCRIPT_OPTIONS" value="" />
+    <option name="INDEPENDENT_SCRIPT_WORKING_DIRECTORY" value="true" />
+    <option name="SCRIPT_WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+    <option name="INDEPENDENT_INTERPRETER_PATH" value="false" />
+    <option name="INTERPRETER_PATH" value="powershell.C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe" />
+    <option name="INTERPRETER_OPTIONS" value="" />
+    <option name="EXECUTE_IN_TERMINAL" value="true" />
+    <option name="EXECUTE_SCRIPT_FILE" value="true" />
+    <envs />
+    <method v="2" />
+  </configuration>
+</component>
\ No newline at end of file
index 5bab39cdd0286424a06d5106b14b5bcb4e914d61..8f9a06c5c99d422ce32c607c90654ff4a9d2771e 100644 (file)
@@ -50,8 +50,8 @@ class PublishController extends Controller
                         <p>Voici la nouvelle édition du jour !</p>
                         <br>
                         <div style="text-align: center;width: 300px;margin:0 auto;">
-                        <a href="%url%"><img src="%cover%" style="width:300px;height:auto;" /></a><br>
-                        <a href="%url%" style="margin: 0 auto;border-radius: 5px;color: #fff;background-color: #074e9c;">Cliquez ici pour lire !</a>
+                        <a href="%url%"><img src="%cover%" style="width:300px;height:auto;" /></a><br><br>
+                        <a href="%url%" style="text-decoration:none;padding:9px 20px;font-weight:bold;margin: 0 auto;border-radius: 5px;color: #fff;background-color: #074e9c;">Cliquez ici pour lire !</a>
                         </div>'
             ],
         ];
index 284dba7473a0d6207017213ca4d0cc3027069a37..06358d70e399763abd064a4d12d28628b3a5a348 100644 (file)
@@ -154,7 +154,6 @@ class ProcessEmailBatch implements ShouldQueue
                 $h = str_replace('%name%', $user->name, $h);
                 $h = str_replace('%url%', $this->batch->file->getMailableUrl($user), $h);
                 $h = str_replace('%cover%', $this->batch->file->coverUrl, $h);
-                dd($h);
 
                 $message->from(config('mail.from.address'), config('mail.from_name'));
                 $message->subject($this->batch->subject);
diff --git a/database/migrations/2025_12_18_152837_add_batch_uuid_column_to_pdf_files.php b/database/migrations/2025_12_18_152837_add_batch_uuid_column_to_pdf_files.php
new file mode 100644 (file)
index 0000000..6ff20b4
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddBatchUUIDColumnToPdfFiles extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('pdf_files', function (Blueprint $table) {
+            $table->text('batch_uuid');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('pdf_files', function (Blueprint $table) {
+            $table->dropColumn('batch_uuid');
+        });
+    }
+}
index c8f46ac9217640587ad750511895b590d320f583..f6edff3cfe15f28478fce5918aaabe77bdc11587 100644 (file)
@@ -2,93 +2,93 @@
     <div>
         <h1 class="mb-6">Publier une lettre</h1>
 
-<!--        <card-->
-<!--            class="flex flex-col items-center justify-center"-->
-<!--            style="min-height: 300px"-->
-<!--        >-->
-<!--        </card>-->
-            <horizontal-stepper :steps="steps"
-                                @completed-step="completeStep"
-                                @active-step="isStepActive"
-                                @stepper-finished="alert"
-                                @clicking-back="back"
-            >
-            </horizontal-stepper>
+        <!--        <card-->
+        <!--            class="flex flex-col items-center justify-center"-->
+        <!--            style="min-height: 300px"-->
+        <!--        >-->
+        <!--        </card>-->
+        <horizontal-stepper :steps="steps"
+                            @completed-step="completeStep"
+                            @active-step="isStepActive"
+                            @stepper-finished="alert"
+                            @clicking-back="back"
+        >
+        </horizontal-stepper>
 
 
     </div>
 </template>
 
 <script>
-    /**
    * Step 1 : Upload PDF and preview (add title, tags)
    * Step 2 : Add email subject and content
    * Step 3 : Review, send and track
    */
-    import HorizontalStepper from 'vue-stepper';
-    import Step1UploadFile from "./Step1UploadFile";
-    import Step3Send from "./Step3Send";
+/**
+ * Step 1 : Upload PDF and preview (add title, tags)
+ * Step 2 : Add email subject and content
+ * Step 3 : Review, send and track
+ */
+import HorizontalStepper from 'vue-stepper';
+import Step1UploadFile from "./Step1UploadFile";
+import Step3Send from "./Step3Send";
 
-    export default {
-        components : {
-            HorizontalStepper
-        },
-        data(){
-                return {
-                    steps: [
-                        {
-                            icon: 'cloud_upload',
-                            name: 'upload',
-                            title: 'Mise en ligne du PDF',
-                            subtitle: 'Création de la liseuse',
-                            component: Step1UploadFile,
-                            completed: false
+export default {
+    components: {
+        HorizontalStepper
+    },
+    data() {
+        return {
+            steps: [
+                {
+                    icon: 'cloud_upload',
+                    name: 'upload',
+                    title: 'Mise en ligne du PDF',
+                    subtitle: 'Création de la liseuse',
+                    component: Step1UploadFile,
+                    completed: false
 
-                        },
-                        {
-                            icon: 'send',
-                            name: 'review',
-                            title: 'Récapitulatif et envoi',
-                            subtitle: 'Suivi des envois',
-                            component: Step3Send,
-                            completed: false
+                },
+                {
+                    icon: 'send',
+                    name: 'review',
+                    title: 'Récapitulatif et envoi',
+                    subtitle: 'Suivi des envois',
+                    component: Step3Send,
+                    completed: false
 
-                        },
-                    ]
-                }
-            },
-        mounted() {
+                },
+            ]
+        }
+    },
+    mounted() {
 
+    },
+    methods: {
+        // Executed when @completed-step event is triggered
+        completeStep(payload) {
+            this.steps.forEach((step) => {
+                if (step.name === payload.name) {
+                    step.completed = true;
+                }
+            })
         },
-        methods: {
-            // Executed when @completed-step event is triggered
-            completeStep(payload) {
-                this.steps.forEach((step) => {
-                    if (step.name === payload.name) {
-                        step.completed = true;
-                    }
-                })
-            },
-            // Executed when @active-step event is triggered
-            isStepActive(payload) {
-                this.steps.forEach((step) => {
-                    if (step.name === payload.name) {
-                        if(step.completed === true) {
-                            step.completed = false;
-                        }
+        // Executed when @active-step event is triggered
+        isStepActive(payload) {
+            this.steps.forEach((step) => {
+                if (step.name === payload.name) {
+                    if (step.completed === true) {
+                        step.completed = false;
                     }
-                })
-            },
-            // Executed when @stepper-finished event is triggered
-            alert(payload) {
-                alert('end')
-            },
-            back(payload){
-
-            }
+                }
+            })
+        },
+        // Executed when @stepper-finished event is triggered
+        alert(payload) {
+            window.location = '/publish/pdfFiles';
+        },
+        back(payload) {
 
         }
+
     }
+}
 </script>
 
 <style>
index f6e6fbf2a41f909afd7dba2252e72e6d6de31fa4..ef605b05f3d531d347b23a6e82eacb9ebb4b8e5a 100644 (file)
                     <i class="fas fa-check"></i>&nbsp;
                     <span><strong>{{ collections.find(c => c.id === file_collection).name }}</strong> {{ file_ref }} enregistré. Vous pouvez passer à l'étape suivante.</span>
                 </div>
-                <div class="row">
+                <div>
                     <div class="col-6">
                         <img :src="$root.publishState.file.coverUrl" class="mx-auto my-3 d-block" style="width: 200px;"
                              alt="">