PageSourceSearch

https://www.chemarc.com/mainbuild/9076.31b9eb9f3ebd0478.js

js chemarc.com collected 2026-09-28 09:10:54 UTC 35,466 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkchemarc=self.webpackChunkchemarc||[]).push([[9076],{39076:(bt,b,r)=>{r.d(b,{b:()=>xt});var t=r(94650),D=r(36539),u=r(36895),p=r(38673),h=r(66495),P=r(84373),T=r(66518),C=r(38631),f=r(43393),v=r(98723),m=r(7625),y=r(16382),q=r(93449),A=r(76343),Z=r(49095),I=r(44309),g=r(34793),E=r(3639),c=r(24006),M=r(24363),x=r(18455),w=r(29203),U=r(46289),O=r(51873),S=r(97989),N=r(3607);function B(o,a){if(1&o){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",15)(2,"button",16),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.removeMessage())}),t.TgZ(3,"span",17),t._uU(4,"\xd7"),t.qZA()(),t._uU(5),t.qZA(),t.BQk()}if(2&o){const e=t.oxw();t.xp6(1),t.ekj("alert-success","success"==e.msg)("alert-danger","error"==e.msg),t.xp6(4),t.hij(" ","success"==e.msg?"Price has been Updated":"Unable to update price,please try later"," ")}}function k(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"div",36)(1,"label",37)(2,"input",38),t.NdJ("change",function(){t.CHM(e);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.select_product(i))}),t.qZA()()()}if(2&o){const e=t.oxw(2).$implicit,n=t.oxw();t.ekj("active",n.activeCheckbox(e._id)),t.xp6(1),t.MGl("for","enquiry-compare-",e._id,""),t.xp6(1),t.MGl("name","enquiry-compare-",e._id,"")("id","enquiry-compare-",e._id,"")}}function J(o,a){if(1&o&&(t.TgZ(0,"div",34),t.YNc(1,k,3,5,"div",35),t.qZA()),2&o){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",!(null!=e&&e.is_alternate))}}function Q(o,a){if(1&o&&(t.ynx(0),t._uU(1),t.BQk()),2&o){const e=t.oxw(2).$implicit,n=t.oxw();t.xp6(1),t.hij(" ",n.formatTitle((null==e?null:e.Title)||(null==e||null==e.products[0]?null:e.products[0].Title))," ")}}function L(o,a){if(1&o){const e=t.EpF();t.ynx(0),t.TgZ(1,"a",40),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.open_details(i._id,null==i?null:i.is_finished))}),t._uU(2),t.qZA(),t.BQk()}if(2&o){const e=t.oxw(2).$implicit,n=t.oxw();t.xp6(2),t.hij(" ",n.formatTitle((null==e?null:e.Title)||(null==e||null==e.products[0]?null:e.products[0].Title))," ")}}function K(o,a){if(1&o&&(t.TgZ(0,"h3",39),t.YNc(1,Q,2,1,"ng-container",0),t.YNc(2,L,3,1,"ng-container",0),t.qZA()),2&o){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.multi||e.showContract),t.xp6(1),t.Q6J("ngIf",!e.multi&&!e.showContract)}}function F(o,a){if(1&o&&(t.TgZ(0,"h3",39),t._uU(1),t.qZA()),2&o){const e=t.oxw().$implicit,n=t.oxw();t.xp6(1),t.hij(" ",n.formatTitle((null==e?null:e.Title)||(null==e||null==e.products[0]?null:e.products[0].Title)),"")}}function Y(o,a){if(1&o&&(t.ynx(0),t.TgZ(1,"span",41),t._uU(2),t.qZA(),t.BQk()),2&o){const e=t.oxw().$implicit;t.xp6(2),t.hij(" ",e.tags.join(", ")," ")}}function G(o,a){if(1&o&&(t.TgZ(0,"div",42),t._uU(1),t.qZA()),2&o){const e=t.oxw().$implicit;t.xp6(1),t.Oqu((null==e?null:e.category)||(null==e?null:e.category_name)||"")}}function R(o,a){if(1&o&&(t.TgZ(0,"li")(1,"span",45),t._uU(2,"ERP Code:"),t.qZA(),t.TgZ(3,"span",46),t._uU(4),t.qZA()()),2&o){const e=t.oxw(2).$implicit;t.xp6(4),t.Oqu(null==e?null:e.erp_code)}}function H(o,a){if(1&o&&(t.TgZ(0,"li")(1,"span",45),t._uU(2,"Finished Product:"),t.qZA(),t.TgZ(3,"span",46),t._uU(4),t.qZA()()),2&o){const e=t.oxw(2).$implicit;t.xp6(4),t.Oqu(null!=e&&e.is_finished?"Yes":"No")}}function W(o,a){if(1&o&&(t.TgZ(0,"li")(1,"span",45),t._uU(2,"GST:"),t.qZA(),t.TgZ(3,"span",46),t._uU(4),t.qZA()()),2&o){const e=t.oxw(2).$implicit;t.xp6(4),t.hij("",null==e?null:e.GST,"%")}}function j(o,a){if(1&o&&(t.TgZ(0,"div",43)(1,"div",44)(2,"ol")(3,"li")(4,"span",45),t._uU(5,"HS Code:"),t.qZA(),t.TgZ(6,"span",46),t._uU(7),t.qZA()(),t.TgZ(8,"li")(9,"span",45),t._uU(10,"CAS NO.:"),t.qZA(),t.TgZ(11,"span",46),t._uU(12),t.qZA()(),t.YNc(13,R,5,1,"li",0),t.YNc(14,H,5,1,"li",0),t.YNc(15,W,5,1,"li",0),t.qZA()()()),2&o){const e=t.oxw().$implicit,n=t.oxw();t.xp6(7),t.Oqu(n.getHscode(e)),t.xp6(5),t.Oqu(n.getCasNo(e)),t.xp6(1),t.Q6J("ngIf",null==e?null:e.erp_code),t.xp6(1),t.Q6J("ngIf","BUYING"==n.page&&!n.isContractMfg),t.xp6(1),t.Q6J("ngIf",n.isNotBlankAndEmpty(null==e?null:e.GST))}}function z(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"a",50),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.createEnquiry(i))}),t._uU(1,"RFQ"),t.qZA()}}function V(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"a",51),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2),s=i.index,l=i.$implicit,d=t.oxw();return t.KtG(d.toggleArrow(s,l))}),t._uU(1,"Update Price"),t.qZA()}}function X(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"a",50),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.createOffer(i))}),t._uU(1,"RFO"),t.qZA()}}function tt(o,a){if(1&o&&(t.TgZ(0,"div",47),t.YNc(1,z,2,0,"a",48),t.YNc(2,V,2,0,"a",49),t.YNc(3,X,2,0,"a",48),t.qZA()),2&o){const e=t.oxw(),n=e.$implicit,i=e.index,s=t.oxw();
1t.xp6(1),t.Q6J("ngIf",!s.multi&&"BUYING"==s.page&&(!s.isPlanner||s.isBuyer)&&s.hasPermission("save_enquiry")&&!(null!=n&&n.is_finished)),t.xp6(1),t.Q6J("ngIf",s.hasPermission("update_price")&&"SELLING"==s.page&&s.active_index!=i),t.xp6(1),t.Q6J("ngIf",!s.multi&&"SELLING"==s.page&&s.active_index!=i&&s.hasPermission("save_liquidation"))}}function et(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"li")(1,"a",55),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.add_to_tally(i))}),t._uU(2),t.qZA()()}if(2&o){const e=t.oxw(2).$implicit;t.xp6(2),t.hij("",null!=e&&e.saved_in_tally?"Update":"Add"," to ERP")}}function it(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"li")(1,"a",55),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3).$implicit,s=t.oxw();return t.KtG(s.delete_popup(i))}),t._uU(2,"Delete"),t.qZA()()}}function nt(o,a){if(1&o){const e=t.EpF();t.ynx(0),t.TgZ(1,"li")(2,"a",55),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2).$implicit,s=t.oxw();return t.KtG(s.edit_product(i))}),t._uU(3,"Edit"),t.qZA()(),t.YNc(4,it,3,0,"li",0),t.BQk()}if(2&o){const e=t.oxw(2).$implicit,n=t.oxw();t.xp6(4),t.Q6J("ngIf",!(null!=e&&e.saved_in_tally||"SELLING"!=n.page&&(null!=n.organisation&&n.organisation.erp_connected||null!=n.organisation&&n.organisation.erp_type)))}}const ot=function(o){return["/bizhub",o,"buyer-dashboard","analytics"]},st=function(o){return{frequency:"Monthly",product_id:o}};function at(o,a){if(1&o&&(t.TgZ(0,"li")(1,"a",56),t._uU(2,"Analytics"),t.qZA()()),2&o){const e=t.oxw(3).$implicit,n=t.oxw();t.xp6(1),t.Q6J("routerLink",t.VKq(2,ot,null==n.organisation?null:n.organisation.account))("queryParams",t.VKq(4,st,null==e?null:e._id))}}function rt(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"li")(1,"a",57),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3).$implicit,s=t.oxw();return t.KtG(s.createReverseAuction(i))}),t._uU(2,"Create Reverse Auction"),t.qZA()()}}function lt(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"li")(1,"a",58),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3).$implicit,s=t.oxw();return t.KtG(s.active_product=i)}),t._uU(2,"Price History"),t.qZA()()}}function ct(o,a){if(1&o&&(t.ynx(0),t.YNc(1,at,3,6,"li",0),t.YNc(2,rt,3,0,"li",0),t.YNc(3,lt,3,0,"li",0),t.BQk()),2&o){const e=t.oxw(2).$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngIf","BUYING"==n.page),t.xp6(1),t.Q6J("ngIf","BUYING"==n.page&&n.hasPermission("save_ra")),t.xp6(1),t.Q6J("ngIf","SELLING"==n.page&&n.hasPermission("update_price")&&(null==e?null:e.price_history))}}function _t(o,a){if(1&o&&(t.TgZ(0,"div",52),t._UZ(1,"i",53),t.TgZ(2,"ul",54),t.YNc(3,et,3,1,"li",0),t.YNc(4,nt,5,1,"ng-container",0),t.YNc(5,ct,4,3,"ng-container",0),t.qZA()()),2&o){const e=t.oxw(2);t.xp6(3),t.Q6J("ngIf","TAL"==(null==e.organisation?null:e.organisation.erp_type)&&"CONTRACT_MFG"!=e.sourcePage),t.xp6(1),t.Q6J("ngIf",e.user&&(null==e.user?null:e.user.assignment)&&(null==e.user||null==e.user.assignment?null:e.user.assignment.can_alter_masters)),t.xp6(1),t.Q6J("ngIf","CONTRACT_MFG"!=e.sourcePage)}}function ut(o,a){if(1&o&&(t.TgZ(0,"mat-option",71),t._uU(1),t.qZA()),2&o){const e=a.$implicit;t.Q6J("value",e),t.xp6(1),t.Oqu(e)}}function pt(o,a){if(1&o){const e=t.EpF();t.TgZ(0,"div",59)(1,"form",60,61)(3,"mat-form-field",62)(4,"mat-label"),t._uU(5,"Currency"),t.qZA(),t.TgZ(6,"mat-select",63),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.product.price.currency=i)})("ngModelChange",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.save_enable())}),t.YNc(7,ut,2,2,"mat-option",64),t.qZA()(),t.TgZ(8,"mat-form-field",65)(9,"mat-label"),t._uU(10,"Price"),t.qZA(),t.TgZ(11,"input",66),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.product.price.price=i)})("ngModelChange",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.save_enable())}),t.qZA()(),t.TgZ(12,"app-searchable-select",67),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.product.measurement_units=i)})("ngModelChange",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.save_enable())}),t.qZA(),t.TgZ(13,"div",68)(14,"button",69),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.updatePrice())}),t._uU(15,"Update"),t.qZA(),t.TgZ(16,"button",70),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.cancelUpdate())}),t._uU(17,"Cancel"),t.qZA()()()()}if(2&o){const e=t.MAs(2),n=t.oxw().index,i=t.oxw();t.Udp("display",i.active_index==n?"block":"none"),t.xp6(6),t.Q6J("ngModel",i.product.price.currency)("name","currency"+n),t.xp6(1),t.Q6J("ngForOf",i.currencies),t.xp6(4),t.Q6J("ngModel",i.product.price.price)("name","price"+n),t.xp6(1),t.Q6J("options",i.units_options)("ngModel",i.product.measurement_units)("multiple",!0)("name","measurement_unit"+n),t.xp6(2),t.Q6J("disabled",!(e.valid&&i.onchange_save))}}function dt(o,a){if(1&o&&(t.TgZ(0,"div",72)(1,"div",73)(2,"div",74)(3,"h3",75),t._uU(4,"Procurement Plan "),t.TgZ(5,"small"),t._uU(6),t.qZA()(),t.TgZ(7,"div",76)(8,"ol")(9,"li",77)(10,"span",45),t._uU(11,"Closing Stock Plan"),t.qZA(),t.TgZ(12,"span",46),t._uU(13),t.qZA()(),t.TgZ(14,"li",78)(15,"span",45),t._uU(16,"Opening Stock"),t.qZA(),t.TgZ(17,"span",46),t._uU(18),t.qZA()(),t.TgZ(19,"li",79)(20,"span",45),t._uU(21,"Requirement"),t.qZA(),t.TgZ(22,"span",46),t._uU(23),t.qZA()(),t.TgZ(24,"li",80)(25,"span",45),t._uU(26,"Pending Orders"),t.qZA(),t.TgZ(27,"span",81),t._uU(28),t.qZA()(),t.TgZ(29,"li",82)(30,"span",45),t._uU(31,"Procurement Plan"),t.qZA(),t.TgZ(32,"span",83),t._uU(33),t.qZA()()()()(),t.TgZ(34,"div",84)(35,"h3",75),t._uU(36,"Received during the month"),t.qZA(),t.TgZ(37,"div",76)(38,"ol")(39,"li",77)(40,"span",45),t._uU(41,"From Pending Orders"),t.qZA(),t.TgZ(42,"span",46),t._uU(43),t.qZA()(),t.TgZ(44,"li",79)(45,"span",45),t._uU(46,"Inventory"),t.qZA(),t.TgZ(47,"span",46),t._uU(48),t.TgZ(49,"small",85),t._uU(50),t.ALo(51,"date"),t.qZA()()()()()()()()),2&o){const e=t.oxw().$implicit,n=t.oxw();
1t.xp6(6),t.hij("(",n.getProcurementPlan(e).procurementPeriod,")"),t.xp6(7),t.AsE("",n.getProcurementPlan(e).closingStockPlan," ",n.getProcurementPlan(e).unit,""),t.xp6(5),t.AsE("",n.getProcurementPlan(e).openingStockQuantity," ",n.getProcurementPlan(e).unit,""),t.xp6(5),t.AsE("",n.getProcurementPlan(e).requirementQuantity," ",n.getProcurementPlan(e).unit,""),t.xp6(5),t.AsE("",n.getProcurementPlan(e).pendingOrderQuantity," ",n.getProcurementPlan(e).unit,""),t.xp6(5),t.AsE("",n.getProcurementValues(n.getProcurementPlan(e).closingStockPlan,n.getProcurementPlan(e).requirementQuantity,n.getProcurementPlan(e).openingStockQuantity,n.getProcurementPlan(e).pendingOrderQuantity)," ",n.getProcurementPlan(e).unit,""),t.xp6(10),t.AsE("",n.getProcurementPlan(e).pendingOrderQuantity," ",n.getProcurementPlan(e).unit,""),t.xp6(5),t.AsE("",n.currInventory(n.getProcurementPlan(e).openingStockQuantity,n.getProcurementPlan(e).inwardsQuantity,n.getProcurementPlan(e).outwardsQuantity)," ",n.getProcurementPlan(e).unit,""),t.xp6(2),t.Oqu(t.lcZ(51,16,n.getProcurementPlan(e).updated_at))}}function mt(o,a){if(1&o&&(t.TgZ(0,"div",18)(1,"div",19)(2,"div",20)(3,"div",21)(4,"div",22),t.YNc(5,J,2,1,"div",23),t.TgZ(6,"div",24)(7,"div",25),t.YNc(8,K,3,2,"h3",26),t.YNc(9,F,2,1,"h3",26),t.YNc(10,Y,3,1,"ng-container",0),t.YNc(11,G,2,1,"div",27),t.qZA(),t.YNc(12,j,16,5,"div",28),t.qZA(),t.TgZ(13,"div",29),t.YNc(14,tt,4,3,"div",30),t.YNc(15,_t,6,3,"div",31),t.YNc(16,pt,18,12,"div",32),t.qZA()()()(),t.YNc(17,dt,52,18,"div",33),t.qZA()()),2&o){const e=a.$implicit,n=a.index,i=t.oxw();t.xp6(5),t.Q6J("ngIf",i.multi||i.showContract),t.xp6(3),t.Q6J("ngIf",(!i.isPlanner||i.isBuyer)&&((null==e?null:e.Title)||(null==e?null:e.products)||(null==e||null==e.products[0]?null:e.products[0].Title))),t.xp6(1),t.Q6J("ngIf",i.isPlanner&&!i.isBuyer&&((null==e?null:e.Title)||(null==e?null:e.products)||(null==e||null==e.products[0]?null:e.products[0].Title))),t.xp6(1),t.Q6J("ngIf",e.tags&&(null==e.tags?null:e.tags.length)>0),t.xp6(1),t.Q6J("ngIf","BUYING"==i.page&&((null==e?null:e.category)||(null==e?null:e.category_name))),t.xp6(1),t.Q6J("ngIf","EQUIPMENT"!=(null==e?null:e.product_type)),t.xp6(2),t.Q6J("ngIf","CONTRACT_MFG"!=i.sourcePage),t.xp6(1),t.Q6J("ngIf",i.active_index!=n&&(i.hasPermission("edit")||i.hasPermission("delete")||i.hasPermission("delete_product")||i.isPlanner)),t.xp6(1),t.Q6J("ngIf",i.product&&i.product.price&&"CONTRACT_MFG"!=i.sourcePage),t.xp6(1),t.Q6J("ngIf",i.hasProcurementPlan(e)&&i.getProcurementPlan(e)&&i.getProcurementPlan(e).requirementQuantity)}}function gt(o,a){if(1&o&&(t.ynx(0),t._UZ(1,"bizhub-nothing",86),t.BQk()),2&o){const e=t.oxw();
1t.xp6(1),t.MGl("text","added any ",e.basic_type||"products"," yet.")}}function ht(o,a){if(1&o&&(t.TgZ(0,"tr")(1,"td",79),t._uU(2),t.ALo(3,"date"),t.qZA(),t.TgZ(4,"td",78),t._UZ(5,"i"),t._uU(6),t.ALo(7,"number"),t.qZA()()),2&o){const e=a.$implicit;t.xp6(2),t.Oqu(t.Dn7(3,6,null==e?null:e.created_at,"dd MMM yyyy, hh:mm a","IST")),t.xp6(3),t.Gre("fa fa-",null==e?null:e.currency.toLowerCase()," no-stroke"),t.xp6(1),t.AsE("",t.xi3(7,10,null==e?null:e.price,"1.2-2"),"/",null==e?null:e.unit,"")}}function ft(o,a){if(1&o&&(t.TgZ(0,"table",87)(1,"thead")(2,"tr")(3,"th",79),t._uU(4,"Date and Time"),t.qZA(),t.TgZ(5,"th",78),t._uU(6,"Price"),t.qZA()()(),t.TgZ(7,"tbody"),t.YNc(8,ht,8,13,"tr",88),t.qZA()()),2&o){const e=t.oxw();t.xp6(8),t.Q6J("ngForOf",e.active_product.price_history)}}function vt(o,a){1&o&&(t.TgZ(0,"div",89),t._uU(1,"No Price History Available"),t.qZA())}let xt=(()=>{class o extends D.t{constructor(e,n,i,s,l,d,_){super(e),this.unitsService=n,this.dialog=i,this.dataService=s,this.router=l,this.route=d,this.document=_,this.currencies=y.Mf,this.periods=[],this.msg="",this.showMsg=!1,this.multiProducts=[],this.saveEnquiry=new t.vpe,this.saveLiquidation=new t.vpe,this.saveContractsEnquiries=new t.vpe,this.saveDirectContract=new t.vpe,this.deleteProduct=new t.vpe,this.editProduct=new t.vpe,this.saveProduct=new t.vpe,this.setDisableSendMulti=new t.vpe,this.setDisableSendContracts=new t.vpe,this.suppliers=[],this.other_suppliers=[],this.today=new Date,this.showDelete=!1,this.onchange_save=!1,this.product=new p.xs,this.price=new p.tA,this.active_index=-1,this.units=[],this.unitFullForm={},this.validCombinations=[],this.other_customers=[],this.customers=[],this.isCreateContractsEnquiriesForSuppliers=!1,this.r="bizhub.profile"}get isContractMfg(){return!!this.router?.url&&this.router.url.includes("contract-manufacturing")}onInit(){this.base_url=this.document.location.origin,this.getUnits(this)}trackByFn(e,n){return e}createReverseAuction(e){this.dataService.setData({product_id:e?._id,Title:e?.Title}),this.router.navigate(["../reverse-auction"],{relativeTo:this.route,queryParams:{}})}open_details(e,n){const i={is_finished:n?"true":"false"};this.sourcePage?this.router.navigate([e.split("/")[1]],{relativeTo:this.route,queryParams:i}):"BUYING"==this.page?this.router.url.includes("contract-manufacturing")?this.router.navigate(["/bizhub/"+this.organisation.account+"/buyer-dashboard/contract-manufacturing/products/"+e.split("/")[1]],{queryParams:i}):this.router.navigate(["/bizhub/"+this.organisation.account+"/buyer-dashboard/"+e.split("/")[1]+"/enquiries"],{queryParams:i}):"SELLING"==this.page&&this.router.navigate(["/bizhub/"+this.organisation.account+"/seller-dashboard/"+e.split("/")[1]+"/enquiries"],{queryParams:i})}createOffer(e){this.product=e,this.offerDialog=this.dialog.open(f.K,{panelClass:["mat-modal","negotiation-modal","negotiation-modal-single-rfq"],maxWidth:"1200px",data:{product:e,source:"",defaultMarketPlaceToggle:!!this.organisation?.marketplace_toggle,allowOtherCustomers:!0,other_customers:this.other_customers,customers:this.customers,page:"SELLING",user:this.user,periods:this.periods,customer_selection:!0,show_buyers:!!this.organisation?.liquidation}}),this.offerDialog.afterClosed().subscribe(i=>{}),this.offerDialog.componentInstance.load_customers.subscribe(i=>{this.load_customers(i),this.allSupplierToBeAdded=!!i?.allSupplierToBeAdded}),this.offerDialog.componentInstance.save_liquidation.subscribe(i=>{this.saveLiquidation.emit(i)})}createOfferMulti(){let e=[...this.multiProducts];for(const i of e)i.quantity="";this.offerDialog=this.dialog.open(f.K,{panelClass:["mat-modal","negotiation-modal","negotiation-modal-multi-rfq"],maxWidth:"980px",data:{material_type:this.material_type,product:e[0],source:"",defaultMarketPlaceToggle:!!this.organisation?.marketplace_toggle,allowOtherCustomers:!0,other_customers:this.other_customers,multi:!0,customers:this.customers,page:"SELLING",user:this.user,products:e,periods:this.periods,customer_selection:!0,show_buyers:!!this.organisation?.liquidation},disableClose:!0}),this.offerDialog.afterClosed().subscribe(i=>{}),this.offerDialog.componentInstance.load_customers.subscribe(i=>{this.load_customers(i),this.allCustomerToBeAdded=!!i?.allCustomerToBeAdded}),this.offerDialog.componentInstance.save_liquidation.subscribe(i=>{this.saveLiquidation.emit(i)})}load_customers(e){if(this.multi){let n={rfo_type:e?.eType,org_product_ids:this.multiProducts.map(s=>
1s?._id)};this.aPost(this._load_customers,n,"load_customers_for_multi_products",`/bizhub/${this.organisation.account}/seller-dashboard/products`)}else this.aGet(this._load_customers,null,"load_product_customers",{rfo_type:e?.eType,pid:e?.productId},`/bizhub/${this.organisation.account}/seller-dashboard/products`)}_load_customers(e,n){e.offerDialog?.componentInstance?.inputData&&(e.offerDialog.componentInstance.inputData.customers=n?.product_customers||[],e.offerDialog.componentInstance.inputData.other_customers=n?.other_customers||[],e.offerDialog.componentInstance.inputData.customersLoading="loaded",e.allCustomerToBeAdded&&e.offerDialog.componentInstance.selectAllCustomer({checked:!0}),e.offerDialog.componentInstance.changeDetector&&e.offerDialog.componentInstance.changeDetector.detectChanges())}createEnquiry(e){this.isCreateContractsEnquiriesForSuppliers=!1,e.has_procurement_plan=this.hasProcurementPlan(e),this.enqDialog=this.dialog.open(h.W,{panelClass:["mat-modal","negotiation-modal","negotiation-modal-single-rfq"],maxWidth:"1200px",data:{product:e,source:"",defaultMarketPlaceToggle:!!this.organisation?.marketplace_toggle,rfq_department_for:this.organisation?.rfq_department_for||[],organisation:this.organisation,material_type:this.material_type,allowOtherSuppliers:!0,other_suppliers:this.other_suppliers,suppliers:this.suppliers,page:"Buying",user:this.user,periods:this.periods,supplier_selection:!0,allowAlternateSelection:!0}
1}),this.enqDialog.afterClosed().subscribe(i=>{}),this.enqDialog.componentInstance.load_suppliers.subscribe(i=>{i?.application_category_id&&i?.is_alternate?this.load_alternate_suppliers(i):this.load_suppliers(i),this.allSupplierToBeAdded=!!i?.allSupplierToBeAdded}),this.enqDialog.componentInstance.save_enquiry.subscribe(i=>{this.saveEnquiry.emit(i)})}createEnquiryMulti(e){this.isCreateContractsEnquiriesForSuppliers=!1;const n=Array.isArray(e)&&e.length>0;let i=JSON.parse(JSON.stringify(n?e:this.multiProducts));for(const l of i)l.has_procurement_plan=this.hasProcurementPlan(l),n||(l.quantity="");this.enqDialog=this.dialog.open(h.W,{panelClass:["mat-modal","negotiation-modal","negotiation-modal-multi-rfq"],maxWidth:"980px",data:{material_type:this.material_type,product:i[0],source:"",defaultMarketPlaceToggle:!!this.organisation?.marketplace_toggle,rfq_department_for:this.organisation?.rfq_department_for||[],allowOtherSuppliers:!0,other_suppliers:this.other_suppliers,multi:this.multi,suppliers:this.suppliers,page:"Buying",user:this.user,products:i,periods:this.periods,supplier_selection:!0,organisation:this.organisation},disableClose:!0}),this.enqDialog.afterClosed().subscribe(l=>{}),this.enqDialog.componentInstance.load_suppliers.subscribe(l=>{this.load_suppliers_for_multi_products(l),this.allSupplierToBeAdded=!!l?.allSupplierToBeAdded}),this.enqDialog.componentInstance.save_enquiry.subscribe(l=>{this.saveEnquiry.emit(l)})}createUnifiedContract(e){const n=[...this.multiContractsProducts];this.isCreateContractsEnquiriesForSuppliers=!0,this.enqDialog=this.dialog.open(C.r,{panelClass:["mat-modal","negotiation-modal","contract-modal"],maxWidth:"980px",disableClose:!0,data:{mode:e,products:n,organisation:this.organisation,user:this.user,material_type:this.material_type,suppliers:[],other_suppliers:[],suppliersLoading:"loading"}});const i=this.enqDialog.afterClosed();this.enqDialog.componentInstance.load_suppliers.pipe((0,m.R)(i)).subscribe(s=>{this.load_suppliers_for_multi_products(s),this.s.isBrowser()&&(0,v.H)(2e3).pipe((0,m.R)(i)).subscribe(()=>{this.enqDialog.componentInstance.inputData.supplier_selection=!this.organisation?.hasOwnProperty("contract_supplier_selection")||this.organisation?.contract_supplier_selection})}),this.enqDialog.componentInstance.save.pipe((0,m.R)(i)).subscribe(s=>{"rfc"===e?this.saveContractsEnquiries.emit(s):this.saveDirectContract.emit(s)}),i.subscribe(()=>{this.isCreateContractsEnquiriesForSuppliers=!1})}createContractsEnquiries(){this.isCreateContractsEnquiriesForSuppliers=!0;let e=[...this.multiContractsProducts];this.enqDialog=this.dialog?.open(T.G,{panelClass:["mat-modal","negotiation-modal","contract-modal"],maxWidth:"980px",data:{material_type:"domestic",products:e,suppliers:this.suppliers,user:this.user,organisation:this.organisation}}),this.enqDialog?.componentInstance?.load_suppliers?.subscribe(i=>{this.load_suppliers_for_multi_products(i),this.allSupplierToBeAdded=!!i?.allSupplierToBeAdded,this.s.isBrowser()&&(0,v.H)(2e3)?.subscribe(()=>{this.enqDialog.componentInstance.inputData.supplier_selection=!this.organisation?.hasOwnProperty("contract_supplier_selection")||this.organisation?.contract_supplier_selection})}),this.enqDialog?.componentInstance?.save?.subscribe(i=>{this.saveContractsEnquiries.emit(i)}),this.enqDialog?.afterClosed()?.subscribe(i=>{})}load_suppliers(e){let n={enquiry_type:e?.eType,material_type:this.material_type,purchase_organisation:e?.purchase_organisation||""},i=e?.productId;if(!i)return;const s=`/bizhub/${this.organisation.account}/buyer-dashboard/${i.replace("OrgProducts/","")}/suppliers`;this.aGet(this._load_suppliers,null,e?.tagSuppliers?"load_cluster_supplier":"load_suppliers",n,s)}_load_suppliers(e,n){if(e.enqDialog?.componentInstance?.inputData){e.enqDialog.componentInstance.inputData.suppliers=n?.suppliers||[],e.enqDialog.componentInstance.inputData.other_suppliers=n?.other_suppliers||[],e.enqDialog.componentInstance.inputData.suppliersLoading="loaded";let i=!e.organisation.hasOwnProperty("my_supplier_selection")||e.organisation?.my_supplier_selection;e.enqDialog.componentInstance.inputData.supplier_selection=i,e.allSupplierToBeAdded&&e.enqDialog.componentInstance.selectAllSupplier({checked:!0}),e.enqDialog.componentInstance.changeDetector&&e.enqDialog.componentInstance.changeDetector.detectChanges()}}load_alternate_suppliers(e){this.aGet(this._load_alternate_suppliers,null,"load_alternate_suppliers",{application_category_id:e?.application_category_id,enquiry_type:e?.eType},`/bizhub/${this.organisation.account}/buyer-dashboard/alternate-suppliers`)}_load_alternate_suppliers(e,n){if(e.enqDialog?.componentInstance?.inputData){e.enqDialog.componentInstance.inputData.suppliers=n?.suppliers||[],e.enqDialog.componentInstance.inputData.other_suppliers=[],e.enqDialog.componentInstance.inputData.suppliersLoading="loaded";let i=!e.organisation.hasOwnProperty("my_supplier_selection")||e.organisation?.my_supplier_selection;e.enqDialog.componentInstance.inputData.supplier_selection=i,e.allSupplierToBeAdded&&e.enqDialog.componentInstance.selectAllSupplier({checked:!0}),e.enqDialog.componentInstance.changeDetector&&e.enqDialog.componentInstance.changeDetector.detectChanges()}}load_suppliers_for_multi_products(e){const n=(e?.org_product_ids||[]).map(_=>
1"string"==typeof _?_:_?.id).filter(Boolean),i=((this.multi?this.multiProducts:this.showContract?this.multiContractsProducts:[])||[]).map(_=>_?._id).filter(Boolean),s=n.length?n:i;s.length&&this.aPost(this._load_suppliers_for_multi_products,{enquiry_type:e?.eType,material_type:this.material_type,purchase_organisation:e?.purchase_organisation||"",org_product_ids:s},e?.tagSuppliers?"load_cluster_supplier":"load_suppliers_for_multi_products",`/bizhub/${this.organisation.account}/buyer-dashboard/products`)}_load_suppliers_for_multi_products(e,n){if(e.enqDialog?.componentInstance?.inputData){e.enqDialog.componentInstance.inputData.suppliers=n?.suppliers||[],e.enqDialog.componentInstance.inputData.other_suppliers=n?.other_suppliers||[],e.enqDialog.componentInstance.inputData.mapped_suppliers=n?.mapped_suppliers||null,e.enqDialog.componentInstance.inputData.suppliersLoading="loaded";let i=!e.organisation.hasOwnProperty("my_supplier_selection")||e.organisation?.my_supplier_selection;if(e.enqDialog.componentInstance.inputData.supplier_selection=i,e.allSupplierToBeAdded&&e.enqDialog.componentInstance.selectAllSupplier({checked:!0}),e.enqDialog.componentInstance.syncSellerSelectionFromSuppliers&&e.enqDialog.componentInstance.syncSellerSelectionFromSuppliers(),e.enqDialog.componentInstance.changeDetector&&e.enqDialog.componentInstance.changeDetector.detectChanges(),!i&&e.isCreateContractsEnquiriesForSuppliers){const s=[];n.suppliers?.map(l=>{l?._id&&s?.push(l?._id)}),e.enqDialog.componentInstance.new_enquiry.supplier_ids=s}}}reset_suppliers(){this.suppliers=[]}delete_popup(e){$("body").addClass("modal-open"),this.showDelete=!0,this.product=e}toggleView(e){this.showDelete=e}cancel(){}delete_product(){this.deleteProduct.emit(this.product)}edit_product(e){this.editProduct.emit(e)}getHscode(e){return e.HSCode&&e.HSCode.length>0&&e.HSCode instanceof Array?e.HSCode.join(","):e.HSCode&&e.HSCode.length>0&&e.HSCode instanceof String?e.HSCode:"--"}getCasNo(e){return e.CAS&&e.CAS.length>0&&e.CAS instanceof Array?e.CAS.join(","):e.CAS&&e.CAS.length>0&&e.CAS instanceof String?e.CAS:"--"}toggleArrow(e,n){this.onchange_save=!1,this.active_index==e?this.active_index=-1:(this.active_index=e,this.product=n,this.product.price||(this.price=new p.tA,this.price.unit=this.product?.measurement_unit||"KG",this.product.price=this.price))}updatePrice(){this.active_index=-1,this.product.measurement_unit=this.product?.measurement_units?.[0]||this.product?.price?.unit,this.save_product(this.product)}save_product(e){this.saveProduct.emit(e),this.product=new p.xs}save_enable(){this.onchange_save=!0}checkInputDisabled(e){if(!this.product?.measurement_units||0===this.product?.measurement_units?.length)return!1;var n;for(let i of this.product?.measurement_units)n=this.validCombinations.find(s=>s?.has(i));return!n?.has(e)}cancelUpdate(){this.product=new p.xs,this.active_index=-1,this.onchange_save=!1}removeMessage(){this.msg=""}afterViewInit(){this.s.mainjs.productProcurementPlanShowMoreToggle()}hasProcurementPlan(e){return!!("BUYING"==this.page&&e.procurement_plan&&e.procurement_plan.length>0)}getProcurementPlan(e){if(e.procurement_plan&&e.procurement_plan.length>0){if(e.procurement_plan[0][this.periods[0]])return e.procurement_plan[0][this.periods[0]];if(e.procurement_plan[0][this.periods[1]])return e.procurement_plan[0][this.periods[1]];if(e.procurement_plan[0][this.periods[2]])return e.procurement_plan[0][this.periods[2]]}return null}getProcurementValues(e,n,i,s){return e+n-i-s}add_to_tally(e){this.tallyDialog=this.dialog.open(P._,{panelClass:["mat-modal"],maxWidth:"500px",data:{ptype:"product",pdata:e,organisation:this.organisation,fields:"Title,Description,Chemarc Type and Remark"}})}currInventory(e,n,i){return Number(e)+Number(n)-Number(i)}viewPriceHistory(e){}select_product(e){if(this.selectedProductTags&&this.selectedProductTags.length>0&&!e?.tags?.filter(i=>this.selectedProductTags.includes(i))?.length)this.showErrorMessage("Selected products must have at least one common tag.");else{if(this.multi){if(this.multiProducts?.find(n=>n?._id===e._id))this.multiProducts=this.multiProducts?.filter(n=>n?._id!==e?._id);else{if(this.multiProducts?.length>=50)return void this.showErrorMessage("Max 50 products allowed for Multi RFQ");this.multiProducts.push(e)}this.setDisableSendMulti.emit(this.multiProducts?.length<2)}if(this.showContract){if(this.multiContractsProducts?.find(n=>n?._id===e._id))this.multiContractsProducts=this.multiContractsProducts?.filter(n=>n?._id!==e?._id);else{if(this.multiContractsProducts?.length>=50)return void this.showErrorMessage("Max 50 products allowed for Contract");this.multiContractsProducts.push(e)}this.setDisableSendContracts.emit(this.multiContractsProducts?.length<1)}this.selectedProductTags=this.multiProducts?.length>0&&this.multiProducts[0]?.tags||[]}}activeCheckbox(e){return this.multi?!!this.multiProducts?.find(n=>n?._id===e):this.showContract?!!this.multiContractsProducts?.find(n=>n?._id===e):null}static#t=this.\u0275fac=function(n){return new(n||o)(t.Y36(q.b),t.Y36(A.X),t.Y36(Z.on),t.Y36(I.D),t.Y36(g.F0),t.Y36(g.gz),t.Y36(u.K0))};static#e=this.\u0275cmp=t.Xpm({type:o,selectors:[["bizhub-dashboardlist"]],inputs:{user:"user",periods:"periods",showContract:"showContract",multiContractsProducts:"multiContractsProducts",multi:"multi",msg:"msg",showMsg:"showMsg",enquiry_msg:"enquiry_msg",material_type:"material_type",page:"page",sourcePage:"sourcePage",basic_type:"basic_type",organisation:"organisation",multiProducts:"multiProducts",selectedProductTags:"selectedProductTags",isPlanner:"isPlanner",isBuyer:"isBuyer",products:"products"},outputs:{saveEnquiry:"saveEnquiry",saveLiquidation:"saveLiquidation",saveContractsEnquiries:"saveContractsEnquiries",saveDirectContract:"saveDirectContract",deleteProduct:"deleteProduct",editProduct:"editProduct",saveProduct:"saveProduct",setDisableSendMulti:"setDisableSendMulti",setDisableSendContracts:"setDisableSendContracts"},features:[t.qOj],decls:19,vars:16,consts:[[4,"ngIf"],[1,"buy-sell-dashboard-card-wrap"],["class","buy-sell-dashboard-card card-product-list",4,"ngFor","ngForOf","ngForTrackBy"],[3,"showPopUp","affirm","reject","info","heading","toggleView","confirm","cancel"],["id","price-history-modal","tabindex","-1","role","dialog",1,"modal","buy-sell-dashboard-auction-modal","buy-sell-dashboard-auction-modal-history",2,"display","none"],[1,"modal-dialog","modal
1-dialog-centered"],[1,"modal-content"],["aria-label","Close","data-dismiss","modal","href","javascript:void(0);",1,"close"],[1,"sprite","close","d-block"],[1,"modal-header"],[1,"modal-title","dark"],[1,"modal-body"],[1,"mat-table-responsive"],["class","table",4,"ngIf","ngIfElse"],["showNoData",""],["role","alert",1,"alert","alert-dismissible"],["type","button","data-dismiss","alert","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"buy-sell-dashboard-card","card-product-list"],[1,"card-info"],[1,"card-img-flex"],[1,"card-cont"],[1,"row-1"],["class","custom-checkbox-col",4,"ngIf"],[1,"card-left"],[1,"card-left-row-1"],["class","card-title",4,"ngIf"],["class","fs-13 text-cool-grey mt-2",4,"ngIf"],["class","card-left-row-2 pb-0",4,"ngIf"],[1,"card-right","center"],["class","action",4,"ngIf"],["class","custom-drop customDrop",4,"ngIf"],["class","update-price",3,"display",4,"ngIf"],["class","card-procurement-plan",4,"ngIf"],[1,"custom-checkbox-col"],["class","custom-control custom-checkbox",3,"active",4,"ngIf"],[1,"custom-control","custom-checkbox"],[1,"custom-control-label",3,"for"],["type","checkbox",1,"custom-control-input",3,"name","id","change"],[1,"card-title"],["href","javascript:void(0);",3,"click"],[1,"card-ribbon","badge","blue-gray"],[1,"fs-13","text-cool-grey","mt-2"],[1,"card-left-row-2","pb-0"],[1,"card-info-inline"],[1,"key"],[1,"value"],[1,"action"],["href","javascript:void(0);","title","","class","btn btn-outline-primary",3,"click",4,"ngIf"],["href","javascript:void(0);","title","","class","btn btn-grey",3,"click",4,"ngIf"],["href","javascript:void(0);","title","",1,"btn","btn-outline-primary",3,"click"],["href","javascript:void(0);","title","",1,"btn","btn-grey",3,"click"],[1,"custom-drop","customDrop"],["aria-hidden","true",1,"la","la-ellipsis-v"],[2,"min-width","165px"],["href","javascript:void(0)",3,"click"],["data-title","Analytics",3,"routerLink","queryParams"],["href","javascript:void(0);","title","",1,"highlight",3,"click"],["href","javascript:void(0);","title","View Price History","data-toggle","modal","data-target","#price-history-modal",3,"click"],[1,"update-price"],[1,"update-price-form"],["fPrice","ngForm"],["appearance","standard",1,"update-price-currency"],[3,"ngModel","name","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["appearance","standard",1,"update-price-field"],["matInput","","type","number","required","",3,"ngModel","name","ngModelChange"],["label","Units",1,"update-price-units",3,"options","ngModel","multiple","name","ngModelChange"],[1,"action-row"],["type","submit",1,"btn","btn-secondary",3,"disabled","click"],["type","submit",1,"btn","btn-outline-secondary",3,"click"],[3,"value"],[1,"card-procurement-plan"],[1,"card-procurement-plan-inner","d-flex"],[1,"left"],[1,"text-uppercase"],[1,"card-info-block","no-width","text-center"],[1,"col-1"],[1,"col-2"],[1,"col-3"],[1,"col-4"],[1,"value","text-red"],[1,"col-5"],[1,"value","text-green"],[1,"right"],[1,"d-block"],["picture","no-pic.png",3,"text"],[1,"table"],[4,"ngFor","ngForOf"],[1,"metro-regular","my-4",2,"font-size","16px"]],template:function(n,i){if(1&n&&(t.YNc(0,B,6,5,"ng-container",0),t.TgZ(1,"div",1),t.YNc(2,mt,18,10,"div",2),t.ALo(3,"searchPipe"),t.qZA(),t.TgZ(4,"common-popup",3),t.NdJ("toggleView",function(l){return i.toggleView(l)})("confirm",function(){return i.delete_product()})("cancel",function(){return i.cancel()}),t.qZA(),t.YNc(5,gt,2,1,"ng-container",0),t.TgZ(6,"div",4)(7,"div",5)(8,"div",6)(9,"a",7),t._UZ(10,"i",8),t.qZA(),t.TgZ(11,"div",9)(12,"h2",10),t._uU(13),t.qZA()(),t.TgZ(14,"div",11)(15,"div",12),t.YNc(16,ft,9,1,"table",13),t.YNc(17,vt,2,0,"ng-template",null,14,t.W1O),t.qZA()()()()()),2&n){const s=t.MAs(18);t.Q6J("ngIf",i.msg&&i.msg.length>0),t.xp6(2),t.Q6J("ngForOf",t.Dn7(3,12,i.products,"Title",i.searchText))("ngForTrackBy",i.trackByFn),t.xp6(2),t.Q6J("showPopUp",i.showDelete)("affirm","Yes, Delete Product")("reject","No, Keep Product")("info","Deleting a product will permanently remove it from your dashboard")("heading","Delete Product"),t.xp6(1),t.Q6J("ngIf",!i.products||i.products.length<1),t.xp6(8),t.hij("",null==i.active_product?null:i.active_product.Title," Price History"),t.xp6(3),t.Q6J("ngIf",(null==i.active_product?null:i.active_product.price_history)&&(null==i.active_product?null:i.active_product.price_history.length)>0)("ngIfElse",s)}},dependencies:[E.C,u.sg,u.O5,c._Y,c.Fj,c.wV,c.JJ,c.JL,c.Q7,c.On,c.F,M.CK,x.v_,x.$V,w.k0,U.x8,g.rH,O.v,S.m,u.JJ,u.uU,N.C],changeDetection:0})}return o}
1)()}}]);

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.