1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Refactor Purchase class to update defaultSteps() method

This commit is contained in:
Benjamin Beganović 2024-03-12 17:13:53 +01:00
parent ba30108e50
commit 360d6325f5

View File

@ -120,12 +120,8 @@ class Purchase extends Component
public static function defaultSteps() public static function defaultSteps()
{ {
return [ return [
Setup::class,
Cart::class, Cart::class,
RegisterOrLogin::class, RegisterOrLogin::class,
RFF::class,
Methods::class,
Submit::class,
]; ];
} }
@ -146,7 +142,13 @@ class Purchase extends Component
Submit::class, Submit::class,
]; ];
} else { } else {
$this->steps = self::defaultSteps(); $this->steps = [
Setup::class,
...self::defaultSteps(),
Methods::class,
RFF::class,
Submit::class,
];
} }
$this->id = Str::uuid(); $this->id = Str::uuid();