Skip to content

Commit 588e51c

Browse files
committed
feat: #562 Show read only GUID field
1 parent f52309e commit 588e51c

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

src/app/modules/customer-management/components/customer-info/components/create-customer/create-customer.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
<div class="container">
22
<form style="width: 600px;" [formGroup]="customerForm" (ngSubmit)="onSubmit(customerForm.value)">
33
<div class="form-group">
4+
<div class="form-group">
5+
<input
6+
type="text"
7+
class="form-control form-control-sm"
8+
id="customerId"
9+
value="{{customerId}}"
10+
readonly
11+
disabled
12+
*ngIf="this.customerToEdit"
13+
/>
14+
</div>
415
<input
516
class="form-control form-control-sm"
617
id="customerName"

src/app/modules/customer-management/components/customer-info/components/create-customer/create-customer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export class CreateCustomerComponent implements OnInit, OnDestroy {
2727
@Output() closeCustomerComponent = new EventEmitter<boolean>();
2828
customerToEdit: Customer;
2929
editSubscription: Subscription;
30+
customerId: string;
3031

3132
constructor(private formBuilder: FormBuilder, private store: Store<CustomerState>) {
3233
this.customerForm = this.formBuilder.group({
@@ -68,6 +69,7 @@ export class CreateCustomerComponent implements OnInit, OnDestroy {
6869
this.store.dispatch(new LoadProjectTypes(customerData.id));
6970
this.store.dispatch(new LoadCustomerProjects(customerData.id));
7071
this.changeValueAreTabsActives.emit(true);
72+
this.customerId = 'Customer ID: ' + customerData.id;
7173
this.customerForm.setValue({
7274
name: customerData.name,
7375
description: customerData.description,

src/app/modules/customer-management/components/projects/components/create-project/create-project.component.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
<form style="width: 600px;" [formGroup]="projectForm" (ngSubmit)="onSubmit(projectForm.value)">
2+
<div class="form-group">
3+
<input
4+
type="text"
5+
class="form-control form-control-sm"
6+
id="projectId"
7+
value="{{projectId}}"
8+
readonly
9+
disabled
10+
*ngIf="this.projectToEdit"
11+
/>
12+
</div>
213
<div class="form-group">
314
<input
415
type="text"

src/app/modules/customer-management/components/projects/components/create-project/create-project.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export class CreateProjectComponent implements OnInit, OnDestroy {
2020
projectToEdit: Project;
2121
projectsTypes: ProjectType[] = [];
2222
customerId: string;
23+
projectId: string;
2324

2425
projectTypesSubscription: Subscription;
2526
projectToEditSubscription: Subscription;
@@ -87,6 +88,7 @@ export class CreateProjectComponent implements OnInit, OnDestroy {
8788

8889
setDataToUpdate(projectData: Project) {
8990
if (projectData) {
91+
this.projectId = 'Project ID: ' + projectData.id;
9092
this.projectForm.setValue({
9193
name: projectData.name,
9294
description: projectData.description,

0 commit comments

Comments
 (0)