Просмотр исходного кода

feat: ✨ Added weekly to billing_period options

IceToast 3 лет назад
Родитель
Сommit
681928c3ad

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

@@ -72,7 +72,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'));
@@ -139,7 +139,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
themes/default/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
themes/default/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>