farmdata2-1.3.0/transplanting/transplanting.js

transplanting/transplanting.js
import{_ as D,o as c,c as k,a as d,w as r,n as tt,h as b,g as T,i as V,t as A,F as Q,j as E,k as U,d as v,p as et,l as nt,r as B,b as it,v as st,e as lt,f as at}from"../_plugin-vue_export-helper/_plugin-vue_export-helper.js";import{o as ot,a as C,q as rt,t as H,b as L,c as dt,d as ct,v as ut,w as pt,g as yt,h as ht,i as gt,r as mt,x as G,y as ft,z as wt,G as bt,V as kt,A as vt,B as Bt,E as St,W as _t,F as Rt,H as Vt,m as Z,I as At,J as qt,K as Ft,p as J,S as K,k as W,M as Ct,O as z,D as Lt,L as It,N as Tt,C as Pt,j as xt,s as N,l as Y,Z as Qt,u as Et,n as Ut}from"../uiUtil/uiUtil.js";import{S as Wt}from"../SoilDisturbance/SoilDisturbance.js";async function Ot(e){try{const t=[],l=[],y={name:"parents",do:async()=>{for(const s of e.picked){const g=await ot(s.data.asset_uuid);l.push(g)}return l},undo:()=>{}};t.push(y);const n={name:"trayInventoryQuantities",do:async s=>{const g=[];for(let h=0;h<s.parents.length;h++){const q=await C("count",e.picked[h].trays,"Trays","TRAYS",s.parents[h],"decrement");g.push(q);const u=rt(s.parents[h],"count","TRAYS");e.picked[h].trays==u&&await H(s.parents[h].id,!0)}return g},undo:async s=>{for(const g of s.trayInventoryQuantities)s.transplantingLog!="undone"&&await L(g.id),await H(g.parent.id,!1)}};t.push(n);const a={name:"transplantingPlantAsset",do:async s=>await dt(e.transplantingDate,e.cropName,e.comment,s.parents),undo:async s=>{await ct(s.transplantingPlantAsset.id)}};t.push(a);const _={name:"transplantingBedFeetQuantity",do:async()=>await C("length",e.bedFeet,"Bed Feet","FEET"),undo:async s=>{s.transplantingLog!="undone"&&await L(s.transplantingBedFeetQuantity.id)}};t.push(_);const w={name:"transplantingBedWidthQuantity",do:async()=>await C("length",e.bedWidth,"Bed Width","INCHES"),undo:async s=>{s.transplantingLog!="undone"&&await L(s.transplantingBedWidthQuantity.id)}};t.push(w);const p={name:"transplantingRowsPerBedQuantity",do:async()=>await C("ratio",e.rowsPerBed,"Rows/Bed","ROWS/BED"),undo:async s=>{s.transplantingLog!="undone"&&await L(s.transplantingRowsPerBedQuantity.id)}};t.push(p);const P={name:"transplantingRowFeetQuantity",do:async s=>await C("length",e.bedFeet*e.rowsPerBed,"Row Feet","FEET",s.transplantingPlantAsset,"increment"),undo:async s=>{s.transplantingLog!="undone"&&await L(s.transplantingRowFeetQuantity.id)}};t.push(P);const I={name:"transplantingLog",do:async s=>await ut(e.transplantingDate,e.location,e.beds,s.transplantingPlantAsset,[s.transplantingBedFeetQuantity,s.transplantingBedWidthQuantity,s.transplantingRowsPerBedQuantity,s.transplantingRowFeetQuantity,...s.trayInventoryQuantities]),undo:async s=>{await pt(s.transplantingLog.id)}};if(t.push(I),e.equipment.length>0){const s={name:"depthQuantity",do:async()=>await C("length",e.depth,"Depth","INCHES"),undo:async u=>{await L(u.depthQuantity.id)}};t.push(s);const g={name:"speedQuantity",do:async()=>await C("rate",e.speed,"Speed","MPH"),undo:async u=>{await L(u.speedQuantity.id)}};t.push(g);const h={name:"equipmentAssets",do:async()=>{const u=await yt(),F=[];for(const x of e.equipment)F.push(u.get(x));return F},undo:async()=>{}};t.push(h);const q={name:"activityLog",do:async u=>await ht(e.transplantingDate,e.location,e.beds,["tillage","transplanting"],u.transplantingPlantAsset,[u.depthQuantity,u.speedQuantity,u.transplantingBedFeetQuantity],u.equipmentAssets),undo:async u=>{await gt(u.activityLog.id)}};t.push(q)}const S=await mt(t);return e.equipment.length==0&&(S.equipmentAssets=null,S.depthQuantity=null,S.speedQuantity=null,S.activityLog=null),S}catch(t){console.error(`Transplanting: 
`+t.message),console.error(t);let l="Error creating transplanting.";for(const y of Object.keys(t.results))t.results[y]&&(l+=`
  Result of operation `+y+" could not be cleaned up.",t.results[y].attributes&&t.results[y].attributes.name?(l+=`
   Manually delete log or asset with:`,l+=`
     name: `+t.results[y].attributes.name):l+=`
   May be safely ignored`);throw Error(l,t)}}const j={submitForm:Ot};const Nt={name:"PicklistBase",components:{BCardHeader:G},emits:["ready","update:picked","valid"],props:{columns:{type:Array,required:!0},invalidFeedbackText:{type:String,required:!0},labels:{type:Object,required:!0},picked:{type:Array,default:()=>[]},quantityAttribute:{type:String,default:null},required:{type:Boolean,default:!1},rows:{type:Array,required:!0},showAllButton:{type:Boolean,default:!0},showInfoIcons:{type:Boolean,default:!0},showValidityStyling:{type:Boolean,default:!1},units:{type:String,default:null}},data(){return{showOverlay:null,overlayWidth:null,overlayLeft:null,infoRowHeight:null,pickedRows:this.picked}},computed:{isValid(){if(this.required){for(let e=0;e<this.pickedRows.length;e++)if(this.pickedRows[e])return!0;return!1}else return!0},validityStyling(){return this.showValidityStyling?!this.required&&this.picked.length===0?null:this.isValid:null},allPicked(){if(this.pickedRows.length<this.rows.length)return!1;for(let e=0;e<this.pickedRows.length;e++)if(!this.pickedRows[e])return!1;return!0},allButtonVisible(){return this.showAllButton&&this.rows&&this.rows.length>0},tableBorderColor(){return this.validityStyling?"green":this.validityStyling===!1?"red":"#dee2e6"},tableStyling(){return this.validityStyling?"{ is-valid }":this.validityStyling===!1?"{ is-invalid }":"{}"}},methods:{quantityOptions(e){return this.quantityAttribute?Array.from({length:this.rows[e][this.quantityAttribute]+1},(l,y)=>y):null},includeAttributeInInfo(e){return!this.columns.includes(e)&&this.getLabel(e)},getLabel(e){return this.labels[e]},getLabelId(e){return this.labels[e].toLowerCase().replace(/ /g,"-")},showInfo(e){const t=document.getElementById("picklist-table"),l=document.getElementById("picklist-"+this.getLabelId(this.columns[0])+"-"+e),y=document.getElementById("picklist-info-"+e);t!=null&&(this.overlayWidth=y.offsetLeft-l.offsetLeft,this.overlayLeft=-(t.clientWidth-l.offsetLeft-10));const n=document.getElementById("picklist-info-"+e);n!=null&&(this.infoRowHeight=n.offsetHeight),this.showOverlay=e},handleCheckboxChange(e,t){t?this.pickedRows[e]=1:this.pickedRows[e]=0},handleAllButton(){this.allPicked?this.pickedRows=new Array(this.pickedRows.length).fill(0):this.pickedRows=new Array(this.pickedRows.length).fill(1)},handleUnitsButton(){if(this.allPicked)this.pickedRows=new Array(this.pickedRows.length).fill(0);else{const e=new Array(this.pickedRows.length).fill(1);for(let t=0;t<this.rows.length;t++)e[t]=this.rows[t][this.quantityAttribute];this.pickedRows=e}}},watch:{isValid(){this.$emit("valid",this.isValid)},picked:{handler(){this.pickedRows=this.picked},deep:!0},pickedRows:{handler(){this.$emit("update:picked",this.pickedRows)},deep:!0},rows:{handler(){this.pickedRows=new Array(this.rows.length).fill(0),this.showOverlay=null},deep:!0},units(){this.pickedRows=new Array(this.rows.length).fill(0)}},created(){this.$emit("valid",this.isValid),this.pickedRows.length===0&&(this.pickedRows=new Array(this.rows.length).fill(0)),this.$emit("ready")}},M=e=>(et("data-v-ba2297de"),e=e(),nt(),e),Dt=M(()=>v("th",{style:{height:"0px"}},null,-1)),Mt=M(()=>v("p",null,null,-1)),Ht=["id","data-cy"],zt=["id","data-cy","onClick"],Yt=M(()=>v("path",{d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"},null,-1)),jt=[Yt];function Gt(e,t,l,y,n,a){const _=ft,w=wt,p=bt,P=kt,I=vt,S=Bt,s=St,g=_t,h=Rt,q=G,u=Vt,F=Z,x=At,i=qt,O=Ft,$=J;return c(),k("div",{style:U({padding:"2px",border:"1px solid "+a.tableBorderColor})},[d($,null,{default:r(()=>[d(O,{id:"picklist-table","data-cy":"picklist-table",small:"",responsive:"",striped:"",stickyHeader:"","aria-hidden":n.showOverlay?"true":null,class:tt(a.tableStyling)},{default:r(()=>[d(I,null,{default:r(()=>[d(p,null,{default:r(()=>[d(w,{stickyColumn:""},{default:r(()=>[a.allButtonVisible&&!l.units?(c(),b(_,{key:0,id:"picklist-all-button","data-cy":"picklist-all-button",disabled:n.showOverlay!=null,size:"sm",variant:"primary",onClick:t[0]||(t[0]=R=>a.handleAllButton())},{default:r(()=>[T(" All ")]),_:1},8,["disabled"])):V("",!0),a.allButtonVisible&&l.units?(c(),b(_,{key:1,id:"picklist-units-button","data-cy":"picklist-units-button",disabled:n.showOverlay!=null,size:"sm",variant:"primary",onClick:t[1]||(t[1]=R=>a.handleUnitsButton())},{default:r(()=>[T(A(l.units),1)]),_:1},8,["disabled"])):V("",!0)]),_:1}),(c(!0),k(Q,null,E(l.columns,R=>(c(),b(w,{id:"picklist-header-"+a.getLabelId(R),"data-cy":"picklist-header-"+a.getLabelId(R),key:R},{default:r(()=>[T(A(a.getLabel(R)),1)]),_:2},1032,["id","data-cy"]))),128)),l.showInfoIcons?(c(),b(w,{key:0,class:"narrow-col"})):V("",!0)]),_:1}),a.validityStyling===!1?(c(),b(p,{key:0},{default:r(()=>[Dt,d(w,{colspan:"100",style:{"font-weight":"normal"}},{default:r(()=>[d(P,{id:"picklist-invalid-feedback","data-cy":"picklist-invalid-feedback",state:a.validityStyling},{default:r(()=>[T(A(l.invalidFeedbackText),1)]),_:1},8,["state"])]),_:1})]),_:1})):V("",!0)]),_:1}),d(i,null,{default:r(()=>[(c(!0),k(Q,null,E(l.rows,(R,o)=>(c(),b(p,{key:o,id:"picklist-row-"+o,"data-cy":"picklist-row-"+o},{default:r(()=>[d(w,{stickyColumn:""},{default:r(()=>[l.units?V("",!0):(c(),b(S,{id:"picklist-checkbox-"+o,"data-cy":"picklist-checkbox-"+o,name:"picklist-checkbox-"+o,key:"checkbox"+o,disabled:n.showOverlay!=null,checked:n.pickedRows[o],onChange:m=>a.handleCheckboxChange(o,m),size:"lg"},null,8,["id","data-cy","name","disabled","checked","onChange"])),l.units?(c(),b(g,{id:"picklist-quantity-"+o,"data-cy":"picklist-quantity-"+o,key:"select "+o,name:"picklist-quantity-"+o,disabled:n.showOverlay!=null,modelValue:n.pickedRows[o],"onUpdate:modelValue":m=>n.pickedRows[o]=m,size:"sm",style:{width:"auto",margin:"0px",padding:"0px","padding-right":"30px"}},{default:r(()=>[(c(!0),k(Q,null,E(a.quantityOptions(o),(m,f)=>(c(),b(s,{id:"picklist-quantity-"+o+"-"+f,"data-cy":"picklist-quantity-"+o+"-"+f,key:m,value:m},{default:r(()=>[T(A(m),1)]),_:2},1032,["id","data-cy","value"]))),128))]),_:2},1032,["id","data-cy","name","disabled","modelValue","onUpdate:modelValue"])):V("",!0)]),_:2},1024),(c(!0),k(Q,null,E(l.columns,(m,f)=>(c(),b(h,{id:"picklist-"+a.getLabelId(l.columns[f])+"-"+o,"data-cy":"picklist-"+a.getLabelId(l.columns[f])+"-"+o,key:f},{default:r(()=>[T(A(R[m]),1)]),_:2},1032,["id","data-cy"]))),128)),l.showInfoIcons?(c(),b(h,{key:0,id:"picklist-info-"+o,"data-cy":"picklist-info-"+o},{default:r(()=>[d(x,{id:"picklist-info-overlay","data-cy":"picklist-info-overlay",show:n.showOverlay==o,"aria-hidden":n.showOverlay?null:"true",onClick:t[2]||(t[2]=m=>n.showOverlay=null)},{overlay:r(()=>[d(F,{id:"picklist-info-card","data-cy":"picklist-info-card",style:U({width:n.overlayWidth+"px",left:n.overlayLeft+"px"})},{default:r(()=>[d(q,{id:"picklist-info-card-header","data-cy":"picklist-info-card-header",style:U({width:n.overlayWidth+"px",height:n.infoRowHeight+"px"})},{default:r(()=>[Mt]),_:1},8,["style"]),d(u,{id:"picklist-info-card-body","data-cy":"picklist-info-card-body",style:U({width:n.overlayWidth+"px"})},{default:r(()=>[v("ul",null,[(c(!0),k(Q,null,E(l.rows[o],(m,f)=>(c(),k("span",{key:f},[a.includeAttributeInInfo(f)?(c(),k("li",{id:"picklist-info-"+a.getLabelId(f)+"-"+o,"data-cy":"picklist-info-"+a.getLabelId(f)+"-"+o,key:f},A(a.getLabel(f))+": "+A(m),9,Ht)):V("",!0)]))),128))])]),_:2},1032,["style"])]),_:2},1032,["style"])]),default:r(()=>[(c(),k("svg",{id:"picklist-info-icon-"+o,"data-cy":"picklist-info-icon-"+o,onClick:m=>a.showInfo(o),xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"green",class:"bi bi-info-circle-fill",viewBox:"0 0 16 16"},jt,8,zt))]),_:2},1032,["show","aria-hidden"])]),_:2},1032,["id","data-cy"])):V("",!0)]),_:2},1032,["id","data-cy"]))),128))]),_:1})]),_:1},8,["aria-hidden","class"])]),_:1})],4)}const Zt=D(Nt,[["render",Gt],["__scopeId","data-v-ba2297de"]]),Jt={components:{SelectorBase:K,PicklistBase:Zt},emits:["error","ready","update:crop","update:picked","valid"],props:{crop:{type:String,default:null},required:{type:Boolean,default:!0},showValidityStyling:{type:Boolean,default:!1}},data(){return{cropList:[],seedlingList:[],columns:["date","trays_location"],units:"Trays",quantityAttribute:"available_trays",labels:{date:"Date",user:"User",trays_location:"Location",asset_location:"Transplanted Locations",tray_size:"Tray Size",seeds_per_cell:"Seeds/Cell",total_seeds:"Total Seeds",notes:"Notes"},form:{cropFilter:this.crop,pickedRows:[]},validity:{cropFilter:!1,picked:!1}}},computed:{isValid(){return this.validity.cropFilter&&this.validity.picked},picklistValidityStyling(){return this.validity.cropFilter?this.showValidityStyling:!1}},methods:{sortSeedlings(){this.seedlingList.sort((e,t)=>W(e.date).isBefore(W(t.date))?-1:1)},cropFilterChanged(e){this.form.cropFilter=e,e?Ct(e).then(t=>{this.seedlingList=t,this.sortSeedlings()}).catch(t=>{console.error("TransplantingPicklist: Error fetching seedlings for "+e+"."),console.error(t),this.$emit("error","Unable to fetch tray seedings.")}):this.seedlingList=[],this.$emit("update:crop",e)},handlePickedUpdate(e){const t=[];for(let l=0;l<e.length;l++)if(e[l]!=0){const y={trays:e[l],data:{...this.seedlingList[l]}};t.push(y)}this.$emit("update:picked",t)}},watch:{isValid(){this.$emit("valid",this.isValid)},crop(){this.form.cropFilter!=this.crop&&!(this.form.cropFilter===""&&this.crop==null)&&(this.cropFilterChanged(this.crop),(this.crop===""||this.crop==null)&&z().then(e=>{this.cropList=e.sort()}).catch(e=>{console.error("TransplantingPicklist: Error fetching seedlings crop names."),console.error(e),this.$emit("error","Unable to fetch crop names.")}))}},created(){z().then(e=>{this.cropList=e.sort(),this.$emit("valid",this.isValid),this.$emit("ready")}).catch(e=>{console.error("TransplantingPicklist: Error fetching seedlings crop names."),console.error(e),this.$emit("error","Unable to fetch crop names.")})}},Kt={id:"transplanting-picklist-div","data-cy":"transplanting-picklist-div"};function Xt(e,t,l,y,n,a){const _=B("SelectorBase"),w=B("PicklistBase");return c(),k("div",Kt,[d(_,{id:"transplanting-picklist-crop-filter","data-cy":"transplanting-picklist-crop-filter",label:"Crop",required:l.required,invalidFeedbackText:"A crop must be selected.",showValidityStyling:l.showValidityStyling,selected:n.form.cropFilter,options:n.cropList,onValid:t[0]||(t[0]=p=>{n.validity.cropFilter=p}),"onUpdate:selected":t[1]||(t[1]=p=>{a.cropFilterChanged(p)})},null,8,["required","invalidFeedbackText","showValidityStyling","selected","options"]),d(w,{id:"transplanting-picklist","data-cy":"transplanting-picklist",required:l.required,invalidFeedbackText:"Select at least one tray to transplant.",showValidityStyling:a.picklistValidityStyling,showAllButton:"",showInfoIcons:"",columns:n.columns,labels:n.labels,rows:n.seedlingList,units:n.units,quantityAttribute:n.quantityAttribute,picked:n.form.pickedRows,"onUpdate:picked":[t[2]||(t[2]=p=>n.form.pickedRows=p),t[3]||(t[3]=p=>{a.handlePickedUpdate(p)})],onValid:t[4]||(t[4]=p=>{n.validity.picked=p})},null,8,["required","showValidityStyling","columns","labels","rows","units","quantityAttribute","picked"])])}const $t=D(Jt,[["render",Xt]]);const te={components:{TransplantingPicklist:$t,DateSelector:Lt,LocationSelector:It,NumericInput:Tt,SelectorBase:K,SoilDisturbance:Wt,CommentBox:Pt,SubmitResetButtons:xt},data(){return{rowValues:["1","2","3","4","5","6","7","8","9","10"],form:{cropName:null,picked:[],transplantingDate:W().format("YYYY-MM-DD"),location:"",beds:[],bedFeet:100,bedWidth:60,rowsPerBed:"1",equipment:[],depth:0,speed:0,comment:""},validity:{show:!1,picked:!1,transplantingDate:!1,location:!1,bedFeet:!1,bedWidth:!1,rowsPerBed:!1,soilDisturbance:!1,comment:!1},submitting:!1,errorShowing:!1,createdCount:0}},computed:{pageDoneLoading(){return this.createdCount==10},submitEnabled(){return!this.validity.show||this.validToSubmit&&!this.submitting},resetEnabled(){return!this.submitting},validToSubmit(){return Object.entries(this.validity).filter(([e])=>e!=="show").every(e=>e[1]===!0)}},methods:{handleBedsUpdate(e){this.form.beds=e},submit(){this.submitting=!0,this.validity.show=!0,this.validToSubmit?(N("Submitting transplanting...","","top-center","success"),j.submitForm({...this.form}).then(()=>{Y(),N("Transplanting created.","","top-center","success",2).then(()=>{this.reset(!0),this.submitting=!1})}).catch(()=>{this.errorShowing||(Y(),this.errorShowing=!0,N("Error creating transplanting.","Check your network connection and try again.","top-center","danger",5).then(()=>{this.submitting=!1,this.errorShowing=!1}))})):this.submitting=!1},reset(e=!1){this.validity.show=!1,e||(this.form.transplantingDate=W().format("YYYY-MM-DD"),this.form.location=null,this.form.bedWidth=60,this.form.rowsPerBed="1",this.form.equipment=[],this.form.depth=0,this.form.speed=0),this.form.beds=[],this.form.cropName=null,this.form.bedFeet=100,this.form.comment=null,this.enableSubmit=!0}},watch:{},created(){this.createdCount++,window.Cypress&&(document.defaultView.lib=j)}},ee={id:"transplanting","data-cy":"transplanting"},ne=v("h2",{id:"transplanting-header","data-cy":"transplanting-header",class:"text-center"}," Transplanting ",-1),ie=v("hr",null,null,-1),se=v("hr",null,null,-1),le=v("hr",null,null,-1),ae=v("span",{id:"transplanting-soil-disturbance-accordion-title","data-cy":"transplanting-soil-disturbance-accordion-title",class:"w-100 text-center"}," Equipment & Soil Disturbance ",-1),oe=v("hr",null,null,-1);function re(e,t,l,y,n,a){const _=Qt,w=B("TransplantingPicklist"),p=B("DateSelector"),P=B("LocationSelector"),I=B("NumericInput"),S=B("SelectorBase"),s=B("SoilDisturbance"),g=Et,h=Ut,q=B("CommentBox"),u=B("SubmitResetButtons"),F=J,x=Z;return c(),k("div",ee,[d(_,{id:"transplanting-toaster","data-cy":"transplanting-toaster"}),d(x,{id:"transplanting-card","data-cy":"transplanting-card","bg-variant":"light","header-tag":"header"},{header:r(()=>[ne]),default:r(()=>[d(F,{id:"transplanting-form","data-cy":"transplanting-form"},{default:r(()=>[d(w,{id:"transplanting-picklist","data-cy":"transplanting-picklist",required:"true",crop:n.form.cropName,"onUpdate:crop":t[0]||(t[0]=i=>n.form.cropName=i),showValidityStyling:n.validity.show,"onUpdate:picked":t[1]||(t[1]=i=>{n.form.picked=i}),onValid:t[2]||(t[2]=i=>{n.validity.picked=i}),onReady:t[3]||(t[3]=i=>n.createdCount++)},null,8,["crop","showValidityStyling"]),ie,d(p,{id:"transplanting-date","data-cy":"transplanting-date",required:"",date:n.form.transplantingDate,"onUpdate:date":t[4]||(t[4]=i=>n.form.transplantingDate=i),showValidityStyling:n.validity.show,onValid:t[5]||(t[5]=i=>{n.validity.transplantingDate=i}),onReady:t[6]||(t[6]=i=>n.createdCount++)},null,8,["date","showValidityStyling"]),d(P,{id:"transplanting-location","data-cy":"transplanting-location",required:"",includeFields:"",includeGreenhousesWithBeds:"",selected:n.form.location,"onUpdate:selected":t[7]||(t[7]=i=>n.form.location=i),pickedBeds:n.form.beds,showValidityStyling:n.validity.show,onValid:t[8]||(t[8]=i=>{n.validity.location=i}),"onUpdate:beds":t[9]||(t[9]=(i,O)=>{a.handleBedsUpdate(i,O)}),onError:t[10]||(t[10]=i=>{e.showErrorToast("Network Error",i)}),onReady:t[11]||(t[11]=i=>n.createdCount++)},null,8,["selected","pickedBeds","showValidityStyling"]),se,d(I,{id:"transplanting-bed-feet","data-cy":"transplanting-bed-feet",required:"",label:"Bed Feet",invalidFeedbackText:"Bed Feet must be positive.",value:n.form.bedFeet,"onUpdate:value":t[12]||(t[12]=i=>n.form.bedFeet=i),showValidityStyling:n.validity.show,decimalPlaces:0,incDecValues:[1,10,100],minValue:1,onValid:t[13]||(t[13]=i=>{n.validity.bedFeet=i}),onReady:t[14]||(t[14]=i=>n.createdCount++)},null,8,["value","showValidityStyling"]),d(I,{id:"transplanting-bed-width","data-cy":"transplanting-bed-width",required:"",label:"Bed Width (in)",invalidFeedbackText:"Bed width must be positive.",value:n.form.bedWidth,"onUpdate:value":t[15]||(t[15]=i=>n.form.bedWidth=i),showValidityStyling:n.validity.show,decimalPlaces:0,incDecValues:[1,10],minValue:1,onValid:t[16]||(t[16]=i=>{n.validity.bedWidth=i}),onReady:t[17]||(t[17]=i=>n.createdCount++)},null,8,["value","showValidityStyling"]),d(S,{id:"transplanting-rows-per-bed","data-cy":"transplanting-rows-per-bed",label:"Rows/Bed",invalidFeedbackText:"A number of rows is required",selected:n.form.rowsPerBed,"onUpdate:selected":t[18]||(t[18]=i=>n.form.rowsPerBed=i),options:n.rowValues,required:!0,showValidityStyling:n.validity.show,onValid:t[19]||(t[19]=i=>{n.validity.rowsPerBed=i}),onReady:t[20]||(t[20]=i=>n.createdCount++)},null,8,["selected","options","showValidityStyling"]),le,d(h,{flush:"",id:"transplanting-soil-disturbance-accordion","data-cy":"transplanting-soil-disturbance-accordion"},{default:r(()=>[d(g,{id:"transplanting-soil-disturbance-accordion-item","data-cy":"transplanting-soil-disturbance-accordion-item"},{title:r(()=>[ae]),default:r(()=>[d(s,{id:"transplanting-soil-disturbance","data-cy":"transplanting-soil-disturbance",showValidityStyling:n.validity.show,equipment:n.form.equipment,depth:n.form.depth,speed:n.form.speed,includeArea:!1,onValid:t[21]||(t[21]=i=>{n.validity.soilDisturbance=i}),"onUpdate:equipment":t[22]||(t[22]=i=>{n.form.equipment=i}),"onUpdate:depth":t[23]||(t[23]=i=>{n.form.depth=i}),"onUpdate:speed":t[24]||(t[24]=i=>{n.form.speed=i}),onError:t[25]||(t[25]=i=>{e.showErrorToast("Network Error",i)}),onReady:t[26]||(t[26]=i=>n.createdCount++)},null,8,["showValidityStyling","equipment","depth","speed"])]),_:1})]),_:1}),oe,d(q,{id:"transplanting-comment","data-cy":"transplanting-comment",comment:n.form.comment,"onUpdate:comment":t[27]||(t[27]=i=>n.form.comment=i),onValid:t[28]||(t[28]=i=>{n.validity.comment=i}),onReady:t[29]||(t[29]=i=>n.createdCount++)},null,8,["comment"]),d(u,{id:"transplanting-submit-reset","data-cy":"transplanting-submit-reset",enableSubmit:a.submitEnabled,enableReset:a.resetEnabled,onSubmit:t[30]||(t[30]=i=>a.submit()),onReset:t[31]||(t[31]=i=>a.reset()),onReady:t[32]||(t[32]=i=>n.createdCount++)},null,8,["enableSubmit","enableReset"])]),_:1})]),_:1}),it(v("div",{id:"page-loaded","data-cy":"page-loaded"},A(a.pageDoneLoading),513),[[st,!1]])])}const de=D(te,[["render",re]]),X=lt(de);X.use(at());X.mount("#app");

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc