mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-13 10:42:16 +01:00
Added importer details endpoint
This commit is contained in:
committed by
Gregor Vostrak
parent
fe61a54c35
commit
1f79d5e50a
@@ -84,4 +84,16 @@ class ClockifyProjectsImporter extends DefaultImporter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getName(): string
|
||||
{
|
||||
return __('importer.clockify_projects.name');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription(): string
|
||||
{
|
||||
return __('importer.clockify_projects.description');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,4 +158,16 @@ class ClockifyTimeEntriesImporter extends DefaultImporter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getName(): string
|
||||
{
|
||||
return __('importer.toggl_data_importer.name');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription(): string
|
||||
{
|
||||
return __('importer.toggl_data_importer.description');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,4 +13,8 @@ interface ImporterContract
|
||||
public function importData(string $data): void;
|
||||
|
||||
public function getReport(): ReportDto;
|
||||
|
||||
public function getName(): string;
|
||||
|
||||
public function getDescription(): string;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,14 @@ class ImporterProvider
|
||||
return array_keys($this->importers);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, class-string<ImporterContract>>
|
||||
*/
|
||||
public function getImporters(): array
|
||||
{
|
||||
return $this->importers;
|
||||
}
|
||||
|
||||
public function getImporter(string $type): ImporterContract
|
||||
{
|
||||
if (! array_key_exists($type, $this->importers)) {
|
||||
|
||||
@@ -114,4 +114,16 @@ class TogglDataImporter extends DefaultImporter
|
||||
throw new ImportException('Unknown error');
|
||||
}
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getName(): string
|
||||
{
|
||||
return __('importer.toggl_data_importer.name');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription(): string
|
||||
{
|
||||
return __('importer.toggl_data_importer.description');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,4 +142,16 @@ class TogglTimeEntriesImporter extends DefaultImporter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getName(): string
|
||||
{
|
||||
return __('importer.toggl_time_entries.name');
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getDescription(): string
|
||||
{
|
||||
return __('importer.toggl_time_entries.description');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user