dev #14258
убрал возможность редактирования имени при оформлении заказа, информацию из айка сделал на прошлых задачах
This commit is contained in:
parent
2428870ba8
commit
ac7709b64e
@ -146,7 +146,7 @@ export class UserDataOrderComponent implements OnInit, OnDestroy {
|
||||
const houseValidators = name === 'Доставка' ? [Validators.required, Validators.maxLength(10),] : []
|
||||
const userDataForm = this.fb.group({
|
||||
phone: [this.userData.phone],
|
||||
first_name: [this.userData.first_name, [Validators.required, Validators.minLength(2), Validators.maxLength(255),]],
|
||||
first_name: [this.userData.first_name, [Validators.required, Validators.minLength(2), Validators.maxLength(255)]],
|
||||
// last_name: [this.userData.last_name, [Validators.required, Validators.minLength(2), Validators.maxLength(255),]],
|
||||
street: [this.userData.street, streetValidators],
|
||||
house: [this.userData.house, houseValidators],
|
||||
@ -241,7 +241,7 @@ export class UserDataOrderComponent implements OnInit, OnDestroy {
|
||||
return this.fb.group({
|
||||
selectedTerminal: [{ value: this.selectedTerminal, disabled: true }, []],
|
||||
phone: [this.userData.phone],
|
||||
first_name: [this.userData.name, [Validators.required, Validators.minLength(2), Validators.maxLength(255),]],
|
||||
first_name: [{value: this.userData.name, disabled: true}, [Validators.required, Validators.minLength(2), Validators.maxLength(255),]],
|
||||
// last_name: [this.userData.last_name, [Validators.required, Validators.minLength(2), Validators.maxLength(255),]],
|
||||
street: [{ value: this.userData.street, disabled: isSelfDelivery }, isSelfDelivery ?? [Validators.required, Validators.minLength(2), Validators.maxLength(255),]],
|
||||
house: [{ value: this.userData.house, disabled: isSelfDelivery }, isSelfDelivery ?? [Validators.required, Validators.maxLength(10), Validators.pattern('^\\d+[-|\\d]+\\d+$|^\\d*$')]],
|
||||
|
||||
@ -171,16 +171,16 @@ export class OrderService {
|
||||
.pipe(
|
||||
tap({
|
||||
next: (_) => {
|
||||
this.jsonRpcService
|
||||
.rpc(
|
||||
{
|
||||
method: 'updateAdditionalInfo',
|
||||
params: [this.order.userData, this.order.deliveryData],
|
||||
},
|
||||
RpcService.authService,
|
||||
true
|
||||
)
|
||||
.subscribe();
|
||||
// this.jsonRpcService
|
||||
// .rpc(
|
||||
// {
|
||||
// method: 'updateAdditionalInfo',
|
||||
// params: [this.order.userData, this.order.deliveryData],
|
||||
// },
|
||||
// RpcService.authService,
|
||||
// true
|
||||
// )
|
||||
// .subscribe();
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user