mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-17 20:52:14 +01:00
Added billable flag to projects
This commit is contained in:
committed by
Constantin Graf
parent
20f9b344f6
commit
86555664c5
@@ -41,6 +41,7 @@ class ClockifyProjectsImporter extends DefaultImporter
|
||||
], [
|
||||
'client_id' => $clientId,
|
||||
'color' => $this->colorService->getRandomColor(),
|
||||
'is_billable' => $record['Billability'] === 'Yes',
|
||||
'billable_rate' => $billableRateKey !== null && $record[$billableRateKey] !== '' ? (int) (((float) $record[$billableRateKey]) * 100) : null,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -96,6 +96,10 @@ abstract class DefaultImporter implements ImporterContract
|
||||
'required',
|
||||
'max:255',
|
||||
],
|
||||
'is_billable' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'billable_rate' => [
|
||||
'nullable',
|
||||
'integer',
|
||||
|
||||
@@ -121,6 +121,7 @@ class TogglDataImporter extends DefaultImporter
|
||||
], [
|
||||
'client_id' => $clientId,
|
||||
'color' => $project->color,
|
||||
'is_billable' => $project->rate !== null,
|
||||
'billable_rate' => $project->rate !== null ? (int) ($project->rate * 100) : null,
|
||||
], (string) $project->id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user