ShopApplyDiscount.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  1. <template>
  2. <div class="apply-discount">
  3. <q-banner class="banner apply-discount-top-banner">
  4. {{ mainTitle }}
  5. </q-banner>
  6. <q-card class="apply-discount-steps-card">
  7. <div class="apply-discount-step">
  8. <svg xmlns="http://www.w3.org/2000/svg"
  9. width="17.053"
  10. height="19.866"
  11. viewBox="0 0 17.053 19.866">
  12. <g id="Paper"
  13. transform="translate(0 0)">
  14. <path id="Combined_Shape"
  15. data-name="Combined Shape"
  16. d="M4.475,19.866A4.585,4.585,0,0,1,0,15.188V4.491A4.606,4.606,0,0,1,4.57.012h6.271a.758.758,0,0,1,.265,0h.131a.755.755,0,0,1,.541.23l5.065,5.277a.753.753,0,0,1,.209.519V15.2A4.615,4.615,0,0,1,12.6,19.865H4.475ZM1.5,4.509V15.2a3.091,3.091,0,0,0,3.009,3.162h8.064a3.109,3.109,0,0,0,2.979-3.155V6.984h-2.01a3.332,3.332,0,0,1-3.318-3.325V1.512H4.572A3.089,3.089,0,0,0,1.5,4.509Zm10.224-.85a1.828,1.828,0,0,0,1.82,1.824H14.73L11.724,2.353ZM5.387,14.108a.75.75,0,0,1,0-1.5h5.4a.75.75,0,0,1,0,1.5Zm0-3.752a.75.75,0,0,1,0-1.5H8.743a.75.75,0,0,1,0,1.5Z"
  17. transform="translate(0.001 0)"
  18. fill="#5b7a5f" />
  19. </g>
  20. </svg>
  21. <span class="title">
  22. {{ step1Title }}
  23. <svg xmlns="http://www.w3.org/2000/svg"
  24. width="15"
  25. height="15"
  26. viewBox="0 0 15 15">
  27. <g id="Group_11510"
  28. data-name="Group 11510"
  29. transform="translate(-1215 -335)">
  30. <circle id="Ellipse_819"
  31. data-name="Ellipse 819"
  32. cx="7.5"
  33. cy="7.5"
  34. r="7.5"
  35. transform="translate(1215 335)"
  36. fill="#19cb99" />
  37. <path id="Path"
  38. d="M8.615,1.5l-4.75,4.75a.881.881,0,0,1-1.23,0L.255,3.875A.877.877,0,0,1,1.5,2.635l1.75,1.75L7.375.255A.877.877,0,0,1,8.615,1.5"
  39. transform="translate(1218 339)"
  40. fill="#f6f6f6" />
  41. </g>
  42. </svg>
  43. </span>
  44. </div>
  45. <div class="apply-discount-step">
  46. <svg xmlns="http://www.w3.org/2000/svg"
  47. width="15.84"
  48. height="19.87"
  49. viewBox="0 0 15.84 19.87">
  50. <g id="Profile"
  51. transform="translate(0 0)">
  52. <path id="Combined_Shape"
  53. data-name="Combined Shape"
  54. d="M0,16.174c0-3.3,4.521-3.677,7.921-3.677,1.958,0,7.919,0,7.919,3.7,0,3.295-4.52,3.677-7.919,3.677C5.962,19.87,0,19.87,0,16.174Zm1.5,0c0,1.458,2.16,2.2,6.421,2.2s6.419-.733,6.419-2.177S12.18,14,7.921,14,1.5,14.729,1.5,16.174Zm6.389-5.555A5.31,5.31,0,0,1,7.921,0a5.31,5.31,0,0,1,0,10.619ZM4.038,5.31A3.873,3.873,0,0,0,7.892,9.192l.029.715V9.192A3.882,3.882,0,1,0,4.038,5.31Z"
  55. transform="translate(0 0)"
  56. fill="#bcbcbc" />
  57. </g>
  58. </svg>
  59. <span class="title">
  60. بازبینی
  61. </span>
  62. </div>
  63. <div v-if="showPayStage"
  64. class="apply-discount-step">
  65. <svg xmlns="http://www.w3.org/2000/svg"
  66. width="20.639"
  67. height="19.173"
  68. viewBox="0 0 20.639 19.173">
  69. <g id="Wallet"
  70. transform="translate(0)">
  71. <path id="Combined_Shape"
  72. data-name="Combined Shape"
  73. d="M6,19.173a6,6,0,0,1-6-6V6A6,6,0,0,1,6,0h8.645a6,6,0,0,1,6,6v7.178a6,6,0,0,1-6,6ZM1.5,6v7.178a4.5,4.5,0,0,0,4.5,4.5h8.645a4.5,4.5,0,0,0,4.5-4.5V12.9h-3.3a3.441,3.441,0,1,1,0-6.881h3.3V6a4.5,4.5,0,0,0-4.5-4.5H6A4.5,4.5,0,0,0,1.5,6ZM13.9,9.455a1.945,1.945,0,0,0,1.942,1.94h3.3V7.513h-3.3A1.946,1.946,0,0,0,13.9,9.455Zm2.088.688a.75.75,0,0,1,0-1.5H16.3a.75.75,0,0,1,0,1.5ZM5.286,6.038a.75.75,0,0,1,0-1.5h5.4a.75.75,0,1,1,0,1.5Z"
  74. transform="translate(0 0)"
  75. fill="#bcbcbc" />
  76. </g>
  77. </svg>
  78. <span class="title">
  79. پرداخت
  80. </span>
  81. </div>
  82. </q-card>
  83. <div class="step1">
  84. <div class="step1__cart-items">
  85. <div class="cart-item">
  86. <div class="cart-item__use-type">
  87. <q-icon :name="usageIcon" />
  88. </div>
  89. <div class="cart-item__thumbnail">
  90. <q-img :src="classroom.thumbnail" />
  91. </div>
  92. <div class="cart-item__info">
  93. <div class="cart-item__title">
  94. {{ classroom.title }}
  95. </div>
  96. <div class="cart-item__attrs">
  97. <div class="cart-item__attr">
  98. <div class="cart-item__attr-label">
  99. نوع برگزاری:
  100. </div>
  101. <div class="cart-item__attr-value">
  102. {{ getHoldingType(classroom.holding_type) }}
  103. </div>
  104. </div>
  105. <div class="cart-item__attr">
  106. <div class="cart-item__attr-label">
  107. استاد:
  108. </div>
  109. <div class="cart-item__attr-value">
  110. {{ classroom.professor_info.firstname }}
  111. {{ classroom.professor_info.lastname }}
  112. </div>
  113. </div>
  114. <div class="cart-item__attr">
  115. <div class="cart-item__attr-label">
  116. هزینه برگزاری:
  117. </div>
  118. <div class="cart-item__attr-value">
  119. {{ classroom.price.toLocaleString('fa') }}
  120. ریال
  121. </div>
  122. </div>
  123. </div>
  124. <div class="cart-item__price">
  125. <div class="cart-item__price-final" />
  126. </div>
  127. </div>
  128. </div>
  129. <discount v-if="showDiscountSection"
  130. :target-id="classroom.id"
  131. :target="getTarget"
  132. @set-discount="setDiscount" />
  133. </div>
  134. <div class="step1__sidebar">
  135. <sidebar :price="classroom.price"
  136. :order-price="orderPrice"
  137. @complete="onComplete" />
  138. </div>
  139. </div>
  140. </div>
  141. </template>
  142. <script>
  143. import { Invoice } from 'src/models/Invoice.js'
  144. import { mixinAuth } from 'src/mixin/Mixins.js'
  145. import ShamsiDate from 'src/assets/ShamsiDate.js'
  146. import { APIGateway } from 'src/api/APIGateway.js'
  147. import { Classroom } from 'src/models/Classroom.js'
  148. import { AnswerBook } from 'src/models/AnswerBook.js'
  149. import { FormBuilderAssist } from 'quasar-form-builder'
  150. import Sidebar from 'components/Widgets/Store/Cart/components/step1/sidebar.vue'
  151. import Discount from 'components/Widgets/Store/Cart/components/step1/discount.vue'
  152. export default {
  153. name: 'ShopApplyDiscount',
  154. components: { Discount, Sidebar },
  155. mixins: [mixinAuth],
  156. data: () => ({
  157. mounted: false,
  158. inputDataLoaded: false,
  159. panel: 'userInfo',
  160. step: false,
  161. rulesAccept: false,
  162. rulesDialog: false,
  163. loading: true,
  164. classroom: new Classroom(),
  165. discountId: null,
  166. orderPrice: 0,
  167. invoice: new Invoice(),
  168. eventTestAnswerBook: new AnswerBook(),
  169. api: APIGateway.user.APIAdresses.current,
  170. entityIdKey: 'id',
  171. entityParamKey: 'id',
  172. showRouteName: 'UserPanel.ShopPaymentFromWallet',
  173. inputs: []
  174. }),
  175. computed: {
  176. mainTitle () {
  177. if (this.$route.query?.source === 'event') {
  178. return 'ثبت نام در رویداد'
  179. } else {
  180. return 'ثبت نام در دوره آموزشی'
  181. }
  182. },
  183. step1Title () {
  184. return 'تکمیل اطلاعات'
  185. },
  186. step2Title () {
  187. if (this.$route.query?.source === 'event') {
  188. return 'مشاهده جزییات و قوانین رویداد'
  189. } else {
  190. return 'مشاهده جزییات و قوانین دوره'
  191. }
  192. },
  193. getTarget () {
  194. if (this.$route.query?.source === 'event') {
  195. return 'EVENT'
  196. } else if (this.$route.query?.source === 'classroom') {
  197. return 'TRAINING'
  198. } else if (this.$route.query?.source === 'store') {
  199. return 'STORE'
  200. } else {
  201. return 'NAV'
  202. }
  203. },
  204. usageIcon () {
  205. return 'inventory_2'
  206. },
  207. showDiscountSection () {
  208. return this.$route.query?.type !== 'enrollment' && this.classroom.price !== 0
  209. },
  210. showPayStage () {
  211. return this.$route.query?.type !== 'enrollment'
  212. }
  213. },
  214. watch: {
  215. },
  216. mounted () {
  217. this.loadClassroomFromStore()
  218. this.orderPrice = this.classroom.price
  219. if (this.$route.query?.source === 'event') {
  220. this.getEventTest()
  221. }
  222. this.mounted = true
  223. this.$bus.on('event-confirmation-step-test-sent-answer-sending', () => {
  224. })
  225. this.$bus.on('event-confirmation-step-test-sent-answer-success', () => {
  226. this.successSentTest()
  227. })
  228. this.$bus.on('event-confirmation-step-test-sent-answer-failed', () => {
  229. this.sentTestFailed()
  230. })
  231. },
  232. methods: {
  233. onComplete () {
  234. if (this.$route.query?.type === 'register') {
  235. this.createInvoiceForClassroomOrRegisterEvent()
  236. } else if (this.$route.query?.type === 'enrollment') {
  237. this.enrollClassroom()
  238. } else {
  239. this.$router.push({ name: 'UserPanel.ShopPaymentFromWallet', query: this.$route.query })
  240. }
  241. },
  242. enrollClassroom () {
  243. // this.enrolmentLoading = true
  244. APIGateway.classroom.enrollByUser(this.classroom.id)
  245. .then(() => {
  246. this.$q.notify({
  247. message: 'پیش ثبت نام با موفقیت انجام شد.',
  248. type: 'positive'
  249. })
  250. // this.enrolmentLoading = false
  251. this.$router.push({ name: 'UserPanel.Profile.ClassroomInfo', params: { id: this.classroom.id } })
  252. })
  253. .catch(() => {
  254. // this.enrolmentLoading = false
  255. })
  256. },
  257. setDiscount (discount) {
  258. console.log(discount)
  259. if (!discount) {
  260. this.orderPrice = this.classroom.price
  261. this.discountId = null
  262. } else {
  263. this.orderPrice = discount.order_price
  264. this.discountId = discount.id
  265. }
  266. },
  267. getEventTest () {
  268. if (this.classroom.tests && this.classroom.tests.length === 0) {
  269. return
  270. }
  271. this.getEventTestAnswerBook(this.classroom.tests[0])
  272. },
  273. getEventTestAnswerBook (eventTestId) {
  274. this.eventTestAnswerBook.loading = true
  275. APIGateway.answerBook.getOrCreate(this.user.id, eventTestId)
  276. .then((answerBook) => {
  277. this.eventTestAnswerBook = new AnswerBook(answerBook)
  278. this.eventTestAnswerBook.loading = false
  279. })
  280. .catch(() => {
  281. this.eventTestAnswerBook.loading = false
  282. })
  283. },
  284. loadClassroomFromStore () {
  285. this.classroom = this.$store.getters['Shop/onRegisterClassroom']
  286. },
  287. sentTestFailed () {
  288. this.panel = 'userInfo'
  289. },
  290. successSentTest () {
  291. this.editEntity()
  292. },
  293. editEntity () {
  294. if (this.eventTestAnswerBook.id && this.panel !== 'eventTest') {
  295. this.panel = 'eventTest'
  296. return
  297. }
  298. this.panel = 'userInfo'
  299. this.$nextTick(() => {
  300. this.$refs.entityEdit.editEntity(false)
  301. .then(() => {
  302. if (this.$route.query?.type === 'register') {
  303. this.createInvoiceForClassroomOrRegisterEvent()
  304. } else {
  305. this.$router.push({ name: 'UserPanel.ShopPaymentFromWallet', query: this.$route.query })
  306. }
  307. })
  308. .catch(() => {})
  309. })
  310. },
  311. createInvoiceForClassroomOrRegisterEvent () {
  312. this.register()
  313. .then((data) => {
  314. if (data === 'Invoice') {
  315. this.$router.push({ name: 'UserPanel.ShopPaymentFromWallet', query: this.$route.query })
  316. }
  317. })
  318. .catch(() => {})
  319. },
  320. register () {
  321. return new Promise((resolve, reject) => {
  322. this.invoice.loading = true
  323. APIGateway.classroom.register(this.classroom.id, { discount_id: this.discountId })
  324. .then((data) => {
  325. if (data.type === 'Invoice') {
  326. this.invoice = new Invoice(data.model)
  327. this.invoice.loading = false
  328. this.$store.commit('Shop/updateRegisterClassroomInvoice', this.invoice)
  329. this.$q.notify({
  330. message: 'صورت حساب شما ایجاد شد، برای ثبت نام اقدام فرمایید.',
  331. type: 'info'
  332. })
  333. resolve('Invoice')
  334. } else if (data.type === 'Registration') {
  335. this.$q.notify({
  336. message: 'ثبت نام شما با موفقیت انجام شد.',
  337. type: 'positive'
  338. })
  339. const eventRegistrationId = data.model.classroom_info.id
  340. if (this.$route.query?.source === 'event') {
  341. this.$router.push({ name: 'UserPanel.Profile.EventInfo', params: { id: eventRegistrationId } })
  342. } else {
  343. this.$router.push({ name: 'UserPanel.Profile.ClassroomInfo', params: { id: eventRegistrationId } })
  344. }
  345. }
  346. })
  347. .catch(() => {
  348. this.invoice.loading = false
  349. reject()
  350. })
  351. })
  352. },
  353. createInvoice () {
  354. return new Promise((resolve, reject) => {
  355. this.invoice.loading = true
  356. APIGateway.classroom.createInvoice(this.classroom.id)
  357. .then((invoice) => {
  358. this.invoice = new Invoice(invoice)
  359. this.invoice.loading = false
  360. this.$store.commit('Shop/updateRegisterClassroomInvoice', this.invoice)
  361. this.$q.notify({
  362. message: 'صورت حساب شما ایجاد شد، برای ثبت نام اقدام فرمایید.',
  363. type: 'info'
  364. })
  365. resolve(this.invoice)
  366. })
  367. .catch(() => {
  368. this.invoice.loading = false
  369. reject()
  370. })
  371. })
  372. },
  373. afterLoadInputData () {
  374. this.checkNationalCode()
  375. this.$nextTick(() => {
  376. this.inputDataLoaded = true
  377. })
  378. },
  379. checkNationalCode () {
  380. if (FormBuilderAssist.getInputsByName(this.inputs, 'national_code')?.value) {
  381. FormBuilderAssist.setAttributeByName(this.inputs, 'national_code', 'readonly', true)
  382. }
  383. },
  384. openRulesDialog () {
  385. this.rulesDialog = true
  386. },
  387. getHoldingType (type) {
  388. const target = (new Classroom()).holding_typeEnums.find(item => item.value === type)
  389. if (target) {
  390. return target.label
  391. }
  392. return '-'
  393. },
  394. getTime (time) {
  395. return ShamsiDate.getDateTime(time)
  396. },
  397. getTerm (classroom) {
  398. if (!classroom.beginning_registration_period) {
  399. return '-'
  400. }
  401. return ShamsiDate.getTerm(classroom.beginning_registration_period)
  402. }
  403. }
  404. }
  405. </script>
  406. <style scoped lang="scss">
  407. .apply-discount {
  408. .apply-discount-top-banner {
  409. margin-top: 50px;
  410. margin-bottom: 42px;
  411. }
  412. .apply-discount-steps-card {
  413. background-color: #F5F5F5;
  414. padding: 35px 0;
  415. border-radius: 8px;
  416. display: flex;
  417. flex-flow: row;
  418. justify-content: center;
  419. margin-bottom: 44px;
  420. .apply-discount-step {
  421. display: flex;
  422. flex-flow: row;
  423. position: relative;
  424. width: 20%;
  425. &:first-child {
  426. .title {
  427. color: #5B7A5F;
  428. }
  429. }
  430. &:after {
  431. content: ' ';
  432. position: absolute;
  433. left: 0;
  434. top: 10px;
  435. width: 95%;
  436. border-top: dotted 2px #5B7A5F;
  437. z-index: 1;
  438. }
  439. &:last-child {
  440. &:after {
  441. width: 0;
  442. }
  443. .title {
  444. color: #BCBCBC;
  445. }
  446. }
  447. .title {
  448. position: relative;
  449. background-color: #F5F5F5;
  450. z-index: 2;
  451. padding-right: 20px;
  452. }
  453. svg {
  454. width: 17px;
  455. position: relative;
  456. background-color: #F5F5F5;
  457. z-index: 2;
  458. padding-right: 8px;
  459. }
  460. }
  461. }
  462. .apply-discount-form-banner {
  463. margin-bottom: 26px;
  464. }
  465. .apply-discount-form-card {
  466. background-color: #F5F5F5;
  467. padding: 50px 30px;
  468. border-radius: 8px;
  469. &:deep {
  470. .q-card.entity-edit {
  471. background: transparent;
  472. .q-toolbar,
  473. & > .q-separator {
  474. display: none;
  475. }
  476. }
  477. }
  478. }
  479. :deep(.panels) {
  480. background: transparent;
  481. }
  482. .section-edit-btn {
  483. margin-top: 50px;
  484. margin-bottom: 77px;
  485. }
  486. .step1 {
  487. $gap: 28px;
  488. display: flex;
  489. flex-flow: row;
  490. flex-wrap: wrap;
  491. gap: $gap;
  492. $sidebar-width: 312px;
  493. .step1__cart-items {
  494. width: calc( 100% - #{$sidebar-width} - #{28px} );
  495. display: flex;
  496. flex-flow: column;
  497. gap: 24px;
  498. @media screen and (max-width: 1024px) {
  499. & {
  500. width: 100%;
  501. }
  502. }
  503. .cart-item {
  504. $cart-background-color: #F9F9FB;
  505. $cart-item__thumbnail-width: 192px;
  506. position: relative;
  507. background: $cart-background-color;
  508. border: 1px solid #DFE1EC;
  509. border-radius: 8px;
  510. padding: 24px 22px 24px 67px;
  511. display: flex;
  512. flex-flow: row;
  513. flex-wrap: wrap;
  514. $gap: 30px;
  515. gap: $gap;
  516. min-height: 203px;
  517. .cart-item__use-type {
  518. $cart-item__use-type-width: 37px;
  519. position: absolute;
  520. top: 0;
  521. left: 16px;
  522. width: $cart-item__use-type-width;
  523. color: white;
  524. text-align: center;
  525. padding-top: 10px;
  526. padding-bottom: 22px;
  527. background: $primary;
  528. &:after {
  529. position: absolute;
  530. content: ' ';
  531. bottom: calc((#{$cart-item__use-type-width} * -1 / 2) - 9px);
  532. left: 0;
  533. transform: rotate(45deg);
  534. background: $cart-background-color;
  535. width: $cart-item__use-type-width;
  536. height: $cart-item__use-type-width;
  537. border-radius: 2px;
  538. }
  539. }
  540. .cart-item__remove-action {
  541. position: absolute;
  542. top: 85px;
  543. left: 20px;
  544. .q-btn {
  545. width: 32px;
  546. height: 32px;
  547. }
  548. @media screen and (max-width: 600px) {
  549. & {
  550. top: 4px;
  551. left: auto;
  552. right: 4px;
  553. }
  554. }
  555. }
  556. .cart-item__thumbnail {
  557. width: $cart-item__thumbnail-width;
  558. @media screen and (max-width: 600px) {
  559. & {
  560. width: 100%;
  561. }
  562. }
  563. }
  564. .cart-item__info {
  565. width: calc(100% - #{$cart-item__thumbnail-width} - #{$gap});
  566. color: #212121;
  567. .cart-item__title {
  568. font-size: 22px;
  569. margin-bottom: 27px;
  570. }
  571. .cart-item__attrs {
  572. display: flex;
  573. flex-flow: column;
  574. gap: 16px;
  575. //flex-wrap: nowrap;
  576. margin-bottom: 70px;
  577. .cart-item__attr {
  578. display: flex;
  579. flex-flow: row;
  580. gap: 5px;
  581. //flex-wrap: nowrap;
  582. .cart-item__attr-label {
  583. font-size: 16px;
  584. color: #797979;
  585. &:before {
  586. display: inline-block;
  587. content: ' ';
  588. width: 8px;
  589. height: 8px;
  590. background: #475F4A;
  591. border-radius: 100%;
  592. margin-right: 4px;
  593. }
  594. }
  595. .cart-item__attr-value {
  596. font-size: 16px;
  597. }
  598. }
  599. @media screen and (max-width: 1200px) {
  600. & {
  601. flex-flow: column;
  602. gap: 8px;
  603. margin-bottom: 8px;
  604. }
  605. }
  606. }
  607. .cart-item__type-info {
  608. position: absolute;
  609. top: 30px;
  610. right: 22px;
  611. display: flex;
  612. flex-flow: row;
  613. align-items: center;
  614. justify-content: space-between;
  615. gap: 2px;
  616. padding: 0 4px 0 16px;
  617. background: #FFFFFF;
  618. border: 1px solid #DFE1EC;
  619. border-radius: 20px;
  620. color: #212121;
  621. font-size: 16px;
  622. }
  623. .cart-item__count-action {
  624. position: absolute;
  625. right: 20px;
  626. top: 65px;
  627. width: 120px;
  628. @media screen and (max-width: 1200px) {
  629. & {
  630. position: relative;
  631. top: 0;
  632. right: 0;
  633. width: 100%;
  634. }
  635. }
  636. }
  637. .cart-item__price {
  638. position: absolute;
  639. top: 136px;
  640. right: 20px;
  641. display: flex;
  642. flex-flow: row;
  643. align-items: center;
  644. justify-content: space-between;
  645. gap: 19px;
  646. .cart-item__price-base {
  647. color: #FF3D3D;
  648. font-size: 18px;
  649. text-decoration: line-through;
  650. }
  651. .cart-item__price-final {
  652. color: $primary;
  653. font-size: 24px;
  654. }
  655. @media screen and (max-width: 1200px) {
  656. & {
  657. position: relative;
  658. top: 0;
  659. right: 0;
  660. width: 100%;
  661. margin-bottom: 8px;
  662. }
  663. }
  664. }
  665. .cart-item__products {
  666. display: flex;
  667. flex-flow: row;
  668. flex-wrap: wrap;
  669. .cart-item__product {
  670. width: 33.33%;
  671. margin-bottom: 17px;
  672. &:before {
  673. display: inline-block;
  674. content: ' ';
  675. width: 8px;
  676. height: 8px;
  677. background: #475F4A;
  678. border-radius: 100%;
  679. margin-right: 4px;
  680. }
  681. }
  682. }
  683. @media screen and (max-width: 800px) {
  684. & {
  685. width: 100%;
  686. }
  687. }
  688. }
  689. @media screen and (max-width: 600px) {
  690. & {
  691. padding: 56px 22px 24px 24px;
  692. }
  693. }
  694. }
  695. }
  696. .step1__sidebar {
  697. width: $sidebar-width;
  698. @media screen and (max-width: 1024px) {
  699. & {
  700. width: 100%;
  701. }
  702. }
  703. }
  704. }
  705. }
  706. </style>