sf-i-reporting 1.0.73 → 1.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/sf-i-reporting.js CHANGED
@@ -41,12 +41,13 @@ let SfIReporting = class SfIReporting extends LitElement {
41
41
  this.apiIdUploader = "";
42
42
  this.projectid = "";
43
43
  this.projectname = "";
44
- this.configjson = "[]";
44
+ // configjson: string = "[]";
45
45
  // configjson: string = "[{\"type\":\"sf-i-form\",\"size\":\"large\",\"label\":\"Tags\",\"hint\":\"Tags applied to notice\",\"id\":\"tags\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/tagging\",\"searchstring\":\"Tag\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["updatetype","project","tagtype","shortid"]\",\"maxselect\":\"100\",\"mandatory\":\"\"}]";
46
46
  // configjson: string = "[{\"type\":\"textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Prepared by\",\"hint\":\"Mention the names of people who participated in preparing this document\",\"id\":\"preparedby\",\"value\":\"prepared by test\",\"collapse\":\"true\"},{\"type\":\"textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Approved by\",\"hint\":\"Mention the names of people who participated in reviewing this document\",\"id\":\"approvedby\",\"value\":\"test approved by\",\"collapse\":\"true\"},{\"type\":\"textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Purpose\",\"hint\":\"This is a checklist for reporting the statutory internal audit results of the infection control program\",\"id\":\"purpose\",\"value\":\"test purpose\",\"collapse\":\"true\"},{\"type\":\"section\",\"name\":\"Compliance with Biomedical Waste Management Rules, 2016\",\"size\":\"\",\"label\":\"\",\"hint\":\"\",\"id\":\"section-0\",\"value\":\"\",\"collapse\":\"false\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Is the hospital registered with the State Pollution Control Board (SPCB) for biomedical waste management?\",\"hint\":\"\",\"id\":\"bmwspcb\",\"value\":[\"No\",\"\"],\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are biomedical waste segregation protocols (color-coded bins) in place and followed as per rules?\",\"hint\":\"\",\"id\":\"bmwcolorcoding\",\"value\":[\"Yes\",\"\"],\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are disposal records for biomedical waste maintained as required by law?\",\"hint\":\"\",\"id\":\"bmwdisposal\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Is there a valid agreement with an authorized biomedical waste disposal vendor?\",\"hint\":\"\",\"id\":\"bmwvendoragreement\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are healthcare staff trained in biomedical waste segregation and disposal protocols?\",\"hint\":\"\",\"id\":\"bmwtraining\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"section\",\"name\":\"Compliance with The Drugs and Cosmetics Act, 1940 (Infection Control Equipment and Materials)\",\"size\":\"\",\"label\":\"\",\"hint\":\"\",\"id\":\"section-1\",\"value\":\"\",\"collapse\":\"false\"},{\"type\":\"yesno+textarea\",\"options\":[\"option1\",\"option2\",\"option3\"],\"name\":\"\",\"size\":\"large\",\"label\":\"Are hand hygiene products (e.g., alcohol-based hand rubs) procured from licensed vendors as per statutory regulations?\",\"hint\":\"\",\"id\":\"hhvendors\",\"value\":[\"option2\",\"\"],\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are disinfectants, sterilants, and antiseptics used in the hospital in compliance with the Drugs and Cosmetics Act?\",\"hint\":\"\",\"id\":\"disinfectantsdca\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Is there a regular check on the expiration dates and quality standards of infection control materials?\",\"hint\":\"\",\"id\":\"expirycheck\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"section\",\"name\":\"Compliance with The Indian Epidemic Diseases Act, 1897 (Outbreak Management)\",\"size\":\"\",\"label\":\"\",\"hint\":\"\",\"id\":\"section-2\",\"value\":\"\",\"collapse\":\"false\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Is there a policy in place for managing infectious disease outbreaks in compliance with the Indian Epidemic Diseases Act?\",\"hint\":\"\",\"id\":\"outbreakpolicy\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are protocols in place for isolation, patient segregation, and reporting of notifiable diseases as per government directives?\",\"hint\":\"\",\"id\":\"diseasereporting\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are outbreak reports documented and communicated to relevant authorities (local health departments, as per law)?\",\"hint\":\"\",\"id\":\"outbreakreporting\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"section\",\"name\":\"Compliance with The Water (Prevention and Control of Pollution) Act, 1974 (Water Quality Monitoring)\",\"size\":\"\",\"label\":\"\",\"hint\":\"\",\"id\":\"section-3\",\"value\":\"\",\"collapse\":\"false\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Is the hospital water supply tested regularly for microbiological contaminants?\",\"hint\":\"\",\"id\":\"watertesting\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are there documented records of water quality reports, and are they in compliance with prescribed standards?\",\"hint\":\"\",\"id\":\"waterqualityreporting\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Is there an arrangement for safe water storage and waste-water disposal in line with statutory requirements?\",\"hint\":\"\",\"id\":\"waterstorage\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"section\",\"name\":\"Compliance with The Air (Prevention and Control of Pollution) Act, 1981 (Air Quality Management)\",\"size\":\"\",\"label\":\"\",\"hint\":\"\",\"id\":\"section-4\",\"value\":\"\",\"collapse\":\"false\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are air conditioning and ventilation systems in place that comply with regulatory standards, especially in critical areas like OTs and ICUs?\",\"hint\":\"\",\"id\":\"acinplace\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are air filters in the hospital HVAC systems cleaned or replaced as per environmental laws and infection control guidelines?\",\"hint\":\"\",\"id\":\"airfilters\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are regular air quality audits conducted, and are reports maintained?\",\"hint\":\"\",\"id\":\"airqualityaudits\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"section\",\"name\":\"Compliance with The Public Health Act (Surveillance and Reporting)\",\"size\":\"\",\"label\":\"\",\"hint\":\"\",\"id\":\"section-5\",\"value\":\"\",\"collapse\":\"false\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Is there a surveillance system for monitoring hospital-acquired infections (HAIs)?\",\"hint\":\"\",\"id\":\"haisurveillance\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are notifiable infections reported to local health authorities as per the law?\",\"hint\":\"\",\"id\":\"infectionreporting\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are infection surveillance records maintained, and are they in compliance with public health laws?\",\"hint\":\"\",\"id\":\"infectionsurveillance\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"section\",\"name\":\"Compliance with The Occupational Safety and Health Act (Workplace Safety)\",\"size\":\"\",\"label\":\"\",\"hint\":\"\",\"id\":\"section-6\",\"value\":\"\",\"collapse\":\"false\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are healthcare workers provided with adequate personal protective equipment (PPE) in line with statutory safety regulations?\",\"hint\":\"\",\"id\":\"ppeallocation\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Is there a needle stick and sharps injury prevention policy in place, and is it compliant with the OSHA guidelines?\",\"hint\":\"\",\"id\":\"safeipolicy\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are protocols for staff vaccination (e.g., Hepatitis B, Influenza) and post-exposure prophylaxis (PEP) established?\",\"hint\":\"\",\"id\":\"prophylaxis\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"section\",\"name\":\"Compliance with The Clinical Establishments (Registration and Regulation) Act, 2010 (General Infection Control Requirements)\",\"size\":\"\",\"label\":\"\",\"hint\":\"\",\"id\":\"section-7\",\"value\":\"\",\"collapse\":\"false\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Is the hospital registered under the Clinical Establishments Act, and does it meet the infection control standards prescribed?\",\"hint\":\"\",\"id\":\"registration\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are infection control protocols updated and audited regularly, as required by the Act?\",\"hint\":\"\",\"id\":\"hicprotocolsupdated\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are records of infection control compliance maintained and available for inspection by regulatory authorities?\",\"hint\":\"\",\"id\":\"compliancerecords\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"section\",\"name\":\"Compliance with Fire Safety Regulations (Infection Control During Emergency Evacuations)\",\"size\":\"\",\"label\":\"\",\"hint\":\"\",\"id\":\"section-8\",\"value\":\"\",\"collapse\":\"false\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are fire safety protocols in place that ensure infection control measures (e.g., patient isolation) during evacuations?\",\"hint\":\"\",\"id\":\"firesafetyprotocols\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are infection control materials (e.g., masks, gloves) readily available for use during fire drills or actual emergencies?\",\"hint\":\"\",\"id\":\"hicmaterials\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"section\",\"name\":\"Compliance with The National Health Mission Guidelines (Sanitation and Hygiene)\",\"size\":\"\",\"label\":\"\",\"hint\":\"\",\"id\":\"section-9\",\"value\":\"\",\"collapse\":\"false\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are the hospital’s sanitation practices in compliance with National Health Mission standards for hospital cleanliness and hygiene?\",\"hint\":\"\",\"id\":\"sanitizationpractices\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are there dedicated housekeeping protocols for the cleaning and disinfection of patient care areas as per government guidelines?\",\"hint\":\"\",\"id\":\"housekeepingprotocols\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are sanitation records maintained, and are they available for regulatory review?\",\"hint\":\"\",\"id\":\"sanitiziationrecords\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"section\",\"name\":\"Compliance with The Indian Council of Medical Research (ICMR) Guidelines (Antibiotic Stewardship)\",\"size\":\"\",\"label\":\"\",\"hint\":\"\",\"id\":\"section-10\",\"value\":\"\",\"collapse\":\"false\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Is the hospital following ICMR guidelines for antibiotic stewardship to prevent the development of antimicrobial resistance (AMR)?\",\"hint\":\"\",\"id\":\"icmramsguidelines\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are antibiotic use patterns monitored, and are they compliant with ICMR’s antimicrobial stewardship guidelines?\",\"hint\":\"\",\"id\":\"patternsmonitoring\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are periodic audits conducted to assess adherence to guidelines, and are the audit reports documented?\",\"hint\":\"\",\"id\":\"amsaudits\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"section\",\"name\":\"Compliance with The Indian Medical Council (Professional Conduct, Etiquette, and Ethics) Regulations, 2002\",\"size\":\"\",\"label\":\"\",\"hint\":\"\",\"id\":\"section-11\",\"value\":\"\",\"collapse\":\"false\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are healthcare workers adhering to professional conduct and ethical guidelines for infection prevention as prescribed by the Medical Council of India?\",\"hint\":\"\",\"id\":\"professionalconduct\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are there protocols in place to report unethical or unsafe infection control practices?\",\"hint\":\"\",\"id\":\"unethicalreporting\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"section\",\"name\":\"Compliance with Employee State Insurance (ESI) Act, 1948 (Healthcare Worker Safety)\",\"size\":\"\",\"label\":\"\",\"hint\":\"\",\"id\":\"section-12\",\"value\":\"\",\"collapse\":\"false\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are healthcare workers insured under the ESI scheme, particularly those involved in high-risk infection control activities?\",\"hint\":\"\",\"id\":\"esiinsured\",\"value\":\"\",\"collapse\":\"true\"},{\"type\":\"yesno+textarea\",\"name\":\"\",\"size\":\"large\",\"label\":\"Are there protocols for compensation in case of occupational hazards (e.g., infections contracted at work)?\",\"hint\":\"\",\"id\":\"compensationprotocols\",\"value\":\"\",\"collapse\":\"true\"}]";
47
47
  // configjson: string = "[{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Prepared by\",\"hint\":\"Mention the names of people who participated in preparing this document\",\"id\":\"preparedby\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Approved by\",\"hint\":\"Mention the names of people who participated in reviewing this document\",\"id\":\"approvedby\"},[{\"type\":\"itemname\",\"name\":\"External Reporting Agency\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Name\",\"hint\":\"State the name of the agency\",\"id\":\"name{iter}\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Type\",\"hint\":\"State the type of the agency such as government (local, state, nationa), private, educational institute, etc.\",\"id\":\"type{iter}\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Contact Person\",\"hint\":\"Name of the contact person\",\"id\":\"contact-person{iter}\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Phone Number\",\"hint\":\"Phone number of the contact person\",\"id\":\"contact-phone{iter}\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Email\",\"hint\":\"Email address of the contact person\",\"id\":\"contact-email{iter}\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Reporting Method\",\"hint\":\"Method of reporting such as online/email/phone/fax, etc.\",\"id\":\"reporting-method{iter}\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Role\",\"hint\":\"When to report for e.g. report local outbreak and infection trends, national reporting of infection control and outbreaks, global disease surveillance, response coordination, state-level outbreak and epidemic reporting\",\"id\":\"role{iter}\"}]]";
48
48
  // configjson: string = "[{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Prepared by\",\"hint\":\"Mention the names of people who participated in preparing this document\",\"id\":\"preparedby\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Approved by\",\"hint\":\"Mention the names of people who participated in reviewing this document\",\"id\":\"approvedby\"},{\"type\":\"section\",\"name\":\"Program Structure\"},{\"type\":\"subsection\",\"name\":\"Infection Control Committee\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Responsibilities\",\"hint\":\"Briefly outline the responsibilities of the infection control committee\",\"id\":\"iccresponsibilities\"},[{\"type\":\"committeemember\",\"name\":\"Committee Member\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Role\",\"hint\":\"Infection Control Officer (ICO), Infection Control Nurses (ICN), Microbiologist, Nursing heads, Representatives from key departments (Surgery, Medicine, Housekeeping, CSSD, etc.)\",\"id\":\"iccstructurerole{iter}\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Responsibilities\",\"hint\":\"Oversee all infection control activities, review infection surveillance data and action plans, ensure compliance, etc.\",\"id\":\"iccstructureresponsibilities{iter}\"}],{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Meetings\",\"hint\":\"Meeting frequency, minimum quorum requirements, agenda\",\"id\":\"iccmeetings\"},{\"type\":\"subsection\",\"name\":\"Infection Control Team\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Responsibilities\",\"hint\":\"Briefly outline the responsibilities of the infection control team\",\"id\":\"ictresponsibilities\"},[{\"type\":\"teammember\",\"name\":\"Team Member\",\"direction\":\"row\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Role\",\"hint\":\"Infection Control Officer (ICO), Infection Control Nurses (ICN), Microbiologist, Admin Rep., Housekeeping Rep., CSSD Rep., Pharmacist, Engineering Rep., IT Rep.\",\"id\":\"ictstructurerole{iter}\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Responsibilities\",\"hint\":\"Day-to-day monitoring of infection control practices, ensure compliance with guidelines for high-risk areas (e.g., ICUs, OTs), coordinate with the ICC for feedback and updates, etc.\",\"id\":\"ictstructureresponsibilities{iter}\"}],{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Meetings\",\"hint\":\"Meeting frequency, minimum quorum requirements, agenda\",\"id\":\"ictmeetings\"},{\"type\":\"section\",\"name\":\"Aims & Objectives\"},{\"type\":\"subsection\",\"name\":\"Aims\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Aims\",\"hint\":\"Briefly outline the aims of the infection control programme\",\"id\":\"aims\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Objectives\",\"hint\":\"Precisely define the objectives including quantified targets wherever possible. For e.g. target to reduce HAIs by 20% annually, achieve 95% compliance with hand hygiene protocols across all departments.\",\"id\":\"aims\"},{\"type\":\"section\",\"name\":\"Infection Control Processes\"},{\"type\":\"subsection\",\"name\":\"Hand Hygiene\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Hand Hygiene Policies\",\"hint\":\"Summarize and reference the policies that are defined for hand hygiene\",\"id\":\"hhpolicies\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Hand Hygiene SOPs\",\"hint\":\"Summarize and reference the SOPs that are developed, maintained and released for hand hygiene\",\"id\":\"hhsops\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Hand Hygiene Monitoring\",\"hint\":\"Outline data parameters, methods and quality indicators for monitoring hand hygiene\",\"id\":\"hhmonitoring\"},{\"type\":\"subsection\",\"name\":\"Personal Protective Equipment (PPE)\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"PPE Usage Policies\",\"hint\":\"Summarize and reference the policies that are defined for the indications and usage of PPE for transmission-based precautions\",\"id\":\"ppepolicies\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"PPE Usage SOPs\",\"hint\":\"Summarize and reference the SOPs that are developed, maintained and released for the appropriate usage of PPE in various situations\",\"id\":\"ppesops\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"PPE Usage Monitoring\",\"hint\":\"Outline data parameters, methods and quality indicators for monitoring the usage of PPE\",\"id\":\"ppemonitoring\"},{\"type\":\"subsection\",\"name\":\"Housekeeping\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Cleaning Protocols\",\"hint\":\"Summarize the cleaning protocols for various areas such as OTs, wards, public areas including toilets, corridors including environment, fixtures, fomites, furniture, furnishings, equipments, etc. Protocols should be appropriately designed for high-touch and low-touch areas.\",\"id\":\"hkcleaning\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Dilution Protocols\",\"hint\":\"Summarize the cleaning protocols for approved disinfectants for cleaning in various areas such as OTs, wards, public areas including toilets, corridors including environment, fixtures, fomites, furniture, furnishings, equipments, etc. Protocols should be appropriately designed for high-touch and low-touch areas.\",\"id\":\"hkdilution\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Housekeeping Monitoring\",\"hint\":\"Outline data parameters, methods and quality indicators for monitoring the housekeeping activities in various areas such as OTs, wards, public areas including toilets, corridors including environment, fixtures, fomites, furniture, furnishings, equipments, etc. Include regular checks for surface cleanliness, air quality, water quality, etc.\",\"id\":\"hkmonitoring\"},{\"type\":\"subsection\",\"name\":\"CSSD\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"CSSD Design\",\"hint\":\"Summarise the CSSD design requirements including space requirements, location requirements, layouting and unidirectional flow zoning requirements, separate areas for receiving, washing, cleaning, packing, sterilization, sterile storage & issue and the separation of clean and dirty areas\",\"id\":\"cssddesign\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"CSSD Procedures\",\"hint\":\"Summarise and reference the procedures for cleaning, packing, disinfection and sterilization. Also include the use of flash sterilization and the usage of Spaulding's classification\",\"id\":\"cssdprocedures\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"CSSD Validation Tests\",\"hint\":\"Summarise and reference the usage, frequency and methodologies of validation tests including physical, chemical, biological and engineering tests for sterilization effectiveness\",\"id\":\"cssdvalidation\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Reuse and recall\",\"hint\":\"Summarise the indications, guidelines and procedures for instrument reuse including the policy of patient intimation. Also include the summary of recall procedures post breakdown for non-functional equipments/devices.\",\"id\":\"cssdreuserecall\"},{\"type\":\"subsection\",\"name\":\"Biomedical Waste Management\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Segregation & Transfer Procedures\",\"hint\":\"Summarise and reference the procedures for segregation, collection, storage, handling and the use of color codings. Also include the procedure for handover and transfer of biomedical waste to the approved vendor for disposal.\",\"id\":\"bmwsegregation\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Statutory Provisions\",\"hint\":\"Summarize the statutory provisions of biomedical waste management that are applicable to your hospital\",\"id\":\"bmwstatutory\"},{\"type\":\"subsection\",\"name\":\"Staff Infections Prevention\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Statutory Requirements\",\"hint\":\"Summarize the statutory requirements for staff immunization including the hospital policies.\",\"id\":\"staffstatutory\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Staff Infections Reporting\",\"hint\":\"Identify transmissible infections important for staff to report (such as acute conjunctivitis, chickenpox, acute respiratory infections, smear-positive tuberculosis, etc.) and summarize the reporting procedure.\",\"id\":\"staffinfectionreporting\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Work Restrictions\",\"hint\":\"Summarize the guidelines for work restrictions (limiting roles & responsibilities) for infected staff\",\"id\":\"staffworkrestrictions\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Prophylaxis\",\"hint\":\"Summarize the indications and procedures for giving pre and post exposure prophylaxis to staff\",\"id\":\"staffprophylaxis\"},{\"type\":\"subsection\",\"name\":\"Safe Injection & Infusion Practices\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Medication Practices\",\"hint\":\"Summarize the policies and procedures for safe medication practices including single-dose vials, multi-dose vials\",\"id\":\"safeimedication\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Injection Practices\",\"hint\":\"Summarize the policies and procedures for safe injection practices including preparation, labeling and administration practices\",\"id\":\"safeiinjection\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Sharps Injury Prevention\",\"hint\":\"Summarize the policies and procedures for sharps injury prevention\",\"id\":\"safeiinjuryprevention\"},{\"type\":\"subsection\",\"name\":\"Antimicrobial Stewardship\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Clinical Conditions Identification\",\"hint\":\"Summarize the identified clinical conditions for using antimicrobials including antifungals, antibiotics, antivirals and antiparasites from the pov of antimicrobial agent, monotherapy vs combination therapy, escalaction & de-escalation of therapy and dose & duration of therapy\",\"id\":\"amsclinicalconditions\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Susceptibility Monitoring\",\"hint\":\"Summarize the identified system of monitoring antimicrobial susceptibility\",\"id\":\"amssusceptibility\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Antimicrobial Usage Policy\",\"hint\":\"Summarize the animicrobial usage policy including the frequency of reviewing this policy\",\"id\":\"amsusagepolicy\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Antimicrobial Stewardship Committee\",\"hint\":\"Outline the structure, roles and responsibilities of the antimicrobial stewardship committee structure\",\"id\":\"amsstewardshipcommittee\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Antimicrobial Workflows\",\"hint\":\"Summarize the procedures for antimicrobial workflows such ordering, prescriptions and usages\",\"id\":\"amsworkflows\"},{\"type\":\"subsection\",\"name\":\"Renovation & New Construction\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Risk Assessment\",\"hint\":\"Summarize the risk assessment methodology and the tool for conducting risk assessment of infection control during renovation & new construction\",\"id\":\"rncriskassessment\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Inclusion From Design\",\"hint\":\"Summarize the policy of including infection control and the involvement of infection control team since the design stages of any renovation & new construction project\",\"id\":\"rncriskassessment\"},{\"type\":\"subsection\",\"name\":\"Healthcare Associated Infections\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Care Bundles\",\"hint\":\"Summarize the care bundles developed for prevent CAUTIs, VAPs, SSI, CLABSIs\",\"id\":\"haicarebundles\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Monitoring\",\"hint\":\"Summarize the monitoring frequencies and methdologies for HAIs\",\"id\":\"haimonitoring\"},{\"type\":\"subsection\",\"name\":\"Dietary Services & Kitchen\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Statutory Requirements\",\"hint\":\"Summarize the statutory requirements for kitchen & dietary services\",\"id\":\"dskstatutory\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Design Requirements\",\"hint\":\"Summarize the design requirements of kitchen & dietary services including layout, traffic-flow, prevention of criss-cross traffic, sequence of activities. Also include separate dedicated food preparation areas\",\"id\":\"dskriskassessment\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Workers Screening\",\"hint\":\"Summarize the policies & procedures for screening kitchen workers and food handlers\",\"id\":\"dskscreening\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Hygienic Preparation, Storage & Distribution of Food\",\"hint\":\"Summarize the policies & procedures for hygiene measures such as storage of food off the floor, separation in storage of cleaning supplies and food, separate dedicated food preparation areas, identification of measures to prevent flies & insects to come in contact with prepared/stored food. Also include safe preparation, handling, storage & distribution procedures encompassing the temperatures for food distribution as well\",\"id\":\"dskhygiene\"},{\"type\":\"subsection\",\"name\":\"Laundry & Linen Management\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Procedures\",\"hint\":\"Summarize the policies & procedures for linen change, handling (patient-care, transport to laundry, inside laundry), storage of clean linen, separation of clean & dirty linen, distribution of clean linen. Also include controls to ensure infection prevention & control when laundry management is outsourced\",\"id\":\"llmprocedures\"},{\"type\":\"section\",\"name\":\"Surveillance\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Infection Surveillance\",\"hint\":\"Include surveillance of hospital-acquired infections (VAP, CLABSI, CAUTI, SSIs), define frequency and methodology for collecting infection data from different units (ICU, OT, general wards), surveillance tools and weekly and monthly review of infection trends and risk factors.\",\"id\":\"surveillanceinfections\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Antimicrobial Surveillance\",\"hint\":\"Include regular audits of antimicrobial prescriptions and usage, surveillance of resistance patterns in the hospital, frequency of reports to the Antimicrobial Stewardship Committee.\",\"id\":\"surveillanceantimicrobial\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Environmental Surveillance\",\"hint\":\"Include surface sampling such as regular swabs and testing of high-touch surfaces (ICUs, OT, isolation rooms), air quality monitoring of air handling units and conducting air sampling in critical care areas, water quality testing of RO water in dialysis units for endotoxin levels.\",\"id\":\"surveillanceenvironment\"},{\"type\":\"section\",\"name\":\"Inventory Management\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Inventory Policies\",\"hint\":\"Summarize and reference the policies that define the expected stock levels of various equipments, devices & materials used in the infection control program for hand hygiene, PPE, biomedical waste management, CSSD, pre & post exposure prophylaxis, safe injection & infusions, isolation & barrier nursing, housekeeping, etc.\",\"id\":\"inventorypolicy\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Availability Policies\",\"hint\":\"Summarize and reference the policies that define the distribution and expected availability levels across different hospital zones for various equipments, devices & materials used in the infection control program for hand hygiene, PPE, biomedical waste management, CSSD, pre & post exposure prophylaxis, safe injection & infusions, isolation & barrier nursing, housekeeping, etc.\",\"id\":\"availabilitypolicy\"},{\"type\":\"section\",\"name\":\"Trainings\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Training Policies\",\"hint\":\"Summarize and reference the staff training policies for standard precautions, hand hygiene, PPE usage, antimicrobial stewardship, safe injection & infusion practices, housekeeping, laundry & linen management, biomedical waste management, care bundles for HAI preventions, CSSD operations, reuse and recalls, etc.\",\"id\":\"trainingpolicy\"},{\"type\":\"section\",\"name\":\"Audits\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Audit Policies\",\"hint\":\"Summarize and reference the audit policies for standard precautions, hand hygiene, PPE usage, antimicrobial stewardship, safe injection & infusion practices, housekeeping, laundry & linen management, biomedical waste management, care bundles for HAI preventions, CSSD operations, reuse and recalls, etc. Include the methodology, frequency, etc.\",\"id\":\"auditpolicy\"},{\"type\":\"section\",\"name\":\"Quality\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Quality Policies\",\"hint\":\"Summarize and reference the quality policies for material, equipments and devices used in the infection control program, including the expected standards and benchmarks. For PPE, hand hygiene, isolation & barrier nursing, safe injection & infusion, air-conditioning, water supply, housekeeping, biomedical waste, linen management, kitchen & dietary services, CSSD, etc.\",\"id\":\"qualitypolicy\"},{\"type\":\"section\",\"name\":\"Vendor Selection\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Vendor Selection Policies\",\"hint\":\"Summarize and reference the vendor selection policies for material, equipments and devices used in the infection control program, including the qualification criteria, delivery schedules and agreement clauses. For PPE, hand hygiene, isolation & barrier nursing, safe injection & infusion, air-conditioning, water supply, housekeeping, biomedical waste management, linen management, kitchen & dietary services, CSSD, etc.\",\"id\":\"vendorselectionpolicy\"},{\"type\":\"section\",\"name\":\"Maintenance\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Maintenance Policies\",\"hint\":\"Summarize and reference the maintenance policies for equipments and facilities used in the infection control program, including the routine, contractual and breakdown maintenance activities. For PPE, hand hygiene, isolation & barrier nursing, safe injection & infusion, air-conditioning, water supply, housekeeping, biomedical waste, linen management, kitchen & dietary services, CSSD, etc.\",\"id\":\"maintenancepolicy\"}]";
49
49
  // configjson: string = "[{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Prepared by\",\"hint\":\"Mention the names of people who participated in preparing this document\",\"id\":\"preparedby\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Approved by\",\"hint\":\"Mention the names of people who participated in reviewing this document\",\"id\":\"approvedby\"},{\"type\":\"textarea\",\"size\":\"large\",\"label\":\"Purpose\",\"hint\":\"This is a checklist for reporting the statutory internal audit results of the infection control program\",\"id\":\"purpose\"},{\"type\":\"section\",\"name\":\"Compliance with Biomedical Waste Management Rules, 2016\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Is the hospital registered with the State Pollution Control Board (SPCB) for biomedical waste management?\",\"hint\":\"\",\"id\":\"bmwspcb\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are biomedical waste segregation protocols (color-coded bins) in place and followed as per rules?\",\"hint\":\"\",\"id\":\"bmwcolorcoding\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are disposal records for biomedical waste maintained as required by law?\",\"hint\":\"\",\"id\":\"bmwdisposal\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Is there a valid agreement with an authorized biomedical waste disposal vendor?\",\"hint\":\"\",\"id\":\"bmwvendoragreement\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are healthcare staff trained in biomedical waste segregation and disposal protocols?\",\"hint\":\"\",\"id\":\"bmwtraining\"},{\"type\":\"section\",\"name\":\"Compliance with The Drugs and Cosmetics Act, 1940 (Infection Control Equipment and Materials)\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are hand hygiene products (e.g., alcohol-based hand rubs) procured from licensed vendors as per statutory regulations?\",\"hint\":\"\",\"id\":\"hhvendors\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are disinfectants, sterilants, and antiseptics used in the hospital in compliance with the Drugs and Cosmetics Act?\",\"hint\":\"\",\"id\":\"disinfectantsdca\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Is there a regular check on the expiration dates and quality standards of infection control materials?\",\"hint\":\"\",\"id\":\"expirycheck\"},{\"type\":\"section\",\"name\":\"Compliance with The Indian Epidemic Diseases Act, 1897 (Outbreak Management)\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Is there a policy in place for managing infectious disease outbreaks in compliance with the Indian Epidemic Diseases Act?\",\"hint\":\"\",\"id\":\"outbreakpolicy\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are protocols in place for isolation, patient segregation, and reporting of notifiable diseases as per government directives?\",\"hint\":\"\",\"id\":\"diseasereporting\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are outbreak reports documented and communicated to relevant authorities (local health departments, as per law)?\",\"hint\":\"\",\"id\":\"outbreakreporting\"},{\"type\":\"section\",\"name\":\"Compliance with The Water (Prevention and Control of Pollution) Act, 1974 (Water Quality Monitoring)\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Is the hospital water supply tested regularly for microbiological contaminants?\",\"hint\":\"\",\"id\":\"watertesting\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are there documented records of water quality reports, and are they in compliance with prescribed standards?\",\"hint\":\"\",\"id\":\"waterqualityreporting\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Is there an arrangement for safe water storage and waste-water disposal in line with statutory requirements?\",\"hint\":\"\",\"id\":\"waterstorage\"},{\"type\":\"section\",\"name\":\"Compliance with The Air (Prevention and Control of Pollution) Act, 1981 (Air Quality Management)\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are air conditioning and ventilation systems in place that comply with regulatory standards, especially in critical areas like OTs and ICUs?\",\"hint\":\"\",\"id\":\"acinplace\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are air filters in the hospital HVAC systems cleaned or replaced as per environmental laws and infection control guidelines?\",\"hint\":\"\",\"id\":\"airfilters\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are regular air quality audits conducted, and are reports maintained?\",\"hint\":\"\",\"id\":\"airqualityaudits\"},{\"type\":\"section\",\"name\":\"Compliance with The Public Health Act (Surveillance and Reporting)\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Is there a surveillance system for monitoring hospital-acquired infections (HAIs)?\",\"hint\":\"\",\"id\":\"haisurveillance\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are notifiable infections reported to local health authorities as per the law?\",\"hint\":\"\",\"id\":\"infectionreporting\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are infection surveillance records maintained, and are they in compliance with public health laws?\",\"hint\":\"\",\"id\":\"infectionsurveillance\"},{\"type\":\"section\",\"name\":\"Compliance with The Occupational Safety and Health Act (Workplace Safety)\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are healthcare workers provided with adequate personal protective equipment (PPE) in line with statutory safety regulations?\",\"hint\":\"\",\"id\":\"ppeallocation\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Is there a needle stick and sharps injury prevention policy in place, and is it compliant with the OSHA guidelines?\",\"hint\":\"\",\"id\":\"safeipolicy\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are protocols for staff vaccination (e.g., Hepatitis B, Influenza) and post-exposure prophylaxis (PEP) established?\",\"hint\":\"\",\"id\":\"prophylaxis\"},{\"type\":\"section\",\"name\":\"Compliance with The Clinical Establishments (Registration and Regulation) Act, 2010 (General Infection Control Requirements)\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Is the hospital registered under the Clinical Establishments Act, and does it meet the infection control standards prescribed?\",\"hint\":\"\",\"id\":\"registration\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are infection control protocols updated and audited regularly, as required by the Act?\",\"hint\":\"\",\"id\":\"hicprotocolsupdated\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are records of infection control compliance maintained and available for inspection by regulatory authorities?\",\"hint\":\"\",\"id\":\"compliancerecords\"},{\"type\":\"section\",\"name\":\"Compliance with Fire Safety Regulations (Infection Control During Emergency Evacuations)\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are fire safety protocols in place that ensure infection control measures (e.g., patient isolation) during evacuations?\",\"hint\":\"\",\"id\":\"firesafetyprotocols\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are infection control materials (e.g., masks, gloves) readily available for use during fire drills or actual emergencies?\",\"hint\":\"\",\"id\":\"hicmaterials\"},{\"type\":\"section\",\"name\":\"Compliance with The National Health Mission Guidelines (Sanitation and Hygiene)\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are the hospital’s sanitation practices in compliance with National Health Mission standards for hospital cleanliness and hygiene?\",\"hint\":\"\",\"id\":\"sanitizationpractices\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are there dedicated housekeeping protocols for the cleaning and disinfection of patient care areas as per government guidelines?\",\"hint\":\"\",\"id\":\"housekeepingprotocols\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are sanitation records maintained, and are they available for regulatory review?\",\"hint\":\"\",\"id\":\"sanitiziationrecords\"},{\"type\":\"section\",\"name\":\"Compliance with The Indian Council of Medical Research (ICMR) Guidelines (Antibiotic Stewardship)\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Is the hospital following ICMR guidelines for antibiotic stewardship to prevent the development of antimicrobial resistance (AMR)?\",\"hint\":\"\",\"id\":\"icmramsguidelines\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are antibiotic use patterns monitored, and are they compliant with ICMR’s antimicrobial stewardship guidelines?\",\"hint\":\"\",\"id\":\"patternsmonitoring\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are periodic audits conducted to assess adherence to guidelines, and are the audit reports documented?\",\"hint\":\"\",\"id\":\"amsaudits\"},{\"type\":\"section\",\"name\":\"Compliance with The Indian Medical Council (Professional Conduct, Etiquette, and Ethics) Regulations, 2002\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are healthcare workers adhering to professional conduct and ethical guidelines for infection prevention as prescribed by the Medical Council of India?\",\"hint\":\"\",\"id\":\"professionalconduct\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are there protocols in place to report unethical or unsafe infection control practices?\",\"hint\":\"\",\"id\":\"unethicalreporting\"},{\"type\":\"section\",\"name\":\"Compliance with Employee State Insurance (ESI) Act, 1948 (Healthcare Worker Safety)\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are healthcare workers insured under the ESI scheme, particularly those involved in high-risk infection control activities?\",\"hint\":\"\",\"id\":\"esiinsured\"},{\"type\":\"yesno+textarea\",\"size\":\"small\",\"label\":\"Are there protocols for compensation in case of occupational hazards (e.g., infections contracted at work)?\",\"hint\":\"\",\"id\":\"compensationprotocols\"}]";
50
+ this.configjson = "[{\"type\":\"sf-i-uploader\",\"size\":\"large\",\"label\":\"Contract Document *\",\"hint\":\"Document of the contract\",\"id\":\"contractdocuments\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"1peg5170d3\",\"allowedextensions\":\"["jpg","png","pdf","xls","xlsx","doc","docx"]\",\"extract\":\"yes\",\"maxselect\":\"1\",\"maxsize\":\"5242880\",\"allowdownload\":\"yes\",\"mandatory\":\"\",\"displayinhistory\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Contract Reference No. *\",\"hint\":\"Contract reference number\",\"id\":\"refno\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"date\",\"size\":\"large\",\"label\":\"Date of Execution *\",\"hint\":\"The date of execution of the contract\",\"id\":\"dateofexecution\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"date\",\"size\":\"large\",\"label\":\"Date of Expiry *\",\"hint\":\"The date on which the contract expires.\",\"id\":\"dateofexpiry\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"date\",\"size\":\"large\",\"label\":\"Date of Renewal *\",\"hint\":\"The date on which the contract renews.\",\"id\":\"dateofrenewal\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"date\",\"size\":\"large\",\"label\":\"Due Date *\",\"hint\":\"The due date for the contract.\",\"id\":\"duedate\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Contract Term *\",\"hint\":\"Term / Tenure of the contract\",\"id\":\"tenure\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Party - 1 *\",\"hint\":\"Name of the Party - 1\",\"id\":\"party1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Party - 2 *\",\"hint\":\"Name of the Party - 2\",\"id\":\"party2\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Party - 3\",\"hint\":\"Name of the Party - 3\",\"id\":\"party3\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-bricks\",\"size\":\"large\",\"label\":\"Country *\",\"hint\":\"Country for contract\",\"id\":\"country\",\"mode\":\"select\",\"savenameseparate\":\"yes\",\"maxselect\":\"1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-bricks\",\"size\":\"large\",\"label\":\"Entity *\",\"hint\":\"Entity for contract\",\"id\":\"entity\",\"dependencies\":[\"country\"],\"mode\":\"select\",\"savenameseparate\":\"yes\",\"maxselect\":\"1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\"},{\"type\":\"sf-i-bricks\",\"size\":\"large\",\"label\":\"Locations *\",\"hint\":\"Locations for contract\",\"id\":\"locations\",\"dependencies\":[\"country\",\"entity\"],\"mode\":\"multiselect\",\"mandatory\":\"\",\"copytoreopen\":\"yes\"},{\"type\":\"sf-i-bricks\",\"size\":\"large\",\"label\":\"Tags *\",\"hint\":\"Tags applied to contract\",\"id\":\"tags\",\"mode\":\"multiselect\",\"dependencies\":[\"country\",\"entity\",\"locations\"],\"searchstring\":\"-Tags\",\"mandatory\":\"\",\"copytoreopen\":\"yes\"},{\"type\":\"sf-i-form\",\"size\":\"large\",\"label\":\"Reporter *\",\"hint\":\"Reporter for the contract\",\"id\":\"reporters\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/userprofile\",\"searchstring\":\"\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["usermap","designation","project","updatetype","userid","shortid","kra","role","trainingstatute","shortnumid","lastmodifiedby","lastmodifiedtime"]\",\"maxselect\":\"1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-form\",\"size\":\"large\",\"label\":\"Approver *\",\"hint\":\"Approver for the contract\",\"id\":\"approvers\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/userprofile\",\"searchstring\":\"\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["usermap","designation","project","updatetype","userid","shortid","kra","role","trainingstatute","shortnumid","lastmodifiedby","lastmodifiedtime"]\",\"maxselect\":\"1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-form\",\"size\":\"large\",\"label\":\"Function head *\",\"hint\":\"Function head for the Contract\",\"id\":\"functionheads\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/userprofile\",\"searchstring\":\"\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["usermap","designation","project","updatetype","userid","shortid","kra","role","trainingstatute","shortnumid","lastmodifiedby","lastmodifiedtime"]\",\"maxselect\":\"1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-form\",\"size\":\"large\",\"label\":\"Auditor *\",\"hint\":\"Auditor for the Contract\",\"id\":\"auditors\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/userprofile\",\"searchstring\":\"\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["usermap","designation","project","updatetype","userid","shortid","kra","role","trainingstatute","shortnumid","lastmodifiedby","lastmodifiedtime"]\",\"maxselect\":\"1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-form\",\"size\":\"large\",\"label\":\"Viewer *\",\"hint\":\"Viewer for the contract\",\"id\":\"viewers\",\"mode\":\"multiselect-dropdown\",\"apiid\":\"dnytrdlrmxgsy.cloudfront.net/userprofile\",\"searchstring\":\"\",\"selectprojection\":\"name\",\"ignoredprojections\":\"["usermap","designation","project","updatetype","userid","shortid","kra","role","trainingstatute","shortnumid","lastmodifiedby","lastmodifiedtime"]\",\"maxselect\":\"1\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-i-select\",\"size\":\"large\",\"label\":\"Contract Type *\",\"apiid\":\"dwqyez2puoxmu.cloudfront.net/contracttype\",\"hint\":\"Type of the Contract\",\"id\":\"contracttype\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Context\",\"hint\":\"Context of the contract\",\"id\":\"context\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"textarea\",\"size\":\"small\",\"label\":\"Remarks\",\"hint\":\"Remarks on the contract\",\"id\":\"remarks\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"},{\"type\":\"sf-checklist\",\"size\":\"small\",\"label\":\"Terms *\",\"hint\":\"Terms in the contract\",\"elementsjson\":\"[{\\\"name\\\":\\\"Term1\\\"},{\\\"name\\\":\\\"Term2\\\"},{\\\"name\\\":\\\"Term3\\\"},{\\\"name\\\":\\\"Term4\\\"}]\",\"id\":\"terms\",\"mandatory\":\"\",\"copytoreopen\":\"yes\",\"displayinhistory\":\"yes\"}]";
50
51
  this.getConfigJson = () => {
51
52
  console.log('configjson', this.configjson);
52
53
  return JSON.parse(this.configjson);
@@ -74,8 +75,8 @@ let SfIReporting = class SfIReporting extends LitElement {
74
75
  this.published = false;
75
76
  this.lastCalendarGenerated = "";
76
77
  this.nextCalendarScheduled = "";
77
- // selectedItem: any = {};
78
- this.selectedItem = { id: "2b1d4da9-7cfe-4861-91f2-1727d0cc70b4" };
78
+ this.selectedItem = {};
79
+ // selectedItem: any = { id: "2b1d4da9-7cfe-4861-91f2-1727d0cc70b4" };
79
80
  this.selectedItemIds = [];
80
81
  this.reopenedItem = {};
81
82
  this.decryptProjectId = "";
@@ -90,7 +91,7 @@ let SfIReporting = class SfIReporting extends LitElement {
90
91
  : subString) + "…";
91
92
  };
92
93
  this.selectedValues = () => {
93
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
94
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
94
95
  let valueObj = {};
95
96
  for (let element of this.dataModel) {
96
97
  if (isAddButtonObject(element)) {
@@ -126,6 +127,11 @@ let SfIReporting = class SfIReporting extends LitElement {
126
127
  subrecordObj[subElement.id] = bricks.selectedValueTexts();
127
128
  }
128
129
  }
130
+ else if (subElement.type == "sf-i-select") {
131
+ let select = this._SfReportingContainer.querySelector('#' + subElement.id);
132
+ subrecordObj[subElement.id + 'id'] = (_f = select.selectedValues()[0]) !== null && _f !== void 0 ? _f : "";
133
+ subrecordObj[subElement.id + 'name'] = (_g = select.selectedTexts()[0]) !== null && _g !== void 0 ? _g : "";
134
+ }
129
135
  else {
130
136
  subrecordObj[subElement.id] = subElement.value;
131
137
  }
@@ -140,10 +146,10 @@ let SfIReporting = class SfIReporting extends LitElement {
140
146
  if (element.type == "sf-i-form") {
141
147
  let form = this._SfReportingContainer.querySelector('#' + element.id);
142
148
  if (element.savenameseparate == "yes") {
143
- valueObj[element.id + 'id'] = (_f = form.selectedValues()[0]) !== null && _f !== void 0 ? _f : "";
144
- valueObj[element.id + 'name'] = (_g = form.selectedTexts()[0]) !== null && _g !== void 0 ? _g : "";
149
+ valueObj[element.id + 'id'] = (_h = form.selectedValues()[0]) !== null && _h !== void 0 ? _h : "";
150
+ valueObj[element.id + 'name'] = (_j = form.selectedTexts()[0]) !== null && _j !== void 0 ? _j : "";
145
151
  }
146
- else if (((_h = parseInt(element.maxselect)) !== null && _h !== void 0 ? _h : 0) > 0) {
152
+ else if (((_k = parseInt(element.maxselect)) !== null && _k !== void 0 ? _k : 0) > 0) {
147
153
  let tempArr = [];
148
154
  for (let [i, val] of form.selectedValues().entries()) {
149
155
  tempArr.push(form.selectedTexts()[i] + ';' + val);
@@ -170,13 +176,18 @@ let SfIReporting = class SfIReporting extends LitElement {
170
176
  let bricks = this._SfReportingContainer.querySelector('#' + element.id);
171
177
  console.log('sf-i-bricks id', element.id);
172
178
  if (element.savenameseparate == "yes") {
173
- valueObj[element.id + 'id'] = (_j = bricks.selectedValues()[0]) !== null && _j !== void 0 ? _j : "";
174
- valueObj[element.id + 'name'] = (_k = bricks.selectedTexts()[0]) !== null && _k !== void 0 ? _k : "";
179
+ valueObj[element.id + 'id'] = (_l = bricks.selectedValues()[0]) !== null && _l !== void 0 ? _l : "";
180
+ valueObj[element.id + 'name'] = (_m = bricks.selectedTexts()[0]) !== null && _m !== void 0 ? _m : "";
175
181
  }
176
182
  else {
177
183
  valueObj[element.id] = bricks.selectedValueTexts();
178
184
  }
179
185
  }
186
+ else if (element.type == "sf-i-select") {
187
+ let select = this._SfReportingContainer.querySelector('#' + element.id);
188
+ valueObj[element.id + 'id'] = (_o = select.selectedValues()[0]) !== null && _o !== void 0 ? _o : "";
189
+ valueObj[element.id + 'name'] = (_p = select.selectedTexts()[0]) !== null && _p !== void 0 ? _p : "";
190
+ }
180
191
  else {
181
192
  valueObj[element.id] = element.value;
182
193
  }
@@ -218,6 +229,7 @@ let SfIReporting = class SfIReporting extends LitElement {
218
229
  };
219
230
  this.newClick = () => {
220
231
  console.log('new clicked');
232
+ this.prepopulateValJson = "[]";
221
233
  this.flow = "new";
222
234
  this.loadMode();
223
235
  };
@@ -243,6 +255,7 @@ let SfIReporting = class SfIReporting extends LitElement {
243
255
  let names = [];
244
256
  let ids = [];
245
257
  if (element.id == "country") {
258
+ console.log('getting usermap', this.getUserMap());
246
259
  for (let country of Object.keys(this.getUserMap())) {
247
260
  if (country == "roles") {
248
261
  continue;
@@ -373,6 +386,7 @@ let SfIReporting = class SfIReporting extends LitElement {
373
386
  (_d = this._SfReportingButtonEditCancel) === null || _d === void 0 ? void 0 : _d.addEventListener('click', this.editCancelClick);
374
387
  };
375
388
  this.populateDataModel = () => {
389
+ console.log('populating data model');
376
390
  let sectionCount = 0;
377
391
  this.dataModel = [];
378
392
  console.log('getconfigjson', this.getConfigJson());
@@ -400,7 +414,7 @@ let SfIReporting = class SfIReporting extends LitElement {
400
414
  }
401
415
  console.log('dataModel', this.dataModel);
402
416
  };
403
- this.populateView = (scrollTopTarget = 0) => {
417
+ this.populateView = async (scrollTopTarget = 0) => {
404
418
  var _a;
405
419
  console.log('populating view');
406
420
  let html = "";
@@ -537,7 +551,7 @@ let SfIReporting = class SfIReporting extends LitElement {
537
551
  }
538
552
  }
539
553
  let values = this.getBricksValues(element, selectedDependedValues);
540
- console.log('bricks selecteddependantvalues', selectedDependedValues, element.value, values[1]);
554
+ console.log('bricks selecteddependantvalues', element.id, selectedDependedValues, values[1]);
541
555
  bricks.namesjson = JSON.stringify(values[0]);
542
556
  bricks.idsjson = JSON.stringify(values[1]);
543
557
  if (element.value != '') {
@@ -546,19 +560,26 @@ let SfIReporting = class SfIReporting extends LitElement {
546
560
  else {
547
561
  bricks.prepopulateValJson = JSON.stringify([]);
548
562
  }
549
- console.log('bricks element values', bricks.prepopulateValJson, element.id);
563
+ console.log('bricks element values', bricks.prepopulateValJson, bricks.namesjson, bricks.idsjson, element.id);
550
564
  if (this.mode == "view" || this.flow == "details") {
551
565
  bricks.flow = "view";
552
566
  }
553
567
  else {
554
568
  bricks.flow = "edit";
555
569
  }
570
+ bricks.loadMode();
556
571
  }
557
572
  else if (element.type == "sf-i-uploader") {
573
+ await customElements.whenDefined('sf-i-uploader');
558
574
  let uploader = this._SfReportingContainer.querySelector('#' + element.id);
559
575
  uploader.prepopulatedInputArr = JSON.stringify((_a = element.value) !== null && _a !== void 0 ? _a : []);
560
576
  uploader.readOnly = (this.mode == "view" || this.flow == "details");
561
- uploader.loadMode();
577
+ console.log('uploader', uploader, uploader.prepopulatedInputArr, element.value);
578
+ if (uploader != null) {
579
+ setTimeout(() => {
580
+ uploader.loadMode();
581
+ }, 500);
582
+ }
562
583
  }
563
584
  else if (element.type == "sf-i-form-select") {
564
585
  let buttonEditForm = this._SfReportingContainer.querySelector('#button-edit-form-' + element.id);
@@ -638,6 +659,30 @@ let SfIReporting = class SfIReporting extends LitElement {
638
659
  }
639
660
  });
640
661
  }
662
+ else if (element.type == "sf-i-select") {
663
+ console.log('rendering sf-i-select', element.id);
664
+ await customElements.whenDefined('sf-i-select');
665
+ let select = this._SfReportingContainer.querySelector('#' + element.id);
666
+ select.flow = (this.mode == "view" || this.flow == "details") ? "read" : "";
667
+ if (element.value != '') {
668
+ let valArr = [element.value[0].split(';')[1]];
669
+ select.selectedId = valArr;
670
+ }
671
+ select.loadMode();
672
+ console.log('sf-i-select', select, select.selectedId, element.id);
673
+ }
674
+ else if (element.type == "sf-checklist") {
675
+ console.log('rendering sf-checklist', element.id, JSON.stringify(element.value));
676
+ await customElements.whenDefined('sf-checklist');
677
+ let checklist = this._SfReportingContainer.querySelector('#' + element.id);
678
+ checklist.listelements = JSON.parse(element.elementsjson);
679
+ checklist.listselection = element.value;
680
+ checklist.readonly = (this.mode == "view" || this.flow == "details");
681
+ console.log('sf-checklist', checklist, checklist.listelements, checklist.listselection, element.value);
682
+ setTimeout(() => {
683
+ checklist.loadMode();
684
+ }, 200);
685
+ }
641
686
  }
642
687
  if (this.mode != "view" && this.flow != 'details') {
643
688
  let selectedOptions = this._SfReportingContainer.querySelectorAll('.selected-option');
@@ -721,17 +766,17 @@ let SfIReporting = class SfIReporting extends LitElement {
721
766
  for (let [indexDate, historyDate] of Object.keys(this.getPrepopulateJson().history).entries()) {
722
767
  console.log('history', historyDate);
723
768
  html += `
724
- <div class="d-flex flex-col" part="section-container"><div id="history-date-${indexDate}" class="history-section-head section-head d-flex align-center justify-between" part="section-head-collapsed"><h3 part="section-title-collapsed" id="section-history-title-${indexDate}">${historyDate}</h3><div class="material-icons" id="section-history-icon-${indexDate}">keyboard_arrow_down</div></div><div id="section-history-body-${indexDate}" class="section-body d-flex ${this.formviewclass} hide" part="section-body">
769
+ <div class="d-flex flex-col" part="section-container"><div id="history-date-${indexDate}" class="history-section-head section-head d-flex align-center justify-between" part="section-head-collapsed"><h3 part="section-title-collapsed" class="section-history-title" id="section-history-title-${indexDate}">${historyDate}</h3><div class="section-history-icon material-icons" id="section-history-icon-${indexDate}">keyboard_arrow_down</div></div><div id="section-history-body-${indexDate}" class="section-history-body section-body d-flex ${this.formviewclass} hide" part="section-body">
725
770
  `;
726
771
  for (let [index, historyItem] of this.getPrepopulateJson().history[historyDate].entries()) {
727
- html += `<sf-i-reporting name="" id="history-reporting-${historyDate}-${index}" class="history-reporting" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head" name="Notice Details" mode="view" editdisable="true" formviewclass="flex-wrap" prepopulatevaljson="${JSON.stringify(historyItem.object).replace(/"/g, '&quot;')}"></sf-i-reporting>`;
772
+ html += `<sf-i-reporting name="" id="history-reporting-${historyDate}-${index}" class="history-reporting" exportparts="uploader-extracted-text:reporting-uploader-extracted-text, uploader-sf-upload-message:reporting-uploader-sf-upload-message, uploader-sf-upload-submessage:reporting-uploader-sf-upload-submessage, uploader-extracted-text-chip:reporting-uploader-extracted-text-chip, uploader-extracted-text-chip-failed:reporting-uploader-extracted-text-chip-failed, uploader-doctype-verify-badge:reporting-uploader-doctype-verify-badge,span-submit-published:reporting-span-submit-published, span-submit-unpublished:reporting-span-submit-unpublished, reporting-container:reporting-reporting-container, button-icon:reporting-button-icon, uploader-button-icon:reporting-uploader-button-icon, sf-i-form-modal-container:reporting-sf-i-form-modal-container, next-calendar-date:reporting-next-calendar-date, last-calendar-date:reporting-last-calendar-date, input-publish-checkbox:reporting-input-publish-checkbox, button-icon-light:reporting-button-icon-light, button-icon-small:reporting-button-icon-small, uploader-input-label:reporting-uploader-input-label, input-radio:reporting-input-radio, radio-label:reporting-radio-label, input-textarea:reporting-input-textarea, input-date:reporting-input-date, input-select-single:reporting-input-select-single, textarea-container:reporting-textarea-container, section-body:reporting-section-body, section-container:reporting-section-container, date-container:reporting-date-container, input-sf-i-uploader:reporting-input-sf-i-uploader, published-container:reporting-published-container, selected-option:reporting-selected-option, input-select-multi-option:reporting-input-select-multi-option, select-option-label:reporting-select-option-label, input-sf-i-form:reporting-input-sf-i-form, input-sf-i-bricks:reporting-input-sf-i-bricks, uploader-input:reporting-uploader-input, form-container:reporting-form-container, published-container:reporting-published-container, form-container-published:reporting-form-container-published, subsection:reporting-subsection, results-title:reporting-results-title, td-head:reporting-td-head, td-action:reporting-td-action, td-body:reporting-td-body, td-body-2:reporting-td-body-2, add-button:reporting-add-button, uploader-button:reporting-uploader-button, section-head-collapsed:reporting-section-head-collapsed, section-title-expanded:reporting-section-title-expanded, section-title-collapsed:reporting-section-title-collapsed, section-head-expanded:reporting-section-head-expanded, progress-bar-finished:reporting-progress-bar-finished, progress-bar-complete:reporting-progress-bar-complete, progress-bar-incomplete:reporting-progress-bar-incomplete, section-success-icon:reporting-section-success-icon, section-body:reporting-section-body, title-section:reporting-title-section, button-lg:reporting-button-lg, uploader-detail-container:reporting-uploader-detail-container, textarea-label:reporting-textarea-label, date-label:reporting-date-label, commentbox:reporting-commentbox, comment-username:reporting-comment-username, detail-head:reporting-detail-head" name="Object Details" mode="view" editdisable="true" formviewclass="flex-wrap" configjson="${JSON.stringify(historyItem.schema)}" prepopulatevaljson="${JSON.stringify(historyItem.object).replace(/"/g, '&quot;')}"></sf-i-reporting>`;
728
773
  let comments = (_a = historyItem.object.comments) !== null && _a !== void 0 ? _a : [];
729
774
  if (historyItem.object.documents != null && historyItem.object.documents.length > 0) {
730
775
  html += '<div class="d-flex justify-between mb-20">';
731
776
  html += '<h3 part="history-docs-title" class="m-0"><br />Documents</h3>';
732
777
  html += '</div>';
733
778
  html += `
734
- <sf-i-uploader prepopulatedInputArr="${JSON.stringify(historyItem.object.documents).replace(/"/g, '&quot;')}" exportparts="detail-container:uploader-detail-container, errmsg:uploader-errmsg, successmsg:uploader-successmsg, sf-upload-message:uploader:sf-upload-message, sf-upload-submessage: uploader-sf-upload-submessage, doctype-verify-badge: uploader-doctype-verify-badge, details-controls-container: uploader-details-controls-container, button-icon: uploader-button-icon, pdf-controls-container: uploader-pdf-controls-container, pdf-pages: uploader-pdf-pages, pdf-page-num: uploader-pdf-page-num, pdf-page-count: uploader-pdf-page-count, pdf-canvas: uploader-pdf-canvas, image-container: uploader-image-container, image-component: uploader-image-component, pdf-thumbnail-container: uploader-pdf-thumbnail-container, pdf-canvas-thumbnail: uploader-pdf-canvas-thumbnail, sf-uploader-download-message: uploader-sf-uploader-download-message, input: uploader-input, upload-buttons-container: uploader-upload-buttons-container, doctype-badge: uploader-doctype-badge, upload-status: uploader-upload-status, ext-badge:uploader-ext-badge, extracted-meta: uploader-extracted-meta, extracted-text-chip: uploader-extracted-text-chip, extracted-text-chip-parsed: uploader-extracted-text-chip-parsed, extracted-text-chip-failed: uploader-extracted-text-chip-failed, matches-title: uploader-matches-title, matches:uploader-matches, extracted-title: uploader-extracted-title, extracted-text: uploader-extracted-text, disclaimer-message-container: uploader-disclaimer-message-container, message-container: uploader-message-container, button: uploader-button" class="reporting-sf-i-uploader" part="input-sf-i-uploader" id="history-doc-uploader-${index}" maximize="yes" max="${historyItem.object.documents.length}" apiid="${this.apiIdUploader}" projectid="${this.projectid}" mode="view"></sf-i-uploader>
779
+ <sf-i-uploader prepopulatedInputArr="${JSON.stringify(historyItem.object.documents).replace(/"/g, '&quot;')}" exportparts="detail-container:uploader-detail-container, errmsg:uploader-errmsg, successmsg:uploader-successmsg, sf-upload-message:uploader-sf-upload-message, sf-upload-submessage: uploader-sf-upload-submessage, doctype-verify-badge: uploader-doctype-verify-badge, details-controls-container: uploader-details-controls-container, button-icon: uploader-button-icon, pdf-controls-container: uploader-pdf-controls-container, pdf-pages: uploader-pdf-pages, pdf-page-num: uploader-pdf-page-num, pdf-page-count: uploader-pdf-page-count, pdf-canvas: uploader-pdf-canvas, image-container: uploader-image-container, image-component: uploader-image-component, pdf-thumbnail-container: uploader-pdf-thumbnail-container, pdf-canvas-thumbnail: uploader-pdf-canvas-thumbnail, sf-uploader-download-message: uploader-sf-uploader-download-message, input: uploader-input, upload-buttons-container: uploader-upload-buttons-container, doctype-badge: uploader-doctype-badge, upload-status: uploader-upload-status, ext-badge:uploader-ext-badge, extracted-meta: uploader-extracted-meta, extracted-text-chip: uploader-extracted-text-chip, extracted-text-chip-parsed: uploader-extracted-text-chip-parsed, extracted-text-chip-failed: uploader-extracted-text-chip-failed, matches-title: uploader-matches-title, matches:uploader-matches, extracted-title: uploader-extracted-title, extracted-text: uploader-extracted-text, disclaimer-message-container: uploader-disclaimer-message-container, message-container: uploader-message-container, button: uploader-button" class="reporting-sf-i-uploader" part="input-sf-i-uploader" id="history-doc-uploader-${index}" maximize="yes" max="${historyItem.object.documents.length}" apiid="${this.apiIdUploader}" projectid="${this.projectid}" mode="view"></sf-i-uploader>
735
780
  `;
736
781
  }
737
782
  html += '<div class="d-flex justify-between mb-20">';
@@ -774,6 +819,7 @@ let SfIReporting = class SfIReporting extends LitElement {
774
819
  }
775
820
  html += '</div>';
776
821
  }
822
+ html += `<div part="history-status" class="d-flex history-status p-5 hide">History Status</div>`;
777
823
  html += '</div>';
778
824
  formContainer.insertAdjacentHTML('beforeend', html);
779
825
  let sectionHistory = formContainer.querySelector('#history');
@@ -799,29 +845,43 @@ let SfIReporting = class SfIReporting extends LitElement {
799
845
  sectionHistoryDate.addEventListener('click', () => {
800
846
  let id = sectionHistoryDate.id;
801
847
  let dateIndex = id.split('-')[2];
802
- let sectionHistoryDateBody = formContainer.querySelector('#section-history-body-' + dateIndex);
803
- let sectionHistoryDateTitle = formContainer.querySelector('#section-history-title-' + dateIndex);
804
- let sectionHistoryDateIcon = formContainer.querySelector('#section-history-icon-' + dateIndex);
805
- if (sectionHistoryDateBody.style.display == 'block') {
806
- sectionHistoryDate.setAttribute('part', 'section-head-collapsed');
807
- sectionHistoryDateBody.style.display = 'none';
808
- sectionHistoryDateTitle.setAttribute('part', 'section-title-collapsed');
809
- sectionHistoryDateIcon.innerHTML = 'keyboard_arrow_down';
810
- }
811
- else {
812
- sectionHistoryDate.setAttribute('part', 'section-head-expanded');
813
- sectionHistoryDateBody.style.display = 'block';
814
- sectionHistoryDateTitle.setAttribute('part', 'section-title-expanded');
815
- sectionHistoryDateIcon.innerHTML = 'keyboard_arrow_up';
848
+ let sectionHistoryDateBodies = formContainer.querySelectorAll('.section-history-body');
849
+ let sectionHistoryDateTitles = formContainer.querySelectorAll('.section-history-title');
850
+ let sectionHistoryDateIcons = formContainer.querySelectorAll('.section-history-icon');
851
+ let historyStatus = formContainer.querySelector('.history-status');
852
+ for (let [i, sectionHistoryDateBody] of sectionHistoryDateBodies.entries()) {
853
+ if (sectionHistoryDateBody.id == ("section-history-body-" + dateIndex)) {
854
+ if (sectionHistoryDateBody.style.display == 'block') {
855
+ historyStatus.style.display = 'none';
856
+ sectionHistoryDate.setAttribute('part', 'section-head-collapsed');
857
+ sectionHistoryDateBody.style.display = 'none';
858
+ sectionHistoryDateTitles[i].setAttribute('part', 'section-title-collapsed');
859
+ sectionHistoryDateIcons[i].innerHTML = 'keyboard_arrow_down';
860
+ }
861
+ else {
862
+ historyStatus.innerHTML = "History : " + sectionHistoryDateTitles[i].innerHTML;
863
+ historyStatus.style.display = 'flex';
864
+ sectionHistoryDate.setAttribute('part', 'section-head-expanded');
865
+ sectionHistoryDateBody.style.display = 'block';
866
+ sectionHistoryDateTitles[i].setAttribute('part', 'section-title-expanded');
867
+ sectionHistoryDateIcons[i].innerHTML = 'keyboard_arrow_up';
868
+ }
869
+ }
870
+ else {
871
+ sectionHistoryDate.setAttribute('part', 'section-head-collapsed');
872
+ sectionHistoryDateBody.style.display = 'none';
873
+ sectionHistoryDateTitles[i].setAttribute('part', 'section-title-collapsed');
874
+ sectionHistoryDateIcons[i].innerHTML = 'keyboard_arrow_down';
875
+ }
816
876
  }
817
877
  });
818
878
  }
819
879
  let historyReportings = formContainer.querySelectorAll('.history-reporting');
820
880
  for (let historyReporting of historyReportings) {
821
881
  let id = historyReporting.id;
822
- let date = id.split('-')[2] + '-' + id.split('-')[3] + '-' + id.split('-')[4];
823
- let index = id.split('-')[5];
824
- console.log('historyConfigJSON', this.getPrepopulateJson().history[date][index].schema);
882
+ let date = id.split('-')[2];
883
+ let index = id.split('-')[3];
884
+ console.log('historyConfigJSON', id);
825
885
  historyReporting.configjson = JSON.stringify(this.getPrepopulateJson().history[date][index].schema);
826
886
  // historyReporting.loadMode();
827
887
  }
@@ -894,8 +954,15 @@ let SfIReporting = class SfIReporting extends LitElement {
894
954
  this.dataModel[i].value = this.getPrepopulateJson()[element.id];
895
955
  }
896
956
  }
957
+ else if (element.type == "sf-checklist") {
958
+ this.dataModel[i].value = this.getPrepopulateJson()[element.id];
959
+ }
960
+ else if (element.type == "sf-i-select") {
961
+ this.dataModel[i].value = [this.getPrepopulateJson()[element.id + 'name'] + ';' + this.getPrepopulateJson()[element.id + 'id']];
962
+ }
897
963
  else if (element.type == "sf-i-uploader") {
898
964
  this.dataModel[i].value = this.getPrepopulateJson()[element.id];
965
+ console.log('setting uploader value', JSON.stringify(this.dataModel[i]), this.getPrepopulateJson()[element.id]);
899
966
  }
900
967
  }
901
968
  }
@@ -916,6 +983,9 @@ let SfIReporting = class SfIReporting extends LitElement {
916
983
  let sectionId = "";
917
984
  let flagEval = true;
918
985
  for (let element of this.dataModel) {
986
+ if (element.type == "sf-checklist") {
987
+ console.log('sf-checklist', element, element.id);
988
+ }
919
989
  if (isAddButtonObject(element)) {
920
990
  for (let childElementsArr of element.children) {
921
991
  for (let childElement of childElementsArr) {
@@ -981,6 +1051,23 @@ let SfIReporting = class SfIReporting extends LitElement {
981
1051
  sectionChildFilledCount++;
982
1052
  }
983
1053
  }
1054
+ else if (element.type == "sf-i-select") {
1055
+ console.log('evalshowprogress sf-i-select value', element.value, element.value.length, element.mandatory, element.mandatory != null);
1056
+ if (element.value.length > 0) {
1057
+ filled++;
1058
+ sectionChildFilledCount++;
1059
+ }
1060
+ }
1061
+ else if (element.type == "sf-checklist") {
1062
+ console.log('evalshowprogress sf-checklist value', element.value, Object.keys(element.value).length, element.mandatory, element.mandatory != null);
1063
+ for (let val of Object.keys(element.value)) {
1064
+ if (element.value[val] == true) {
1065
+ filled++;
1066
+ sectionChildFilledCount++;
1067
+ break;
1068
+ }
1069
+ }
1070
+ }
984
1071
  else if (element.type == "sf-i-uploader") {
985
1072
  console.log('evalshowprogress sf-i-uploader value', element.value, element.value.length, element.mandatory, element.mandatory != null);
986
1073
  if (element.value.length > 0) {
@@ -1284,7 +1371,39 @@ let SfIReporting = class SfIReporting extends LitElement {
1284
1371
  uploader.addEventListener('uploadValid', async (ev) => {
1285
1372
  let target = ev.target;
1286
1373
  let genId = target.id.slice(0, target.id.lastIndexOf('-'));
1287
- console.log('bricks value changed', target.id);
1374
+ console.log('uploader value changed', target.id, target.selectedValues(), this.mode);
1375
+ for (let [i, element] of this.dataModel.entries()) {
1376
+ if (!isAddButtonObject(element)) {
1377
+ if (element.id == target.id && target.selectedValues().length > 0) {
1378
+ this.dataModel[i].value = target.selectedValues();
1379
+ }
1380
+ }
1381
+ else {
1382
+ if (element.schema.indexOf(genId) >= 0) {
1383
+ for (let [j, childElementArr] of element.children.entries()) {
1384
+ for (let [k, childElement] of childElementArr.entries()) {
1385
+ if (childElement.id == target.id) {
1386
+ this.dataModel[i].children[j][k].value = target.selectedValues();
1387
+ }
1388
+ }
1389
+ }
1390
+ }
1391
+ }
1392
+ }
1393
+ if (this.evalTimeout != null) {
1394
+ clearTimeout(this.evalTimeout);
1395
+ }
1396
+ this.evalTimeout = setTimeout(() => {
1397
+ this.evalShowProgress();
1398
+ }, 2000);
1399
+ });
1400
+ }
1401
+ let selects = this._SfReportingContainer.querySelectorAll('.reporting-sf-i-select');
1402
+ for (let select of selects) {
1403
+ select.addEventListener('valueChanged', async (ev) => {
1404
+ let target = ev.target;
1405
+ let genId = target.id.slice(0, target.id.lastIndexOf('-'));
1406
+ console.log('sf-i-select value changed', target.id);
1288
1407
  for (let [i, element] of this.dataModel.entries()) {
1289
1408
  if (!isAddButtonObject(element)) {
1290
1409
  if (element.id == target.id) {
@@ -1311,6 +1430,38 @@ let SfIReporting = class SfIReporting extends LitElement {
1311
1430
  }, 2000);
1312
1431
  });
1313
1432
  }
1433
+ let checklists = this._SfReportingContainer.querySelectorAll('.reporting-sf-checklist');
1434
+ for (let checklist of checklists) {
1435
+ checklist.addEventListener('valueChanged', async (ev) => {
1436
+ let target = ev.target;
1437
+ let genId = target.id.slice(0, target.id.lastIndexOf('-'));
1438
+ console.log('sf-checklist value changed', target.id);
1439
+ for (let [i, element] of this.dataModel.entries()) {
1440
+ if (!isAddButtonObject(element)) {
1441
+ if (element.id == target.id && Object.keys(target.selectedValues()).length > 0) {
1442
+ this.dataModel[i].value = target.selectedValues();
1443
+ }
1444
+ }
1445
+ else {
1446
+ if (element.schema.indexOf(genId) >= 0) {
1447
+ for (let [j, childElementArr] of element.children.entries()) {
1448
+ for (let [k, childElement] of childElementArr.entries()) {
1449
+ if (childElement.id == target.id) {
1450
+ this.dataModel[i].children[j][k].value = target.selectedValues();
1451
+ }
1452
+ }
1453
+ }
1454
+ }
1455
+ }
1456
+ }
1457
+ if (this.evalTimeout != null) {
1458
+ clearTimeout(this.evalTimeout);
1459
+ }
1460
+ this.evalTimeout = setTimeout(() => {
1461
+ this.evalShowProgress();
1462
+ }, 2000);
1463
+ });
1464
+ }
1314
1465
  };
1315
1466
  this.checkDependencies = async (id) => {
1316
1467
  for (let element of this.dataModel) {
@@ -1518,11 +1669,25 @@ let SfIReporting = class SfIReporting extends LitElement {
1518
1669
  ${this.mode == "view" || this.flow == 'details' ? 'flow="view"' : ''} class="reporting-sf-i-bricks" part="input-sf-i-bricks" name="${dataObj.name}" ${parseInt(dataObj.maxselect) == 0 ? "" : `maxselect="${dataObj.maxselect}"`} ${dataObj.mandatory != null ? "mandatory=\"\"" : ""}></sf-i-bricks>
1519
1670
  </div>`;
1520
1671
  }
1672
+ else if (dataObj.type == "sf-i-select") {
1673
+ elementHtml += `<div part="date-container" class="d-flex flex-col flex-grow">
1674
+ <label id="${dataObj.id}-label" part="date-label">${elementLabel}</label>
1675
+ <div part="td-body-2"><sf-i-elastic-text text="${dataObj.hint}" minLength="50"></sf-i-elastic-text></div>
1676
+ <sf-i-select class="reporting-sf-i-select" exportparts="input-select:select-input-select" id="${dataObj.id}" part="input-sf-i-select" label="" apiId="${dataObj.apiid}" ${dataObj.mandatory != null ? "mandatory=\"\"" : ""}></sf-i-select>
1677
+ </div>`;
1678
+ }
1679
+ else if (dataObj.type == "sf-checklist") {
1680
+ elementHtml += `<div part="date-container" class="d-flex flex-col flex-grow">
1681
+ <label id="${dataObj.id}-label" part="date-label">${elementLabel}</label>
1682
+ <div part="td-body-2"><sf-i-elastic-text text="${dataObj.hint}" minLength="50"></sf-i-elastic-text></div>
1683
+ <sf-checklist class="reporting-sf-checklist" exportparts="checklist-container, checklist-title, checklist-list, checklist-item, checklist-checkbox, checklist-checkbox-label" id="${dataObj.id}" part="input-sf-checklist" ${dataObj.mandatory != null ? "mandatory=\"\"" : ""}></sf-checklist>
1684
+ </div>`;
1685
+ }
1521
1686
  else if (dataObj.type == "sf-i-uploader") {
1522
1687
  elementHtml += `<div part="uploader-container" class="d-flex flex-col flex-grow">
1523
1688
  <label id="${dataObj.id}-label" part="date-label">${elementLabel}</label>
1524
1689
  <div part="td-body-2"><sf-i-elastic-text text="${dataObj.hint}" minLength="50"></sf-i-elastic-text></div>
1525
- <sf-i-uploader exportparts="detail-container:uploader-detail-container, errmsg:uploader-errmsg, successmsg:uploader-successmsg, sf-upload-message:uploader:sf-upload-message, sf-upload-submessage: uploader-sf-upload-submessage, doctype-verify-badge: uploader-doctype-verify-badge, details-controls-container: uploader-details-controls-container, button-icon: uploader-button-icon, pdf-controls-container: uploader-pdf-controls-container, pdf-pages: uploader-pdf-pages, pdf-page-num: uploader-pdf-page-num, pdf-page-count: uploader-pdf-page-count, pdf-canvas: uploader-pdf-canvas, image-container: uploader-image-container, image-component: uploader-image-component, pdf-thumbnail-container: uploader-pdf-thumbnail-container, pdf-canvas-thumbnail: uploader-pdf-canvas-thumbnail, sf-uploader-download-message: uploader-sf-uploader-download-message, input: uploader-input, upload-buttons-container: uploader-upload-buttons-container, doctype-badge: uploader-doctype-badge, upload-status: uploader-upload-status, ext-badge:uploader-ext-badge, extracted-meta: uploader-extracted-meta, extracted-text-chip: uploader-extracted-text-chip, extracted-text-chip-parsed: uploader-extracted-text-chip-parsed, extracted-text-chip-failed: uploader-extracted-text-chip-failed, matches-title: uploader-matches-title, matches:uploader-matches, extracted-title: uploader-extracted-title, extracted-text: uploader-extracted-text, disclaimer-message-container: uploader-disclaimer-message-container, message-container: uploader-message-container, button: uploader-button" class="reporting-sf-i-uploader" part="input-sf-i-uploader" id="${dataObj.id}" max="${dataObj.maxselect}" apiid="${dataObj.apiid}" allowedextensions="${dataObj.allowedextensions}" extract="${dataObj.extract}" projectid="${this.projectid}" maxsize="${dataObj.maxsize}" allowdownload="${dataObj.allowdownload}"></sf-i-uploader>
1690
+ <sf-i-uploader exportparts="detail-container:uploader-detail-container, errmsg:uploader-errmsg, successmsg:uploader-successmsg, sf-upload-message:uploader-sf-upload-message, sf-upload-submessage: uploader-sf-upload-submessage, doctype-verify-badge: uploader-doctype-verify-badge, details-controls-container: uploader-details-controls-container, button-icon: uploader-button-icon, pdf-controls-container: uploader-pdf-controls-container, pdf-pages: uploader-pdf-pages, pdf-page-num: uploader-pdf-page-num, pdf-page-count: uploader-pdf-page-count, pdf-canvas: uploader-pdf-canvas, image-container: uploader-image-container, image-component: uploader-image-component, pdf-thumbnail-container: uploader-pdf-thumbnail-container, pdf-canvas-thumbnail: uploader-pdf-canvas-thumbnail, sf-uploader-download-message: uploader-sf-uploader-download-message, input: uploader-input, upload-buttons-container: uploader-upload-buttons-container, doctype-badge: uploader-doctype-badge, upload-status: uploader-upload-status, ext-badge:uploader-ext-badge, extracted-meta: uploader-extracted-meta, extracted-text-chip: uploader-extracted-text-chip, extracted-text-chip-parsed: uploader-extracted-text-chip-parsed, extracted-text-chip-failed: uploader-extracted-text-chip-failed, matches-title: uploader-matches-title, matches:uploader-matches, extracted-title: uploader-extracted-title, extracted-text: uploader-extracted-text, disclaimer-message-container: uploader-disclaimer-message-container, message-container: uploader-message-container, button: uploader-button" class="reporting-sf-i-uploader" part="input-sf-i-uploader" id="${dataObj.id}" max="${dataObj.maxselect}" apiid="${dataObj.apiid}" allowedextensions="${dataObj.allowedextensions}" extract="${dataObj.extract}" projectid="${this.projectid}" maxsize="${dataObj.maxsize}" allowdownload="${dataObj.allowdownload}"></sf-i-uploader>
1526
1691
  </div>`;
1527
1692
  }
1528
1693
  return elementHtml;
@@ -1587,6 +1752,7 @@ let SfIReporting = class SfIReporting extends LitElement {
1587
1752
  let index = target.id.split('-')[2];
1588
1753
  this.reopenedItem = this.list[index];
1589
1754
  let oldObj = this.reopenedItem;
1755
+ this.showLoader();
1590
1756
  console.log('item selected', this.reopenedItem);
1591
1757
  await this.fetchSchema();
1592
1758
  this.published = (_a = this.list[index].published) !== null && _a !== void 0 ? _a : false;
@@ -1616,17 +1782,22 @@ let SfIReporting = class SfIReporting extends LitElement {
1616
1782
  let target = ev.target;
1617
1783
  let index = target.id.split('-')[2];
1618
1784
  this.selectedItem = this.list[index];
1785
+ this.showLoader();
1619
1786
  console.log('item selected', this.selectedItem);
1620
- this.flow = "details";
1621
- this.loadMode();
1787
+ setTimeout(() => {
1788
+ this.flow = "details";
1789
+ this.loadMode();
1790
+ }, 3000);
1622
1791
  });
1623
1792
  }
1624
1793
  let buttonNew = this._SfReportingContainer.querySelector('#button-new');
1625
1794
  buttonNew.addEventListener('click', () => {
1795
+ this.showLoader();
1626
1796
  this.newClick();
1627
1797
  });
1628
1798
  let customEvent = new CustomEvent('valueChanged');
1629
1799
  this.dispatchEvent(customEvent);
1800
+ this.hideLoader();
1630
1801
  };
1631
1802
  this.loadMode = async () => {
1632
1803
  console.log('loadmode', this.mode, this.flow);
@@ -1792,7 +1963,7 @@ let SfIReporting = class SfIReporting extends LitElement {
1792
1963
  this.fetchDetails = async () => {
1793
1964
  var _a;
1794
1965
  let url = "https://" + this.apiId + "/details";
1795
- let body = { projectid: this.projectid, noticeid: this.selectedItem.id };
1966
+ let body = { projectid: this.projectid, objectid: this.selectedItem.id };
1796
1967
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
1797
1968
  const xhr = (await this.prepareXhr(body, url, this._SfLoader, authorization));
1798
1969
  this._SfLoader.innerHTML = '';
@@ -1836,10 +2007,10 @@ let SfIReporting = class SfIReporting extends LitElement {
1836
2007
  };
1837
2008
  this.submitEdit = async () => {
1838
2009
  let url = "https://" + this.apiId + "/update";
1839
- let body = { projectid: this.projectid, noticeid: this.selectedItem.id, object: this.selectedValues(), schema: this.getConfigJson(), published: this.published };
2010
+ let body = { projectid: this.projectid, objectid: this.selectedItem.id, object: this.selectedValues(), schema: this.getConfigJson(), published: this.published };
1840
2011
  if (Object.keys(this.reopenedItem).length > 0) {
1841
2012
  url = "https://" + this.apiId + "/reopen";
1842
- body = { projectid: this.projectid, object: this.selectedValues(), schema: this.getConfigJson(), noticeid: this.reopenedItem.id, published: this.published };
2013
+ body = { projectid: this.projectid, object: this.selectedValues(), schema: this.getConfigJson(), objectid: this.reopenedItem.id, published: this.published };
1843
2014
  }
1844
2015
  console.log('updating', body, url);
1845
2016
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
@@ -1861,7 +2032,7 @@ let SfIReporting = class SfIReporting extends LitElement {
1861
2032
  };
1862
2033
  this.submitDelete = async () => {
1863
2034
  let url = "https://" + this.apiId + "/delete";
1864
- let body = { projectid: this.projectid, noticeid: this.selectedItem.id };
2035
+ let body = { projectid: this.projectid, objectid: this.selectedItem.id };
1865
2036
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
1866
2037
  const xhr = (await this.prepareXhr(body, url, this._SfLoader, authorization));
1867
2038
  this._SfLoader.innerHTML = '';
@@ -1881,7 +2052,7 @@ let SfIReporting = class SfIReporting extends LitElement {
1881
2052
  };
1882
2053
  this.submitPublish = async () => {
1883
2054
  let url = "https://" + this.apiId + "/publish";
1884
- let body = { projectid: this.projectid, noticeids: this.selectedItemIds };
2055
+ let body = { projectid: this.projectid, objectids: this.selectedItemIds };
1885
2056
  const authorization = btoa(Util.readCookie('email') + ":" + Util.readCookie('accessToken'));
1886
2057
  const xhr = (await this.prepareXhr(body, url, this._SfLoader, authorization));
1887
2058
  this._SfLoader.innerHTML = '';
@@ -1981,12 +2152,14 @@ let SfIReporting = class SfIReporting extends LitElement {
1981
2152
  let loaderContainer = this._SfIReportingCCopy;
1982
2153
  loaderContainer.style.backgroundColor = "#efefef";
1983
2154
  loaderContainer.style.display = 'flex';
2155
+ console.log('showing loader', loaderContainer.style.display);
1984
2156
  }
1985
2157
  };
1986
2158
  this.hideLoader = async () => {
1987
2159
  if (this._SfIReportingCCopy != null) {
1988
2160
  let loaderContainer = this._SfIReportingCCopy;
1989
2161
  loaderContainer.style.display = 'none';
2162
+ console.log('hiding loader', loaderContainer.style.display);
1990
2163
  }
1991
2164
  };
1992
2165
  }
@@ -2134,6 +2307,9 @@ let SfIReporting = class SfIReporting extends LitElement {
2134
2307
  return html `
2135
2308
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
2136
2309
  <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0..1,0" />
2310
+ <div part="reporting-container-outer-copy" class="SfIReportingCCopy align-center d-flex flex-col justify-center hide">
2311
+ <div class="lds-dual-ring"></div>
2312
+ </div>
2137
2313
  <div part="reporting-container-outer" class="SfIReportingC d-flex flex-col align-center">
2138
2314
  <div class="d-flex justify-between w-100-m-0">
2139
2315
  <div id="reporting-container" part="reporting-container" class="w-100-m-0 hide"></div>
@@ -2168,10 +2344,6 @@ let SfIReporting = class SfIReporting extends LitElement {
2168
2344
  };
2169
2345
  SfIReporting.styles = css `
2170
2346
 
2171
-
2172
- .SfIReportingC {
2173
- }
2174
-
2175
2347
  .SfIReportingCCopy {
2176
2348
  width: 100%;
2177
2349
  height: 100%;
@@ -2208,7 +2380,6 @@ SfIReporting.styles = css `
2208
2380
  .mt-10{
2209
2381
  margin-top: 10px
2210
2382
  }
2211
- }
2212
2383
  .ml-10{
2213
2384
  margin-left: 10px
2214
2385
  }
@@ -2253,10 +2424,6 @@ SfIReporting.styles = css `
2253
2424
  text-transform: capitalize;
2254
2425
  }
2255
2426
 
2256
- .td-body {
2257
-
2258
- }
2259
-
2260
2427
  .td-dark {
2261
2428
  background-color: #e9e9e9;
2262
2429
  }
@@ -2291,6 +2458,9 @@ SfIReporting.styles = css `
2291
2458
  .p-10{
2292
2459
  padding: 10px
2293
2460
  }
2461
+ .p-5{
2462
+ padding: 5px
2463
+ }
2294
2464
 
2295
2465
  .lds-dual-ring {
2296
2466
  display: inline-block;
@@ -2512,6 +2682,45 @@ SfIReporting.styles = css `
2512
2682
  width: 90%;
2513
2683
  margin-left: 5%;
2514
2684
  }
2685
+
2686
+ .box-large {
2687
+ height: 150px;
2688
+ width: 100%;
2689
+ background: linear-gradient(-45deg, transparent 10%, #ccc 5%, transparent 60%);
2690
+ background-size: 300%;
2691
+ background-position-x: 100%;
2692
+ animation: shimmer 1.5s infinite linear;
2693
+ margin-top: 20px;
2694
+ margin-bottom: 20px;
2695
+ }
2696
+
2697
+
2698
+ .box {
2699
+ margin-top: 20px;
2700
+ height: 10px;
2701
+ width: 100%;
2702
+ background: linear-gradient(-45deg, transparent 10%, #ccc 5%, transparent 60%);
2703
+ background-size: 300%;
2704
+ background-position-x: 100%;
2705
+ animation: shimmer 1.5s infinite linear;
2706
+ margin-bottom: 20px;
2707
+ }
2708
+
2709
+ @keyframes shimmer {
2710
+ to {
2711
+ background-position-x: 0%
2712
+ }
2713
+ }
2714
+
2715
+ .history-status {
2716
+ position: absolute;
2717
+ top:10px;
2718
+ right: 0;
2719
+ left: 0;
2720
+ margin-left: auto;
2721
+ margin-right: auto;
2722
+ width: fit-content;
2723
+ }
2515
2724
  `;
2516
2725
  __decorate([
2517
2726
  property()