PageSourceSearch

https://midlandsoccerclub.com/chunk-IVYOVQ4W.js

js midlandsoccerclub.com collected 2026-10-09 22:39:45 UTC 11,677 bytes, 56 lines download raw bytes

1import{a as V}from"./chunk-4CVZBQNN.js";import"./chunk-U22BTVEZ.js";import{$b as re,Ec as se,Gc as le,Hc as me,Hd as pe,Wc as ce,kd as de,kh as ue,ve as M}from"./chunk-X5J6QTCG.js";import{$ as D,$a as _,Ad as j,Bf as ie,E as k,Fa as m,Ib as i,Jb as $,Jf as ne,Ka as f,Kb as R,Ma as x,Na as A,Sa as F,U as I,Xa as L,_ as N,ba as z,bb as b,be as te,bg as oe,d as y,db as O,dc as J,eb as Q,fa as h,fb as H,fi as ae,ga as T,gb as p,hb as s,hd as K,ib as l,jb as u,k as U,pj as B,qb as E,sb as v,tb as d,u as P,vd as X,wd as Y,xb as W,xd as Z,yb as q,yd as ee,zb as G}from"./chunk-SMW7PHYX.js";import"./chunk-BMIYOSOG.js";var S=class{constructor(t=void 0){this.rows=25,this.orderBy=t}},g=class{};var C=(()=>{let t=class t{constructor(e){this.webAPI=e,this.columns=[{field:"description",header:"Description"},{field:"title",header:"Title"},{field:"attestant",header:"Attestant"}]}searchTestimonialItems(){return this.webAPI.getData("admin/testimonial",this.getsearchParams())}getsearchParams(){let e=new K;return e=e.append("page",this.filters.page.toString()),e=e.append("rows",this.filters.rows.toString()),e=e.append("includeCount",this.filters.getTotalCount.toString()),this.filters.orderBy&&(e=e.append("orderBy",this.filters.orderBy)),e}getClubTestimonialMetadata(){return this.webAPI.getData("admin/testimonial/metadata")}getClubTestimonial(e){return this.webAPI.getData(`admin/testimonial/${e}`)}saveClubTestimonial(e){return e.clubTestimonialID?this.webAPI.putData(`admin/testimonial/${e.clubTestimonialID}`,e):this.webAPI.postData("admin/testimonial",e)}saveClubTestimonialThumbnail(e,n){return e!==void 0?this.webAPI.postMultiPartContent(`admin/testimonial/${e}/thumbnail`,n,n.name):this.webAPI.postMultiPartContent("admin/testimonial/thumbnail",n,n.name)}deleteClubTestimonial(e){return this.webAPI.deleteData(`admin/testimonial/${e}`)}};t.\u0275fac=function(n){return new(n||t)(z(ae))},t.\u0275prov=N({token:t,factory:t.\u0275fac});let o=t;return o})();var ge=["fileUploadField"];function we(o,t){if(o&1){let a=E();i(0,`
2    `),s(1,"app-dynamic-form",3),v("onSubmit",function(n){h(a);let r=d(2);return T(r.save(n))})("onDelete",function(){h(a);let n=d(2);return T(n.delete())})("onCancel",function(){h(a);let n=d(2);return T(n.cancel())})("onSaveAndAdd",function(n){h(a);let r=d(2);return T(r.save(n,!0))}),i(2,`
3        `),u(3,"app-dynamic-form-field",4),i(4,`
4        `),u(5,"app-dynamic-form-field",5),i(6,`
5        `),s(7,"app-dynamic-form-field",6,0),v("onChange",function(n){h(a);let r=d(2);return T(r.thumbnailImage=n.target.files[0])}),i(9,`
6        `),l(),i(10,`
7        `),u(11,"app-dynamic-form-field",7),i(12,`
8        `),u(13,"app-dynamic-form-field",8),i(14,`
9    `),l(),i(15,`
10    `)}if(o&2){let a=d(2);m(),p("fields",a.fields)("entity",a.clubTestimonial)("horizontalForm",!0)("contentFieldsMode",!0)("showCancelButton",!0)("showSaveAndAddButton",a.showAddAnother)("showDeleteButton",!!a.clubTestimonialID),m(6),p("selectedFileName",a.clubTestimonial!=null&&a.clubTestimonial.image?a.clubTestimonial.image:null)("canDownload",!1)("acceptedFileExtensions",a.acceptedFileTypes)("acceptType",a.fileImageUploadAcceptTypes)}}function ye(o,t){if(o&1&&(i(0,`
11`),s(1,"section",2),i(2,`
12    `),_(3,we,16,11),l(),i(4,`
13`)),o&2){let a=d();m(3),b(!a.loading&&a.fields?3:-1)}}function Ie(o,t){o&1&&(i(0,`
14`),u(1,"app-skeleton-template",9),i(2,`
15`)),o&2&&(m(),p("wrapInCard",!0))}var Te=(()=>{let t=class t{constructor(e,n,r,c,Ce){this.siteDataService=e,this.route=n,this.router=r,this.testimonialService=c,this.formService=Ce,this.unsubscribe$=new y,this.loading=!0,this.acceptedFileTypes=ie,this.fileImageUploadAcceptTypes=ne,this.showAddAnother=!1}ngOnInit(){this.siteDataService.hideSiteLoader(),this.route.params.subscribe(e=>{e.id&&(e.id==="new"?(this.clubTestimonialID=void 0,this.showAddAnother=!0,this.testimonialService.getClubTestimonialMetadata().pipe(I(this.unsubscribe$)).subscribe(n=>{this.clubTestimonial=new g,this.fields=n.formMetadata.fields,this.loading=!1})):(this.clubTestimonialID=+e.id,P([this.testimonialService.getClubTestimonialMetadata(),this.testimonialService.getClubTestimonial(this.clubTestimonialID)]).pipe(I(this.unsubscribe$)).subscribe(n=>{this.fields=n[0].formMetadata.fields,this.clubTestimonial=n[1],this.loading=!1})))})}save(e,n){e.clubTestimonialID=this.clubTestimonialID,e.image=this.clubTestimonial.image;let r=[U(void 0)];this.fileUploadField.hasFileChanged&&this.thumbnailImage&&(r[0]=this.testimonialService.saveClubTestimonialThumbnail(e.clubTestimonialID,this.thumbnailImage)),P(r).pipe(k(c=>(c[0]&&(e.image=c[0]?.location),this.testimonialService.saveClubTestimonial(e)))).subscribe({next:c=>{this.fileUploadField.hasFileChanged=!1,c&&(this.clubTestimonial=c,this.clubTestimonialID=c.clubTestimonialID),e.image&&(this.clubTestimonial.image=e.image),this.siteDataService.showSiteSuccessAlert("Testimonial saved successfully"),this.formService.hideFormLoader(),n?this.addAnother():this.cancel()},error:c=>{c?(this.siteDataService.showSiteErrorAlert("There was a problem saving this testimonial: "+c.error+"."),this.formService.showFormErrorMessage(c.error),document.getElementById("endDate").focus()):this.siteDataService.showSiteErrorAlert("There was a problem saving this testimonial."),this.formService.hideFormLoader()}})}delete(){this.testimonialService.deleteClubTestimonial(this.clubTestimonialID).pipe(I(this.unsubscribe$)).subscribe(()=>{this.siteDataService.showSiteSuccessAlert("Testimonial deleted successfully"),this.cancel()},()=>{this.siteDataService.showSiteErrorAlert("There was a problem deleting this testimonial item"),this.formService.hideFormLoader()})}cancel(){this.router.navigate([".."],{relativeTo:this.route})}addAnother(){this.clubTestimonialID=void 0,this.thumbnailImage=void 0,this.clubTestimonial=new g,this.fileUploadField.fileUpload.reset(null)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};t.\u0275fac=function(n){return new(n||t)(f(B),f(X),f(Z),f(C),f(re))},t.\u0275cmp=x({type:t,selectors:[["ng-component"]],viewQuery:function(n,r){if(n&1&&W(ge,5),n&2){let c;
15q(c=G())&&(r.fileUploadField=c.first)}},standalone:!1,decls:4,vars:3,consts:[["fileUploadField",""],["parentLinkUrl","../","parentLinkText","Testimonials",3,"pageTitle","showBackButton"],[1,"card"],["formID","club-form","buttonsPosition","left",3,"onSubmit","onDelete","onCancel","onSaveAndAdd","fields","entity","horizontalForm","contentFieldsMode","showCancelButton","showSaveAndAddButton","showDeleteButton"],["fieldName","title"],["fieldName","description"],["fieldName","image",3,"onChange","selectedFileName","canDownload","acceptedFileExtensions","acceptType"],["fieldName","attestant"],["fieldName","order"],["skeletonType","form",3,"wrapInCard"]],template:function(n,r){n&1&&(u(0,"app-admin-header",1),i(1,`
16`),_(2,ye,5,1)(3,Ie,3,1)),n&2&&(p("pageTitle","Edit")("showBackButton",!0),m(2),b(r.loading?3:2))},dependencies:[pe,de,ce,M],encapsulation:2});let o=t;return o})();var xe=(()=>{let t=class t{constructor(){}ngOnInit(){}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=x({type:t,selectors:[["ng-component"]],standalone:!1,decls:6,vars:0,consts:[["role","main"]],template:function(n,r){n&1&&(i(0,`
17`),s(1,"main",0),i(2,`
18	`),u(3,"router-outlet"),i(4,`
19`),l(),i(5,`
20`))},dependencies:[Y],encapsulation:2});let o=t;return o})();var De=o=>["/admin/content/testimonials",o];function Ae(o,t){if(o&1&&(i(0,`
21                  `),u(1,"p-sortIcon",7),i(2,`
22                `)),o&2){let a=d().$implicit;m(),p("field",a.field)}}function Fe(o,t){if(o&1&&(i(0,`
23              `),s(1,"th",6),i(2),_(3,Ae,3,1),l(),i(4,`
24            `)),o&2){let a=t.$implicit,e=d(3);m(),p("pSortableColumn",a.field?a.field:null),L("aria-label",a.field?e.AriaLabels.ACTIVATE_SORT:""),m(),R(`
25                `,a.header,`
26                `),m(),b(a.field?3:-1)}}function Ee(o,t){if(o&1&&(i(0,`
27          `),s(1,"tr"),i(2,`
28            `),Q(3,Fe,5,4,null,null,O),l(),i(5,`
29        `)),o&2){let a=d(2);m(3),H(a.testimonialService.columns)}}function Be(o,t){if(o&1&&(i(0,`
30          `),s(1,"tr"),i(2,`
31            `),s(3,"td"),i(4,`
32              `),s(5,"a",8),i(6),l(),i(7,`
33            `),l(),i(8,`
34            `),s(9,"td"),i(10),l(),i(11,`
35            `),s(12,"td"),i(13),l(),i(14,`
36          `),l(),i(15,`
37        `)),o&2){let a=t.$implicit;m(5),p("routerLink",J(4,De,a.clubTestimonialID)),m(),R(`
38                `,a.description,`
39              `),m(4),$(a.title),m(3),$(a.attestant)}}function Me(o,t){if(o&1&&(i(0,`
40          `),s(1,"tr"),i(2,`
41            `),s(3,"td",9),i(4,`
42              The search criteria produced no results.
43            `),l(),i(5,`
44          `),l(),i(6,`
45        `)),o&2){let a=t.$implicit;m(3),L("colspan",a?a.length:4)}}function Pe(o,t){if(o&1){let a=E();i(0,`
46      `),s(1,"p-table",2),v("onLazyLoad",function(n){h(a);let r=d();return T(r.search(n))}),i(2,`
47        `),F(3,Ee,6,0,"ng-template",3),i(4,`
48        `),F(5,Be,16,6,"ng-template",4),i(6,`
49        `),F(7,Me,7,1,"ng-template",5),i(8,`
50      `),l(),i(9,`
51    `)}if(o&2){let a=d();m(),p("columns",a.testimonialService.columns)("value",a.searchResults)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",25)("loading",a.loading)}}var _e=(()=>{let t=class t{constructor(e,n){this.siteDataService=e,this.testimonialService=n,this.unsubscribe$=new y,this.loading=!0,this.totalRecords=0,this.showTable=!1,this.AriaLabels=oe}ngOnInit(){this.testimonialService.filters&&this.testimonialService.filters.page?this.showTable=!0:this.testimonialService.filters=new S,this.run(),this.siteDataService.hideSiteLoader()}run(){this.testimonialService.filters.page=1,this.totalRecords=0,this.showTable?this.search():setTimeout(()=>{this.showTable=!0},15)}search(e=null){let n=this.testimonialService.filters;e&&e.sortField&&(n.orderBy=e.sortField+" "+(e.sortOrder===1?"ASC":"DESC"),n.page=e.first/n.rows+1),n.getTotalCount=this.totalRecords===0,this.loading=!0,this.testimonialService.searchTestimonialItems().subscribe(r=>{this.searchResults=r.results,n.getTotalCount&&(this.totalRecords=r.count),this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")})}resetFilters(){this.testimonialService.filters=new S(this.testimonialService.filters.orderBy)}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};t.\u0275fac=function(n){return new(n||t)(f(B),f(C))},t.\u0275cmp=x({type:t,selectors:[["ng-component"]],standalone:!1,decls:9,vars:3,consts:[["pageTitle","Testimonials",3,"primaryBtnText","primaryBtnUrl"],[1,"table-responsive"],["sortField","title",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"],[2,"text-align","left"]],template:function(n,r){n&1&&(s(0,"app-admin-header",0),i(1,`
52`),l(),i(2,`
53`),s(3,"section"),i(4,`
54  `),s(5,"div",1),i(6,`
55    `),_(7,Pe,10,8),l(),i(8,`
56`),l()),n&2&&(p("primaryBtnText","Add Testimonial")("primaryBtnUrl","./new"),m(7),b(r.showTable?7:-1))},dependencies:[ee,te,M,se,le,me],encapsulation:2});let o=t;return o}
56)();var be=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=A({type:t}),t.\u0275inj=D({imports:[j.forChild([{path:"",component:xe,children:[{path:":id",canActivate:[V],component:Te},{path:"",canActivate:[V],component:_e}]}]),j]});let o=t;return o})();var At=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=A({type:t}),t.\u0275inj=D({providers:[C],imports:[ue,be]});let o=t;return o})();export{At as TestimonialModule};

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.