PageSourceSearch

https://reseau.produitenbretagne.bzh/chunk-AYDFHWG7.js

js produitenbretagne.bzh collected 2026-09-24 20:45:06 UTC 24,131 bytes, 1 lines download raw bytes

1import{a as Ke}from"./chunk-HQJRCEWW.js";import{a as Oe}from"./chunk-BVACRBNF.js";import{a as Ge}from"./chunk-F4MQMD72.js";import{Gb as Be,Gc as ze,Ha as Qe,Nc as Re,Qb as Ne,i as Me,lb as Ve,nb as Ue}from"./chunk-EM6QF2UM.js";import"./chunk-NXJVHDGY.js";import"./chunk-XV2IUHO4.js";import"./chunk-HWUJRP7T.js";import{A as ke}from"./chunk-XGEBDJ6H.js";import"./chunk-MDCGZ5LD.js";import{a as Ae}from"./chunk-2UZSXFNN.js";import{b as Te}from"./chunk-GR6LQ7KS.js";import{a as Fe}from"./chunk-CS2FERRN.js";import"./chunk-J7SKNQOI.js";import"./chunk-Y27QJ7CX.js";import"./chunk-PJDUJJUN.js";import"./chunk-HH6A4333.js";import{c as Le}from"./chunk-FSGQG3OX.js";import{a as Se}from"./chunk-CEPGYGQO.js";import"./chunk-ZS2OTJQV.js";import"./chunk-K6OXTI32.js";import"./chunk-SAZVVJWD.js";import"./chunk-HKMH7CWH.js";import"./chunk-YQ3GOZN2.js";import"./chunk-HDNRWH4U.js";import"./chunk-PGGXBDUU.js";import"./chunk-WKIMDT3D.js";import"./chunk-URTDGHGU.js";import"./chunk-CVTIPWEH.js";import"./chunk-VLXHBATS.js";import"./chunk-BAWBW633.js";import"./chunk-ETI3MHEO.js";import"./chunk-AGCMBLWZ.js";import"./chunk-LFRC3Q3Q.js";import"./chunk-NY2XNUF2.js";import"./chunk-AI6XKPMQ.js";import"./chunk-SZJSSEXU.js";import"./chunk-B2S5WZNW.js";import"./chunk-5X6XN6LO.js";import"./chunk-IMHIJDCL.js";import{a as Y}from"./chunk-2EQWYZSC.js";import"./chunk-4CM27YZJ.js";import"./chunk-E2BWUNQK.js";import"./chunk-JGMOCG4J.js";import"./chunk-R5UVRT73.js";import"./chunk-JMQAPJZQ.js";import{t as xe}from"./chunk-C6ILUYKU.js";import"./chunk-Y4PALJV5.js";import"./chunk-GUUHGNL6.js";import"./chunk-LWQ27MQZ.js";import{c as qe}from"./chunk-BHICU7FY.js";import{b as be,d as N,e as T}from"./chunk-SKIJOWV4.js";import{d as we}from"./chunk-XDY4N5ZO.js";import"./chunk-NBCIULGD.js";import"./chunk-UHTTHE54.js";import"./chunk-K4J7CP45.js";import{a as $e}from"./chunk-SCQVLI6E.js";import"./chunk-A5RD3OSS.js";import"./chunk-7WPJ2HWG.js";import{A as _e,L as A,Q as Ie,d as v,f as fe,g as he,h as ve,k as d,n as ge,r as ye,u as Ce}from"./chunk-GICIMXIH.js";import{a as je}from"./chunk-I2QDK557.js";import"./chunk-ZN6FS4K6.js";import"./chunk-MHGZGKPK.js";import{Ya as De,Za as X}from"./chunk-YJU66GPG.js";import{a as J}from"./chunk-3EANULH5.js";import{a as Ee,b as Pe}from"./chunk-DMUS4CLE.js";import{Ba as Q,Ca as C,Da as G,Db as g,Gb as pe,Hb as se,Ib as n,Ja as b,Jb as r,Jd as $,Ka as E,Kb as u,Lb as B,Ld as w,Mb as L,Ob as F,Oc as y,Od as ie,Qc as ue,Rb as f,Sa as k,Ta as V,Tb as h,cb as K,ec as s,fb as m,fc as le,gb as c,gc as ee,od as de,pc as I,qa as me,qb as U,qc as te,ra as O,rc as oe,s as j,ua as D,vb as _,vc as H,wc as W,wd as ce,xb as l}from"./chunk-TQDHZIBV.js";import"./chunk-4XVBYHNB.js";import{a as S,b as x,i as M}from"./chunk-Y47AOV4Z.js";var nt=function(o,p,e,t){var i=arguments.length,a=i<3?p:t===null?t=Object.getOwnPropertyDescriptor(p,e):t,P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(o,p,e,t);else for(var Z=o.length-1;Z>=0;Z--)(P=o[Z])&&(a=(i<3?P(a):i>3?P(p,e,a):P(p,e))||a);return i>3&&a&&Object.defineProperty(p,e,a),a},He=()=>["image/jpeg","image/png"],rt=o=>({limitUpload:1,concurrency:1,sizeLimit:5e6,allowedContentTypes:o}),at=o=>({limitUpload:10,concurrency:1,sizeLimit:5e6,allowedContentTypes:o}),mt=()=>({label:"Entreprises membres",id:0}),pt=()=>({label:"Salari\xE9s d'entreprises membres",id:1}),st=(o,p)=>[o,p],lt=()=>[],ut=(o,p)=>({maxConcurrentUploads:1,maxFileSize:20971520,url:o,allowedMimeTypes:p,s3:!1});function dt(o,p){o&1&&(n(0,"div")(1,"h2",12),s(2," Code promo "),r(),n(3,"div",15)(4,"div",23),u(5,"peb-input-text",34),r(),n(6,"div",23),u(7,"peb-input-url",35),r()()()),o&2&&(m(5),l("maxLength",50),m(2),l("required",!0))}function ct(o,p){if(o&1&&(n(0,"div")(1,"h2",12),s(2," Coupon de r\xE9duction "),r(),n(3,"div",15)(4,"div",16),u(5,"peb-input-documents",36),r()()()),o&2){let e=h();m(5),l("single",!0)("uploadOptions",oe(3,ut,e.documentUploadPath(),I(2,lt)))}}var z=class ne{constructor(p,e,t){this.authFacade=p,this.taxonomiesQueryService=e,this.appConfiguration=t,this.companyId=V(""),this.promotion=V(null),this.title=V("Ajouter une promotion"),this.previous=k(),this.save=k(),this.accessToken=this.authFacade.getTokenSnapsh
1ot(),this.uploadPath=y(()=>this.companyId()?`${this.appConfiguration.apiUrl}/medias/companies/${this.companyId()}/promotions/picture`:""),this.documentUploadPath=y(()=>this.companyId()?`${this.appConfiguration.apiUrl}/medias/companies/${this.companyId()}/promotions/document`:""),this.featuredBannerUploadPath=y(()=>this.companyId()?`${this.appConfiguration.apiUrl}/medias/companies/${this.companyId()}/promotions/featured-banners`:""),this.promotionForm=new ve({title:new d("",[v.required,v.minLength(2),v.maxLength(255)]),brand:new d(null,[v.required]),featuredBanner:new d(null,[v.required]),pictures:new d([],[v.required]),category:new d(null,[v.required]),amount:new d("",[v.required,v.maxLength(30)]),type:new d(0,[v.required]),promoCode:new d("",[v.maxLength(50)]),website:new d(""),document:new d(null),phone:new d(""),email:new d(""),description:new d("",[v.required]),target:new d(0,[v.required]),validityStart:new d(null),validityEnd:new d(null),status:new d(!1)}),this.targetValue=U(0),this.companiesCategoriesQuery=T(()=>this.taxonomiesQueryService.getTerms({vocabularyId:"promotions_categories_companies"},{enabled:this.targetValue()===0})),this.employeesCategoriesQuery=T(()=>this.taxonomiesQueryService.getTerms({vocabularyId:"promotions_categories_employees"},{enabled:this.targetValue()===1})),this.categories=y(()=>(this.targetValue()===1?this.employeesCategoriesQuery.data():this.companiesCategoriesQuery.data())||[]),this.optionPromotions=[{id:0,label:"Un code promo"},{id:1,label:"Un coupon de r\xE9duction"}],this.optionsUpload={limitUpload:10,concurrency:1,sizeLimit:5e6},this.documentUploadOptions={limitUpload:1,concurrency:1,sizeLimit:2e7},this.promotionForm.controls.target.valueChanges.pipe(Pe(this)).subscribe(i=>{this.targetValue.set(i),this.promotionForm.controls.category.setValue(null,{emitEvent:!1})}),ue(()=>{if(this.promotion()){let i=this.promotion();this.promotionForm.patchValue(x(S({},i),{validityStart:i.validityStart?new Date(i.validityStart):null,validityEnd:i.validityEnd?new Date(i.validityEnd):null}),{emitEvent:!1}),this.targetValue.set(i.target??0)}},{allowSignalWrites:!0})}onSubmit(){if(this.promotionForm.valid){let p=this.promotionForm.value,e=x(S({},p),{categoryId:p.category?.id||null});this.save.emit(e)}else this.promotionForm.markAllAsTouched()}previousPage(){this.previous.emit()}static{this.\u0275fac=function(e){return new(e||ne)(c(Ge),c(Ke),c(X))}}static{this.\u0275cmp=C({type:ne,selectors:[["peb-promotion-form"]],inputs:{companyId:[Q.SignalBased,"companyId"],promotion:[Q.SignalBased,"promotion"],title:[Q.SignalBased,"title"]},outputs:{previous:"previous",save:"save"},decls:87,vars:44,consts:[["novalidate","",3,"ngSubmit","formGroup"],[3,"title"],["src","assets/icons/arrow-left.svg",1,"mr-3","tw-cursor-pointer",3,"click"],["page-header-right",""],[1,"tw-flex","tw-items-center"],[1,"tw-flex","tw-items-center","mr-4"],[1,"font-size-xl","mr-3"],["color","green","formControlName","status"],["peb-button","","type","submit","color","yellow","size","small"],[1,"tw-p-6"],[1,"tw-flex","tw-flex-col","tw-gap-6"],[1,"tw-flex","tw-flex-col","tw-gap-2"],["peb-title","","size","h5"],["type","text","formControlName","title","label","Produit ou service concern\xE9 par l'offre",3,"maxLength","minLength","required"],["formControlName","brand","label","Nom de la marque",3,"accessToken","companyId","required"],[1,"row"],[1,"col-md-12"],["formControlName","featuredBanner","label","Glissez un visuel (1620x540)","mode","pictures","required","","thumbnailKey","uris.ratio_3_1.lg","title","Photo de couverture *",3,"options","token","uploadPath"],[1,"legend"],[1,"mw-100",3,"src"],["peb-button","","color","blue","size","extra-small","target","_blank",1,"mr-2","mb-2",3,"href"],["peb-button","","color","blue","size","extra-small","target","_blank",1,"mb-2",3,"href"],["formControlName","pictures","label","Glissez vos photos","mode","pictures","required","","thumbnailKey","uris.ratio_3_2_fit_in.xs","title","Photo(s) d'illustration *",3,"options","token","uploadPath"],[1,"col-md-6"],["type","text","formControlName","amount","informationText","Ex : - 50%, 2 \u20AC de r\xE9duction, 1 achet\xE9 le 2nd \xE0 moiti\xE9 prix...","label","M\xE9canique de r\xE9duction",3,"maxLength","required"],["formControlName","type","label","Offre valable via",3,"options","required"],["type","tel","formControlName","phone","label","T\xE9l\xE9phone"],["formControlName","email","label","Email"],[1,"tw-flex","tw-flex-col","tw-gap-4"],["formControlName","description","label","Description de l'offre","placeholder","D\xE9crivez de fa\xE7on attractive votre offre & limitations d'utilisation \xE9ventuelles (\xE2ge, support...)",3,"required"],["formControlName","target","label","Public cible de l'offre",3,"options","required"],["formControlName","category","label","Cat\xE9gorie de l'offre",3,"options","required"],["formControlName","validityStart","label","Date de d\xE9but de validit\xE9"],["formControlName","validityEnd","label","Date de fin de validit\xE9"],["type","text","formControlName","promoCode","label","Code promo",3,"maxLength"],["formControlName","website","label","Site web sur lequel profiter de l'offre","placeholder","www.votre-site.com",3,"required"],["formControlName","document",3,"single","uploadOptions"]],template:function(e,t){if(e&1&&(n(0,"form",0),f("ngSubmit",function(){return t.onSubmit()}),n(1,"peb-page-header",1)(2,"svg-icon",2),f("click",function(){return t.previousPage()}),r(),B(3,3),n(4,"div",4)(5,"div",5)(6,"span",6),s(7,"Publi\xE9e"),r(),u(8,"peb-toggle",7),r(),n(9,"button",8),s(10," Enregistrer les modifications "),r()(),L(),r(),n(11,"peb-container")(12,"div",9)(13,"div",10)(14,"div",11)(15,"h2",12),s(16," Produit / Service mis en avant "),r(),u(17,"peb-input-text",13)(18,"peb-input-brand",14),n(19,"div",15)(20,"div",16)(21,"peb-upload",17)(22,"div",18),u(23,"img",19),H(24,"mediaUrl"),n(25,"p"),s(26,"Sur la base du mod\xE8le ci-dessus, merci de charger un fichier :"),r(),n(27,"ul")(28,"li"),s(29,"de 1620 pixels de long x 540 pixels de haut"),r(),n(30,"li"),s(31,"int\xE9grant une photo d'arri\xE8re-plan"),r(),n(32,"li"),s(33," int\xE9grant un logo au-dessus de la photo d'arri\xE8re-plan : cal\xE9 \xE0 100 px du bord gauche du visuel, centr\xE9 verticalement, et d'une taille maximale de 450 pixels de large x 350 pixels de haut "),r()(),n(34,"p")(35,"strong"),s(36," Merci de veiller \xE0 ce que le visuel d'arri\xE8re-plan soit attractif, et propose un contraste suffisant avec le logo pour que ce dernier soit visible. "),r()(),n(37,"a",20),H(38,"mediaUrl"),s(39,"T\xE9l\xE9charger les instructions au format PDF"),r(),n(4
10,"a",21),H(41,"mediaUrl"),s(42,"T\xE9l\xE9charger le gabarit au format PSD"),r()()()()(),n(43,"div",15)(44,"div",16),u(45,"peb-upload",22),r()()(),n(46,"div")(47,"h2",12),s(48," R\xE9duction "),r(),n(49,"div",15)(50,"div",23),u(51,"peb-input-text",24),r(),n(52,"div",23),u(53,"peb-input-radios",25),r()()(),_(54,dt,8,2,"div")(55,ct,6,6),n(56,"div")(57,"h2",12),s(58," Contact "),r(),n(59,"div",15)(60,"div",23),u(61,"peb-input-text",26),r(),n(62,"div",23),u(63,"peb-input-text",27),r()()(),n(64,"div",28)(65,"h2",12),s(66," Pr\xE9sentation de l'offre "),r(),n(67,"div",11),u(68,"peb-input-wysiwyg",29),n(69,"div",15)(70,"div",23),u(71,"peb-input-radios",30),r(),n(72,"div",23),u(73,"peb-input-select-alt",31),r()()()(),n(74,"div",28)(75,"div")(76,"h2",12),s(77," Dur\xE9e de validit\xE9 "),r(),n(78,"div"),s(79," Vous avez la possibilit\xE9 de d\xE9finir une date de d\xE9but et/ou de fin de diffusion. "),u(80,"br"),s(81," Si vous ne s\xE9lectionnez rien, votre annonce sera diffus\xE9e d\xE8s que vous aurez cliqu\xE9 sur \xAB Publi\xE9e \xBB et le restera tant que vous ne l'aurez pas d\xE9publi\xE9e. "),r()(),n(82,"div",15)(83,"div",23),u(84,"peb-input-date",32),r(),n(85,"div",23),u(86,"peb-input-date",33),r()()()()()()()),e&2){let i;l("formGroup",t.promotionForm),m(),l("title",t.title()),m(16),l("maxLength",255)("minLength",2)("required",!0),m(),l("accessToken",t.accessToken)("companyId",t.companyId())("required",!0),m(3),l("options",te(34,rt,I(33,He)))("token",t.accessToken)("uploadPath",t.featuredBannerUploadPath()),m(2),l("src",W(24,27,"/assets/documents/gabarit-promotions-couverture.png"),K),m(14),l("href",W(38,29,"/assets/documents/instructions-promotions.pdf"),K),m(3),l("href",W(41,31,"/assets/documents/gabarit-promotions.psd"),K),m(5),l("options",te(37,at,I(36,He)))("token",t.accessToken)("uploadPath",t.uploadPath()),m(6),l("maxLength",30)("required",!0),m(2),l("options",t.optionPromotions)("required",!0),m(),g(54,((i=t.promotionForm.get("type"))==null?null:i.value)===0?54:((i=t.promotionForm.get("type"))==null?null:i.value)===1?55:-1),m(14),l("required",!0),m(3),l("options",oe(41,st,I(39,mt),I(40,pt)))("required",!0),m(2),l("options",t.categories())("required",!0)}},dependencies:[ke,A,Se,Be,xe,we,Fe,qe,Le,Me,Te,Y,je,Ae,ge,fe,he,_e,ye,Ce,J,ze],encapsulation:2,changeDetection:0})}};z=nt([Ee()],z);var R=(()=>{class o{constructor(e,t,i,a,P){this.http=e,this.snackBar=t,this.router=i,this.queryClient=a,this.appConfiguration=P}getPromotionQuery(e){return{queryKey:["promotions",e.companyId,e.promotionId],queryFn:()=>M(this,null,function*(){let t=`${this.appConfiguration.apiUrl}/companies/${e.companyId}/promotions/${e.promotionId}`;return j(this.http.get(t))})}}getPromotionsQuery(e){return{queryKey:["promotions",e.companyId,e.page,e.limit],queryFn:()=>M(this,null,function*(){let t=`${this.appConfiguration.apiUrl}/companies/${e.companyId}/promotions`;return j(this.http.get(t,{params:{page:e.page.toString(),limit:e.limit.toString()}}))})}}editPromotionMutation(){return{mutationFn:e=>M(this,null,function*(){let t=x(S({},e.promotion),{pictures:e.promotion.pictures?.map(a=>a.id)||[],documentId:e.promotion.document?.id||null,featuredBannerId:e.promotion.featuredBanner?.id||null,categoryId:e.promotion.category?.id||null}),i=`${this.appConfiguration.apiUrl}/companies/${e.companyId}/promotions/${e.promotionId}`;return j(this.http.put(i,t))}),onSuccess:(e,t)=>{this.snackBar.open("Offre privil\xE8ge modifi\xE9e avec succ\xE8s","Fermer",{duration:3e3}),this.queryClient.invalidateQueries({queryKey:["promotions",t.companyId]}),this.queryClient.invalidateQueries({queryKey:["promotions",t.companyId,t.promotionId]}),this.router.navigate([`company/${t.companyId}/promotions`])},onError:()=>{this.snackBar.open("Une erreur est survenue. Veuillez r\xE9essayer.",null,{duration:2e3})}}}createPromotionMutation(){return{mutationFn:e=>M(this,null,function*(){let t=x(S({},e.promotion),{pictures:e.promotion.pictures?.map(a=>a.id)||[],documentId:e.promotion.document?.id||null,featuredBannerId:e.promotion.featuredBanner?.id||null,categoryId:e.promotion.category?.id||null}),i=`${this.appConfiguration.apiUrl}/companies/${e.companyId}/promotions`;return j(this.http.post(i,t))}),onSuccess:(e,t)=>{this.snackBar.open("Offre privil\xE8ge ajout\xE9e avec succ\xE8s","Fermer",{duration:3e3}
1),this.queryClient.invalidateQueries({queryKey:["promotions",t.companyId]}),this.router.navigate([`company/${t.companyId}/promotions`])}}}deletePromotionMutation(){return{mutationFn:e=>M(this,null,function*(){let t=`${this.appConfiguration.apiUrl}/companies/${e.companyId}/promotions/${e.promotionId}`;return j(this.http.delete(t))}),onSuccess:(e,t)=>{this.queryClient.invalidateQueries({queryKey:["promotions",t.companyId]})}}}static{this.\u0275fac=function(t){return new(t||o)(D(ce),D(De),D(w),D(be),D(X))}}static{this.\u0275prov=me({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var Xe=(()=>{class o{constructor(e,t,i){this.route=e,this.router=t,this.promotionsQueryService=i,this.companyId=this.route.snapshot.params.companyId,this.promotion=U(new Qe),this.createPromotionMutation=N(()=>this.promotionsQueryService.createPromotionMutation())}onSave(e){this.createPromotionMutation.mutate({companyId:this.companyId,promotion:e})}previousPage(){this.router.navigate([`company/${this.companyId}/promotions`])}static{this.\u0275fac=function(t){return new(t||o)(c($),c(w),c(R))}}static{this.\u0275cmp=C({type:o,selectors:[["peb-add-promotion"]],decls:1,vars:2,consts:[["title","Ajouter une offre privil\xE8ge",3,"previous","save","companyId","promotion"]],template:function(t,i){t&1&&(n(0,"peb-promotion-form",0),f("previous",function(){return i.previousPage()})("save",function(P){return i.onSave(P)}),r()),t&2&&l("companyId",i.companyId)("promotion",i.promotion())},dependencies:[z],encapsulation:2,changeDetection:0})}}return o})();function ft(o,p){if(o&1){let e=F();n(0,"peb-promotion-form",1),f("previous",function(){b(e);let i=h();return E(i.previousPage())})("save",function(i){b(e);let a=h();return E(a.onSave(i))}),r()}if(o&2){let e=h();l("companyId",e.companyId)("promotion",p)}}var Ye=(()=>{class o{constructor(e,t,i){this.route=e,this.router=t,this.promotionsQueryService=i,this.companyId=this.route.snapshot.params.companyId,this.promotionId=this.route.snapshot.params.promotionId,this.editPromotionMutation=N(()=>this.promotionsQueryService.editPromotionMutation()),this.promotionQuery=T(()=>this.promotionsQueryService.getPromotionQuery({companyId:this.companyId,promotionId:this.promotionId})),this.promotion=y(()=>this.promotionQuery.data()?this.promotionQuery.data():null)}onSave(e){this.editPromotionMutation.mutate({companyId:this.companyId,promotionId:this.promotionId,promotion:e})}previousPage(){this.router.navigate([`company/${this.companyId}/promotions/`])}static{this.\u0275fac=function(t){return new(t||o)(c($),c(w),c(R))}}static{this.\u0275cmp=C({type:o,selectors:[["peb-edit-promotion"]],decls:1,vars:1,consts:[["title","Modifier une offre privil\xE8ge",3,"companyId","promotion"],["title","Modifier une offre privil\xE8ge",3,"previous","save","companyId","promotion"]],template:function(t,i){if(t&1&&_(0,ft,1,2,"peb-promotion-form",0),t&2){let a;g(0,(a=i.promotion())?0:-1,a)}},dependencies:[z],encapsulation:2,changeDetection:0})}}return o})();var ht=()=>({width:"18px",height:"18px"});function vt(o,p){if(o&1&&(n(0,"div"),s(1),r()),o&2){let e=h();m(),le(e.promotion().brand.name)}}function gt(o,p){o&1&&(n(0,"i",5),s(1," store_mall_directory "),r())}function yt(o,p){o&1&&(n(0,"i",6),s(1," person "),r())}function Ct(o,p){o&1&&(n(0,"i",7),s(1," people "),r())}var Ze=(()=>{class o{constructor(){this.promotion=V.required(),this.deletePromotion=k(),this.editPromotion=k()}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=C({type:o,selectors:[["peb-promotion-card"]],inputs:{promotion:[Q.SignalBased,"promotion"]},outputs:{deletePromotion:"deletePromotion",editPromotion:"editPromotion"},decls:16,vars:11,consts:[[3,"image"],[1,"tw-flex"],[1,"tw-flex-1"],[1,"tw-font-semibold","tw-text-xl"],[1,"tw-ml-2"],["matTooltip","Entreprise",1,"material-icons"],["matTooltip","Adh\xE9rent",1,"material-icons"],["matTooltip","Consommateur",1,"material-icons"],[1,"tw-mt-2","font-color-subtitle"],["card-footer",""],["peb-button","","color","blue","size","small",3,"click"],["src","assets/icons/trash.svg",1,"tw-cursor-pointer",3,"click","matTooltip","matTooltipPosition","svgStyle"]],template:function(t,i){if(t&1&&(n(0,"peb-card",0)(1,"div",1)(2,"div",2)(3,"div",3),s(4),r(),_(5,vt,2,1,"div"),r(),n(6,"div",4),_(7,gt,2,0,"i",5)(8,yt,2,0,"i",6)(9,Ct,2,0,"i",7),r()(),n(10,"div",8),s(11),r(),B(12,9),n(13,"button",10),f("click",function(){return i.editPromotion.emit()}),s(14,"Modifier"),r(),n(15,"svg-icon",11),f("click",function(){return i.deletePromotion.emit()}),r(),L(),r()),t&2){let a;l("image",((a=i.promotion())==null||a.featuredBanner==null||a.featuredBanner.uris==null||a.featuredBanner.uris.ratio_3_2_fit_in_no_filter==null?null:a.featuredBanner.uris.ratio_3_2_fit_in_no_filter.lg)||"https://via.placeholder.com/300x100?text=Pas%20d%27image"),m(4),ee(" ",i.promotion().title," "),m(),g(5,i.promotion().brand?5:-1),m(2),g(7,i.promotion().target===0?7:-1),m(),g(8,i.promotion().target===1?8:-1),m(),g(9,i.promotion().target===2?9:-1),m(2),ee(" ",i.promotion().amount," "),m(4),l("matTooltip","Supprimer")("matTooltipPosition","below")("svgStyle",I(10,ht))}},dependencies:[A,Ve,Ie,J],styles:["[_nghost-%COMP%]{display:flex}"],changeDetection:0})}}return o}
1)();var bt=(o,p)=>p.id;function Et(o,p){if(o&1){let e=F();n(0,"button",5),f("click",function(){b(e);let i=h();return E(i.goToAddPromotion())}),s(1," Ajouter une offre privil\xE8ge "),r()}}function Pt(o,p){if(o&1){let e=F();n(0,"peb-promotion-card",9),f("deletePromotion",function(){let i=b(e).$implicit,a=h(2);return E(a.removePromotion(i.id))})("editPromotion",function(){let i=b(e).$implicit,a=h(2);return E(a.editPromotion(i.id))}),r()}if(o&2){let e=p.$implicit;l("promotion",e)}}function St(o,p){if(o&1){let e=F();n(0,"div",3)(1,"peb-cards-grid"),pe(2,Pt,1,1,"peb-promotion-card",6,bt),r(),n(4,"div",7)(5,"peb-pagination",8),f("pageChange",function(i){b(e);let a=h();return E(a.changePage(i))}),r()()()}if(o&2){let e=h();m(2),se(e.promotions()),m(3),l("currentPage",e.args().page)("itemsPerPage",e.args().limit)("totalItems",e.count())}}function xt(o,p){if(o&1){let e=F();n(0,"div",4),u(1,"peb-no-result",10),n(2,"button",11),f("click",function(){b(e);let i=h();return E(i.goToAddPromotion())}),s(3," Ajouter une offre privil\xE8ge "),r()()}}var et=(()=>{class o{constructor(e,t,i,a){this.route=e,this.router=t,this.promotionsQueryService=i,this.confirmDialogService=a,this.companyId=this.route.snapshot.params.companyId,this.args=U({companyId:this.companyId,limit:12,page:1}),this.promotionsQuery=T(()=>this.promotionsQueryService.getPromotionsQuery(this.args())),this.promotions=y(()=>this.promotionsQuery.data()?.rows||[]),this.count=y(()=>this.promotionsQuery.data()?.count||0),this.isFetching=y(()=>this.promotionsQuery.isFetching()),this.deletePromotionMutation=N(()=>this.promotionsQueryService.deletePromotionMutation())}goToAddPromotion(){this.router.navigate([`company/${this.companyId}/promotions/create`])}changePage(e){this.args.update(t=>x(S({},t),{page:e}))}editPromotion(e){this.router.navigate([`company/${this.companyId}/promotions/edit/${e}`])}removePromotion(e){this.confirmDialogService.openConfirmation({enableLogo:!0,message:"\xCAtes-vous s\xFBr(e) de vouloir supprimer cette promotion ?",confirmText:"Supprimer",cancelText:"Annuler",onConfirmation:()=>{this.deletePromotionMutation.mutate({companyId:this.companyId,promotionId:e})}})}static{this.\u0275fac=function(t){return new(t||o)(c($),c(w),c(R),c(Oe))}}static{this.\u0275cmp=C({type:o,selectors:[["peb-list-promotion"]],decls:5,vars:3,consts:[["title","Offres privil\xE8ges"],["page-header-right",""],["peb-button","","type","button","color","yellow","size","small"],[1,"tw-p-6"],[1,"tw-flex","tw-flex-1","tw-flex-col","tw-items-center","tw-justify-center","tw-gap-4"],["peb-button","","type","button","color","yellow","size","small",3,"click"],[3,"promotion"],[1,"tw-mt-8"],[3,"pageChange","currentPage","itemsPerPage","totalItems"],[3,"deletePromotion","editPromotion","promotion"],["additionalText","","text","Aucune offre privil\xE8ge n'a \xE9t\xE9 enregistr\xE9e"],["peb-button","","color","black",3,"click"]],template:function(t,i){t&1&&(n(0,"peb-page-header",0),B(1,1),_(2,Et,2,0,"button",2),L(),r(),_(3,St,6,3,"div",3)(4,xt,4,0,"div",4)),t&2&&(m(2),g(2,i.count()>0&&!i.isFetching()?2:-1),m(),g(3,i.count()>0?3:-1),m(),g(4,i.count()===0&&!i.isFetching()?4:-1))},dependencies:[A,Ue,$e,Y,Ne,Ze],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:100%}"],changeDetection:0})}}return o})();var It=[{path:"",component:et},{path:"create",component:Xe},{path:"edit/:promotionId",component:Ye}],tt=(()=>{class o{static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275mod=G({type:o})}static{this.\u0275inj=O({imports:[ie.forChild(It),ie]})}}return o})();var Wo=(()=>{class o{static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275mod=G({type:o})}static{this.\u0275inj=O({imports:[de,Re,tt]})}}return o})();export{Wo as PromotionsModule};

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.