@procraft/widget-order 2.30.4 → 2.30.6
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.
- package/dist/CourseItem/index.js +7 -14
- package/dist/CourseItem/index.js.map +1 -1
- package/dist/modules/gql/generated/types.d.ts +1 -0
- package/dist/modules/gql/generated/types.js +1 -0
- package/dist/modules/gql/generated/types.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/CourseItem/index.tsx +7 -18
- package/src/modules/gql/generated/schema.json +6 -0
- package/src/modules/gql/generated/types.ts +1 -0
package/package.json
CHANGED
package/src/CourseItem/index.tsx
CHANGED
|
@@ -11,8 +11,7 @@ import {
|
|
|
11
11
|
} from '../constants/colors'
|
|
12
12
|
import { usePrices } from '../hooks/usePrices'
|
|
13
13
|
import {
|
|
14
|
-
CatalogFieldValueType,
|
|
15
|
-
CourseTariffFlowBehaviour,
|
|
14
|
+
CatalogFieldValueType, CourseSubKind,
|
|
16
15
|
} from '../modules/gql/generated/types'
|
|
17
16
|
import { FieldValuesProps } from './FieldValues/interfaces'
|
|
18
17
|
import { FieldValuesByType } from './FieldValuesByType'
|
|
@@ -22,6 +21,7 @@ import { OrderButton } from './OrderButton'
|
|
|
22
21
|
import { Reviews } from './Reviews'
|
|
23
22
|
import Sales from './Sales'
|
|
24
23
|
import { BoxStyled, NavigationStyled, WidgetStyled } from './styles'
|
|
24
|
+
import { formatCourseSubKindLabel } from '../models/Course'
|
|
25
25
|
|
|
26
26
|
const CourseItem: React.FC<CourseItemComponentProps> = (props) => {
|
|
27
27
|
const {
|
|
@@ -135,21 +135,10 @@ const CourseItem: React.FC<CourseItemComponentProps> = (props) => {
|
|
|
135
135
|
|
|
136
136
|
const tariff = course.tariffs?.find((n) => n.uid === item.course?.tariffId)
|
|
137
137
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
flowBehaviourTitle = 'Постоянный набор'
|
|
143
|
-
break
|
|
144
|
-
|
|
145
|
-
case CourseTariffFlowBehaviour.MULTIPLE:
|
|
146
|
-
flowBehaviourTitle = 'Поточный набор'
|
|
147
|
-
break
|
|
148
|
-
|
|
149
|
-
case CourseTariffFlowBehaviour.SINGLE:
|
|
150
|
-
flowBehaviourTitle = 'Разовый набор'
|
|
151
|
-
break
|
|
152
|
-
}
|
|
138
|
+
const title = formatCourseSubKindLabel({
|
|
139
|
+
subKind: course.subKind ?? CourseSubKind.COURSE,
|
|
140
|
+
subKindLabel: course.subKindLabel,
|
|
141
|
+
})
|
|
153
142
|
|
|
154
143
|
return (
|
|
155
144
|
<>
|
|
@@ -157,7 +146,7 @@ const CourseItem: React.FC<CourseItemComponentProps> = (props) => {
|
|
|
157
146
|
<NavigationStyled style={{ backgroundColor: titleBgColor }}>
|
|
158
147
|
<Typography>
|
|
159
148
|
<span style={{ color: titleTextColor }}>
|
|
160
|
-
{
|
|
149
|
+
{title}
|
|
161
150
|
</span>
|
|
162
151
|
</Typography>
|
|
163
152
|
</NavigationStyled>
|
|
@@ -2837,6 +2837,12 @@
|
|
|
2837
2837
|
"isDeprecated": false,
|
|
2838
2838
|
"deprecationReason": null
|
|
2839
2839
|
},
|
|
2840
|
+
{
|
|
2841
|
+
"name": "FreeByOption",
|
|
2842
|
+
"description": null,
|
|
2843
|
+
"isDeprecated": false,
|
|
2844
|
+
"deprecationReason": null
|
|
2845
|
+
},
|
|
2840
2846
|
{
|
|
2841
2847
|
"name": "Fixed",
|
|
2842
2848
|
"description": null,
|