PageSourceSearch

https://sociallab.sa/chunk-hO3NjErT.js

js sociallab.sa collected 2026-10-01 23:57:47 UTC 8,227 bytes, 1 lines download raw bytes

1import {S}from'./chunk-B2vK_xMt.js';import {E as En,D as De$1}from'./chunk-DFWdtebV.js';import'./chunk-DvLFd6NQ.js';import'./chunk-BGOHF1M9.js';import {c as ce}from'./chunk-BRsHFk4j.js';import'./chunk-C0DmzTpz.js';import'./chunk-CkU8oUfw.js';import {c3 as Xr,V,bK as P,bI as Gt,X as Xb,T as Tt,j as Xv,N as Ng,z as zg,w as w0,H as H0,Z as Zx,k as dn,l as zw,s as sk,n as nd,r as rC,m as wC,o as mv,p as GC,t as tD,q as vD,aO as cD,aP as hD,b0 as _D,aX as mD,u as al,x as tM,y as dM,L as Lb,A as r1,P as P1,B as xS,C as Vs,J as GS,K as iI,M as RI,Q as us,S as ms,Y as UI,_ as tE,$ as Dn,a0 as ME,a1 as ny,a2 as go,a3 as Kd,a4 as XE,a5 as LT,a6 as mA,a7 as mt,aM as QM,a8 as fy,aa as Js,ac as H_,ae as pS,ad as gd,a9 as ZT,aB as ey,ai as dy,bn as nS,ag as SC,aj as jy,al as gS,ah as YT,af as XT,aT as d_,ak as Ed,am as JT,ba as xy,bg as mS}from'./main-4WA6AAHG.js';var Te=()=>["Set a points price for every feature you intend to charge for.","Leave a feature at zero only if you deliberately want it to be free.","Prices apply to points-based clients only; legacy clients keep using their subscription quotas."],Se=(i,t)=>t.featureId;function we(i,t){if(i&1&&(Js(0,"span",17),H_(1),gd()),i&2){let e=t.$implicit;SC(),jy(e.featureCode||e.featureNameEn);}}function Fe(i,t){if(i&1&&(Js(0,"div",5)(1,"mat-icon"),H_(2,"warning"),gd(),Js(3,"div")(4,"b"),H_(5),gd(),H_(6),pS(7,"translate"),Js(8,"div",16),XT(9,we,2,1,"span",17,Se),gd()()()),i&2){let e=d_();SC(5),jy(e.unpricedBillable.length),SC(),Ed(" ",gS(7,2,"feature(s) support points billing but are priced 0 \u2014 they will NOT charge anything until you set a price.")," "),SC(3),JT(e.unpricedBillable);}}function Ae(i,t){if(i&1&&(Js(0,"span",17),H_(1),gd()),i&2){let e=t.$implicit;SC(),jy(e.featureCode||e.featureNameEn);}}function Be(i,t){if(i&1&&(Js(0,"div",6)(1,"mat-icon"),H_(2,"error"),gd(),Js(3,"div")(4,"b"),H_(5),gd(),H_(6),pS(7,"translate"),Js(8,"div",16),XT(9,Ae,2,1,"span",17,Se),gd()()()),i&2){let e=d_();SC(5),jy(e.unclassified.length),SC(),Ed(" ",gS(7,2,"feature(s) are unclassified \u2014 the new plans model neither limits nor charges them, so any price set here can never apply.")," "),SC(3),JT(e.unclassified);}}function Ee(i,t){if(i&1&&H_(0),i&2){let e=t.$implicit;jy(e.featureNameAr);}}function Ie(i,t){if(i&1&&H_(0),i&2){let e=t.$implicit;jy(e.featureNameEn);}}function Oe(i,t){if(i&1&&H_(0),i&2){let e=t.$implicit;jy(e.featureCode||"-");}}function ke(i,t){i&1&&(Js(0,"mat-icon",18),pS(1,"translate"),H_(2,"error"),gd()),i&2&&dy("title",gS(1,1,"Unclassified \u2014 never gated or charged"));}function De(i,t){if(i&1&&(Js(0,"span"),H_(1),pS(2,"translate"),ZT(3,ke,3,3,"mat-icon",18),gd()),i&2){let e=t.$implicit,p=d_();xy("unpriced",p.isUnclassified(e)),SC(),Ed(" ",gS(2,4,p.featureTypeLabel(e))," "),SC(2),YT(p.isUnclassified(e)?3:-1);}}function Ue(i,t){if(i&1&&(H_(0),pS(1,"number")),i&2){let e=t.$implicit;jy(mS(1,1,e.unitPrice,"1.0-2"));}}function Le(i,t){i&1&&(Js(0,"mat-icon",18),pS(1,"translate"),H_(2,"warning"),gd()),i&2&&dy("title",gS(1,1,"Billable but priced 0 \u2014 will not charge"));}function Ne(i,t){if(i&1&&(Js(0,"span"),H_(1),pS(2,"number"),ZT(3,Le,3,3,"mat-icon",18),gd()),i&2){let e=t.$implicit,p=d_();xy("unpriced",p.isUnpricedBillable(e)),SC(),Ed(" ",mS(2,4,e.pointsPrice,"1.0-2")," "),SC(2),YT(p.isUnpricedBillable(e)?3:-1);}}function $e(i,t){if(i&1&&(H_(0),pS(1,"number")),i&2){let e=t.$implicit;jy(mS(1,1,e.pointsUnitPrice,"1.0-2"));}}function Re(i,t){i&1&&(Js(0,"div",15)(1,"span",19),H_(2),pS(3,"translate"),gd()()),i&2&&(SC(2),jy(gS(3,1,"No features found")));}var Di=(()=>{class i{constructor(e,p,m){this.pointsAdminService=e,this.loadingService=p,this.errorService=m,this.features=[],this.isLoading=false,this.columns=[{key:"featureNameAr",label:"Feature (AR)",priority:1},{key:"featureNameEn",label:"Feature (EN)",priority:1},{key:"featureCode",label:"Code",priority:2},{key:"featureType",label:"Classification",priority:1},{key:"pointsPrice",label:"Points Price",priority:1},{key:"pointsUnitPrice",label:"Points Unit Price",priority:2},{key:"unitPrice",label:"Add-on price (SAR)",priority:2}];}ngOnInit(){this.loadFeatures();}get unpricedBillable(){return this.features.filter(e=>this.isUnpricedBillable(e))}isUnpricedBillable(e){return !!e.isBillablePerUse&&(!e.pointsPrice||e.pointsPrice<=0)}isUnclassified(e){return !e.featureType}get unclassified(){return this.features.filter(e=>this.isUnclassified(e))}featureTypeLabel(e){switch(e.featureType){case 1:return "Core";case 2:return "Quota";case 3:return "Capability";case 4:return "Pay per use";case 5:return "One time";default:return "Unclassified"}}loadFeatures(){this.isLoading=true,this.loadingService.beginSuppress(),this.pointsAdminService.getFeaturePricing().pipe(Xr(()=>{this.isLoading=false,this.loadingService.endSuppress();})).subscribe({next:e=>{this.features=e.succeeded?e.data:[];},error:e=>{this.errorService.setError(e,"Failed to load");}});}static{this.\u0275fac=function(p){return new(p||i)(V(S),V(P),V(Gt))};}static{this.\u0275cmp=Xb({type:i,selectors:[["app-admin-feature-pricing"]],decls:20,vars:11,consts:[["helpKey","admin-feature-pricing","t
1itle","Feature pricing","intro","The points price charged each time a feature is used. This is what turns metering into money.","warning","A feature left at a price of zero never charges, even though its usage is measured. If a client reports that nothing was deducted, check this page first.",3,"steps"],[1,"cardWithShadow","theme-card"],[1,"m-b-0"],[1,"cardWithShadow"],[1,"p-24"],[1,"pricing-warning"],[1,"pricing-warning","pricing-warning--severe"],[3,"dataSource","columns","loading"],["rtColumnDef","featureNameAr"],["rtColumnDef","featureNameEn"],["rtColumnDef","featureCode"],["rtColumnDef","featureType"],["rtColumnDef","unitPrice"],["rtColumnDef","pointsPrice"],["rtColumnDef","pointsUnitPrice"],[1,"text-center","p-24"],[1,"codes"],[1,"code-chip"],[1,"warn-icon",3,"title"],[1,"text-muted","f-s-14"]],template:function(p,m){p&1&&(fy(0,"app-page-help",0),Js(1,"mat-card",1)(2,"mat-card-header")(3,"mat-card-title",2)(4,"h3"),H_(5),pS(6,"translate"),gd()()()(),Js(7,"mat-card",3)(8,"mat-card-content",4),ZT(9,Fe,11,4,"div",5),ZT(10,Be,11,4,"div",6),Js(11,"app-responsive-table",7),ey(12,Ee,1,1,"ng-template",8)(13,Ie,1,1,"ng-template",9)(14,Oe,1,1,"ng-template",10)(15,De,4,6,"ng-template",11)(16,Ue,2,4,"ng-template",12)(17,Ne,4,7,"ng-template",13)(18,$e,2,4,"ng-template",14),gd(),ZT(19,Re,4,3,"div",15),gd()()),p&2&&(dy("steps",nS(10,Te)),SC(5),jy(gS(6,8,"Feature Points Pricing")),SC(4),YT(m.unpricedBillable.length>0?9:-1),SC(),YT(m.unclassified.length>0?10:-1),SC(),dy("dataSource",m.features)("columns",m.columns)("loading",m.isLoading),SC(8),YT(m.features.length===0?19:-1));},dependencies:[Tt,ce,En,De$1,Xv,Ng,zg,w0,H0,Zx,dn,zw,sk,nd,rC,wC,mv,GC,tD,vD,cD,hD,_D,mD,al,tM,dM,Lb,r1,P1,xS,Vs,GS,iI,RI,us,ms,UI,tE,Dn,ME,ny,go,Kd,XE,LT,mA,mt,QM],styles:[".pricing-warning[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;background:#fff8e6;border:1px solid #f0d9a8;border-radius:10px;padding:12px 14px;margin-bottom:16px}.pricing-warning[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:#b7791f;flex:none}.pricing-warning[_ngcontent-%COMP%]   .codes[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.pricing-warning[_ngcontent-%COMP%]   .code-chip[_ngcontent-%COMP%]{font-family:monospace;font-size:.8rem;background:#fff;border:1px solid #f0d9a8;border-radius:16px;padding:2px 8px}.pricing-warning--severe[_ngcontent-%COMP%]{background:#fdeceb;border-color:#f3b9b4}.pricing-warning--severe[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:#b42318}.pricing-warning--severe[_ngcontent-%COMP%]   .code-chip[_ngcontent-%COMP%]{border-color:#f3b9b4}.unpriced[_ngcontent-%COMP%]{color:#b42318;font-weight:600;display:inline-flex;align-items:center;gap:4px}.unpriced[_ngcontent-%COMP%]   .warn-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}@media(prefers-color-scheme:dark){.pricing-warning[_ngcontent-%COMP%]{background:#3a3320;border-color:#5a4d2a}.pricing-warning[_ngcontent-%COMP%]   .code-chip[_ngcontent-%COMP%]{background:#22262c;border-color:#5a4d2a}}"],changeDetection:1});}}return i})();export{Di as AdminFeaturePricingComponent};

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.