mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 00:02:15 +01:00
Prefill project name in create modal
Add optional initialProjectName prop to ProjectCreateModal and use it to initialize the project's name. Pass the TimeTracker dropdown's searchValue as initial-project-name so the create form is prefilled.
This commit is contained in:
committed by
Gregor Vostrak
parent
815abb5980
commit
b1287c6a0a
@@ -27,6 +27,7 @@ const props = defineProps<{
|
||||
currency: string;
|
||||
enableEstimatedTime: boolean;
|
||||
organizationBillableRate: number | null;
|
||||
initialProjectName?: string;
|
||||
}>();
|
||||
|
||||
const activeClients = computed(() => {
|
||||
@@ -34,7 +35,7 @@ const activeClients = computed(() => {
|
||||
});
|
||||
|
||||
const project = ref<CreateProjectBody>({
|
||||
name: '',
|
||||
name: props.initialProjectName ?? '',
|
||||
color: getRandomColor(),
|
||||
client_id: null,
|
||||
billable_rate: null,
|
||||
|
||||
@@ -664,7 +664,8 @@ const showCreateProject = ref(false);
|
||||
:organization-billable-rate="organizationBillableRate"
|
||||
:currency="currency"
|
||||
:clients="clients"
|
||||
:create-project></ProjectCreateModal>
|
||||
:create-project
|
||||
:initial-project-name="searchValue"></ProjectCreateModal>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user