Fix SIO to SEO

This commit is contained in:
Vincent BRIDIER 2022-08-30 14:14:08 +02:00
parent 1fd09c6bec
commit 8b637f7b13
No known key found for this signature in database
GPG key ID: 8571BFA20420D512
3 changed files with 6 additions and 8 deletions

View file

@ -6,7 +6,7 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
/**
* @method static self web()
* @method static self sio()
* @method static self seo()
* @method static self package()
* @method static self arbitrary()
*/
@ -21,7 +21,7 @@ class TaskType extends BaseEnumRoutable
{
return [
'web' => 1,
'sio' => 2,
'seo' => 2,
'package' => 3,
'arbitrary' => 4,
];
@ -36,7 +36,7 @@ class TaskType extends BaseEnumRoutable
{
return [
'web' => trans('Web'),
'sio' => trans('Sio'),
'seo' => trans('SEO'),
'package' => trans('Forfait'),
'arbitrary' => trans('Libre'),
];
@ -51,7 +51,7 @@ class TaskType extends BaseEnumRoutable
{
return [
'web' => 460,
'sio' => 690,
'seo' => 690,
// * Linked to packages table
'package' => 0,
// * Arbitrary number

View file

@ -36,7 +36,7 @@ class InvoiceFactory extends Factory
case TaskType::web():
$amount = $days * $type->price;
break;
case TaskType::sio():
case TaskType::seo():
$amount = $days * $type->price;
break;
case TaskType::package():

View file

@ -290,11 +290,9 @@ export default defineComponent({
},
updateAmount(index: number): void {
const task = this.tasks[index];
// task.type === getTaskTypeEnum('web').value ||
// task.type === getTaskTypeEnum('sio').value
switch (task.type) {
case this.getTaskTypeEnum("web").value:
case this.getTaskTypeEnum("sio").value:
case this.getTaskTypeEnum("seo").value:
task.amount = task.days * this.getTaskTypeEnum(task.type).price;
break;
case this.getTaskTypeEnum("forfait").value: