mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 12:42:15 +01:00
Added timezone to registration
This commit is contained in:
@@ -12,6 +12,7 @@ use App\Models\Task;
|
||||
use App\Models\User;
|
||||
use App\Service\ColorService;
|
||||
use App\Service\Import\ImportDatabaseHelper;
|
||||
use App\Service\TimezoneService;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
abstract class DefaultImporter implements ImporterContract
|
||||
@@ -47,6 +48,8 @@ abstract class DefaultImporter implements ImporterContract
|
||||
|
||||
protected ColorService $colorService;
|
||||
|
||||
protected TimezoneService $timezoneService;
|
||||
|
||||
public function init(Organization $organization): void
|
||||
{
|
||||
$this->organization = $organization;
|
||||
@@ -62,6 +65,10 @@ abstract class DefaultImporter implements ImporterContract
|
||||
'required',
|
||||
'max:255',
|
||||
],
|
||||
'timezone' => [
|
||||
'required',
|
||||
'timezone:all',
|
||||
],
|
||||
]);
|
||||
$this->projectImportHelper = new ImportDatabaseHelper(Project::class, ['name', 'organization_id'], true, function (Builder $builder) {
|
||||
return $builder->where('organization_id', $this->organization->id);
|
||||
@@ -97,6 +104,7 @@ abstract class DefaultImporter implements ImporterContract
|
||||
]);
|
||||
$this->timeEntriesCreated = 0;
|
||||
$this->colorService = app(ColorService::class);
|
||||
$this->timezoneService = app(TimezoneService::class);
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
|
||||
Reference in New Issue
Block a user