@snabcentr/client-ui 5.3.1 → 5.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,7 +17,7 @@ import { AsyncPipe, DOCUMENT, NgTemplateOutlet, NgClass, CommonModule, DecimalPi
|
|
|
17
17
|
import { isValidPhoneNumber } from 'libphonenumber-js/max';
|
|
18
18
|
import { MaskitoDirective } from '@maskito/angular';
|
|
19
19
|
import { getCountries } from 'libphonenumber-js';
|
|
20
|
-
import { isNil, isUndefined, isObject,
|
|
20
|
+
import { isNil, isUndefined, isObject, isString, isArray } from 'lodash-es';
|
|
21
21
|
import { POLYMORPHEUS_CONTEXT, PolymorpheusComponent, PolymorpheusTemplate, PolymorpheusOutlet, injectContext } from '@taiga-ui/polymorpheus';
|
|
22
22
|
import { QRCodeComponent } from 'angularx-qrcode';
|
|
23
23
|
import * as i3 from '@taiga-ui/core/portals/dropdown';
|
|
@@ -8325,9 +8325,12 @@ class ScOrderFormComponent {
|
|
|
8325
8325
|
/**
|
|
8326
8326
|
* Возвращает признак, что указанная дата недоступна для выбора.
|
|
8327
8327
|
*
|
|
8328
|
-
* @
|
|
8328
|
+
* Календарь передаёт сюда {@link TuiDay}, а валидатор недоступных элементов поля ({@link TuiItemsHandlersValidator})
|
|
8329
|
+
* уже преобразованное значение контрола (строку формата `"YYYY-MM-DD 00:00:00"`), поэтому обрабатываем оба случая.
|
|
8330
|
+
*
|
|
8331
|
+
* @param date Дата в виде {@link TuiDay} или строки значения контрола.
|
|
8329
8332
|
*/
|
|
8330
|
-
this.deliveryDateFilter = (date) => !this.deliveryDates().includes(`${date.toString('yyyy/mm/dd', '-')} 00:00:00`);
|
|
8333
|
+
this.deliveryDateFilter = (date) => !this.deliveryDates().includes(isString(date) ? date : `${date.toString('yyyy/mm/dd', '-')} 00:00:00`);
|
|
8331
8334
|
// Автоматически выбираем единственного контрагента-физлицо.
|
|
8332
8335
|
this.contragents$
|
|
8333
8336
|
.pipe(filter((contragents) => !!contragents && contragents.length === 1), first(), filter(([contragent]) => contragent.opf.id === ScOpfList.individual.valueOf()), takeUntilDestroyed(this.destroyRef))
|