Преглед изворни кода

feat: ✨ Added weekly to billing_period options

IceToast пре 3 година
родитељ
комит
9e8bd0a2d3

+ 2 - 2
app/Http/Controllers/Admin/ProductController.php

@@ -73,7 +73,7 @@ class ProductController extends Controller
             "nodes.*" => "required|exists:nodes,id",
             "eggs.*" => "required|exists:eggs,id",
             "disabled" => "nullable",
-            "billing_period" => "required|in:hourly,daily,monthly",
+            "billing_period" => "required|in:hourly,daily,weekly,monthly",
         ]);
 
         $disabled = !is_null($request->input('disabled'));
@@ -140,7 +140,7 @@ class ProductController extends Controller
             "nodes.*" => "required|exists:nodes,id",
             "eggs.*" => "required|exists:eggs,id",
             "disabled" => "nullable",
-            "billing_period" => "required|in:hourly,daily,monthly",
+            "billing_period" => "required|in:hourly,daily,weekly,monthly",
         ]);
 
         $disabled = !is_null($request->input('disabled'));

+ 4 - 0
resources/views/admin/products/create.blade.php

@@ -177,6 +177,10 @@
                                                     <option value="daily" @if ($product->billing_period  == 'daily') selected
                                                     @endif>
                                                         {{__('Daily')}}
+                                                    </option>
+                                                    <option value="weekly" @if ($product->billing_period  == 'weekly') selected
+                                                    @endif>
+                                                        {{__('Weekly')}}
                                                     </option>
                                                      <option value="monthly" @if ($product->billing_period  == 'monthly') selected
                                                      @endif>

+ 4 - 0
resources/views/admin/products/edit.blade.php

@@ -179,6 +179,10 @@
                                                     <option value="daily" @if ($product->billing_period  == 'daily') selected
                                                     @endif>
                                                         {{__('Daily')}}
+                                                    </option>
+                                                    <option value="weekly" @if ($product->billing_period  == 'weekly') selected
+                                                    @endif>
+                                                        {{__('Weekly')}}
                                                     </option>
                                                      <option value="monthly" @if ($product->billing_period  == 'monthly') selected
                                                      @endif>