PageSourceSearch

https://xn--e1aaa0add1ai6f.xn--p1ai/_nuxt/BV3dWxdw.js

js xn--e1aaa0add1ai6f.xn--p1ai collected 2026-10-07 13:21:46 UTC 4,420 bytes, 1 lines download raw bytes

1import{bj as D,aL as n,bu as T,b1 as m,b4 as v,cp as $,b0 as _,aK as w,b5 as M,bF as l,aM as u,bl as f,b3 as d,co as E,a$ as i,b2 as c,bc as G,be as A,bf as B,cb as p,ce as V,bA as C,bH as S,b6 as F}from"./Bqvziv_G.js";import{c as x,a as R}from"./CMuvFFmp.js";import{M as L}from"./8YX_lLkP.js";import{G as P}from"./wtSpUOUm.js";import{C as k}from"./DVfxwr0E.js";import{_ as H}from"./vIL0RV8l.js";import{T as g}from"./C8NiijRa.js";import{c as q}from"./Dl_4rKvF.js";import"./mF6A9URx.js";import"./K9G4FNdy.js";import"./D9VWTSls.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="acd8b9ea-2c55-445b-a2bb-1bbc73eba505",e._sentryDebugIdIdentifier="sentry-dbid-acd8b9ea-2c55-445b-a2bb-1bbc73eba505")}catch{}})();const U={__name:"ValidatedGRadio",props:{name:{type:String,required:!0},radioValue:{type:String,required:!0}},setup(e){const a=e,{value:r,handleChange:b}=D(a.name);function o(t){r.value=t,b(t)}return(t,h)=>(n(),T(_(k),$({modelValue:_(r),value:e.radioValue,name:e.name,"onUpdate:modelValue":o},t.$attrs),{default:m(()=>[v(t.$slots,"default")]),_:3},16,["modelValue","value","name"]))}},W={name:"CancelOrder",mixins:[L],components:{GButton:M,GForm:P,ValidatedGRadio:U,ValidatedGTextarea:H},data(){return{ButtonView:F,comment:"",reasonValue:"",isNotSelectReason:!1,isNotComment:!1,reasons:[{label:this.$t("myPlansHaveChanged"),testId:g.ORDER_DETAILS.CANCEL_REASON_PLANS_CHANGED},{label:this.$t("notSatisfiedWithTheDeliveryTime")},{label:this.$t("addressHasChanged")},{label:this.$t("cantChangeOrder")},{label:this.$t("anotherReasonWriteInComments")}]}},computed:{TEST_IDS(){return g},...S(C,["getOpenedModal"]),...S(V,["getCancelOrder"]),currentModalData(){return this.getOpenedModal.modalData},isOnlinePayment(){return q(this.getCancelOrder)&&!!this.getCancelOrder.total_amount_clean},schema(){return x({reason:R().required(),comment:R().when("reason",{is:e=>e===this.$t("anotherReasonWriteInComments"),then:e=>e.required(this.$t("writeComment")),otherwise:e=>e.notRequired()})})}},methods:{...p(C,["openModal","closeModal"]),...p(V,["cancelCurrentOrder"]),submitFailed(){this.reasonValue||(this.isNotSelectReason=!0)},async submitHandler(){if(!this.reasonValue){this.isNotSelectReason=!0;return}const a={reason:`${this.reasonValue}. ${this.comment}`,orderId:this.currentModalData.id};await this.cancelCurrentOrder(a).then(()=>{this.closeModal(),this.isOnlinePayment&&this.openModal({modalName:"RefundModal",modalData:{price:this.getCancelOrder.total_amount_clean}})})}},watch:{reasonValue:{handler(e){e.includes(this.$t("anotherReason"))?(this.isNotSelectReason=!1,this.isNotComment=!0,this.$refs.commentText.$refs.textarea.focus()):(this.isNotSelectReason=!1,this.isNotComment=!1)}}}},j={class:"cancel-order-modal"},z={class:"cancel-order-modal__list"},K=["data-testid"],Y={class:"cancel-order-modal__comment"};function J(e,a,r,b,o,t){const h=l("ValidatedGRadio"),y=l("ValidatedGTextarea"),I=l("GButton"),O=l("GForm");return n(),u("div",j,[(n(),T(E,{defer:"",to:e.teleportToTitle},[f(d(e.$t("cancellation")),1)],8,["to"])),i(O,{class:"cancel-order-modal__body","validation-schema":t.schema,onSubmit:t.submitHandler,onInvalidSubmit:t.submitFailed},{default:m(()=>[c("p",{class:G(["cancel-order-modal__list-title",{"cancel-order-modal__list-title_error":o.isNotSelectReason}])},d(e.$t("writeReason")),3),c("ul",z,[(n(!0),u(A,null,B(o.reasons,s=>(n(),u("li",{key:s.label,class:"cancel-order-modal__list-item"},[i(h,{name:"reason",radioValue:s.label,modelValue:o.reasonValue,"onUpdate:modelValue":a[0]||(a[0]=N=>o.reasonValue=N)},{default:m(()=>[c("span",{class:"cancel-order-modal__list-label","data-testid":s.testId},d(s.label),9,K)]),_:2},1032,["radioValue","modelValue"])]))),128))]),c("div",Y,[i(y,{ref:"commentText",name:"comment",modelValue:o.comment,"onUpdate:modelValue":a[1]||(a[1]=s=>o.comment=s),placeholder:e.$t("comment",{text:""})},null,8,["modelValue","placeholder"])]),i(I,{class:"cancel-order-modal__button",type:"submit",view:o.ButtonView.PRIMARY,"data-testid":t.TEST_IDS.ORDER_DETAILS.CANCEL_CONFIRM},{default:m(()=>[f(d(e.$t("cancelTheOrder")),1)]),_:1},8,["view","data-testid"])]),_:1},8,["validation-schema","onSubmit","onInvalidSubmit"])])}const de=w(W,[["render",J],["__scopeId","data-v-e8e5514d"]]);export{de as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.