myprojectpackageprav
Version:
My package in npm
107 lines • 10.5 kB
JavaScript
import React, { useState } from "react";
import Buttons from "../../../components/buttons/buttons";
import { POCdata } from './pointsofcontact-data';
import InputText from "../../../utils/controls/input-text";
import InputSelect from "../../../utils/controls/input-select";
var PointsofContact = function () {
var _a = useState(false), showAddPopup = _a[0], setshowAddPopup = _a[1];
var _b = useState(false), showedit = _b[0], setshowedit = _b[1];
var listItems = POCdata.map(function (links) {
return React.createElement(React.Fragment, null,
React.createElement("li", { tabIndex: 0, "aria-live": "polite", className: "border-radius my-2 p-relative list-type-none bordered1 whitebg" },
React.createElement("div", { className: "d-flex flex-row flex-lg-row align-items-center justify-content-lg-between w-100 flex-wrap settingPoc py-2 px-3" },
React.createElement("div", { className: "my-1 col-12 Name" },
React.createElement("div", { className: "subtitle-color font12 montserratSemibold pb-1" }, links.titlelabel),
React.createElement("div", { className: "darktext font12 montserratSemibold" }, links.title)),
React.createElement("div", { className: "dividerdashed vertical mx-2 d-none d-lg-block" }),
React.createElement("div", { className: "my-1 col-12 PhoneNumber" },
React.createElement("div", { className: "subtitle-color font12 montserratSemibold pb-1" }, links.phonelabel),
React.createElement("div", { className: "darktext font12 montserratSemibold" }, links.phone)),
React.createElement("div", { className: "dividerdashed vertical mx-2 d-none d-lg-block" }),
React.createElement("div", { className: "my-1 col-12 Modified" },
React.createElement("div", { className: "subtitle-color font12 montserratSemibold pb-1" }, links.modifiedlabel),
React.createElement("div", { className: "darktext font12 montserratSemibold" }, links.modifiedcontent)),
React.createElement("div", { className: "dividerdashed vertical mx-2 d-none d-lg-block" }),
React.createElement("div", { className: "my-1 col-12 IsArchived" },
React.createElement("div", { className: "subtitle-color font12 montserratSemibold pb-1" }, links.archivedlabel),
React.createElement("div", { className: "darktext font12 montserratSemibold" }, links.archivedcontent)),
React.createElement("div", { className: "dividerdashed vertical mx-2 d-none d-lg-block" }),
React.createElement("div", { className: "d-flex align-items-center col-12 Actions flex-wrap me-2" },
React.createElement(Buttons, { label: "Edit", className: 'btn-sm sourcesansprosemibold font12 btn-bgcolor10 title-color1 border-radius text-uppercase text-nowrap my-1 mx-2', icon: "icon-pencil font-10 pe-1", type: "button", onClick: function () {
setshowedit(true);
setshowAddPopup(false);
} }),
React.createElement(Buttons, { label: "Delete", className: 'btn-sm sourcesansprosemibold font12 btn-bgcolor10 title-color1 border-radius text-uppercase text-nowrap my-1 mx-2', icon: "icon-trashbin font-10 pe-1", type: "button" }))),
showedit ? (React.createElement("div", { className: "settingseditpopup w-100 position-relative p-3 mb-3 bordered0 border-top " },
React.createElement("div", { className: "row" },
React.createElement("div", { className: "col-sm-12 col-lg-4 mb-2" },
React.createElement(InputText, { inputProps: {
id: " PointsofContact ",
name: " Points of Contact ",
placeholder: "Enter Name or email address..",
className: "latomedium font13 darktext mb-2",
}, label: " Points of Contact ", isMandatory: true, infoClassName: "tool-tip tooltip-top", info: " Points of Contact ", infoIcon: "icon-info", isInfo: true, type: "peopel-picker", formClassName: "d-flex flex-column" })),
React.createElement("div", { className: "col-sm-12 col-lg-4 mb-2" },
React.createElement(InputText, { inputProps: {
id: "PhoneNumber",
name: " Phone Number ",
placeholder: "Enter Phone Number",
className: "latomedium font13 darktext mb-2",
}, label: " Phone Number", infoClassName: "tool-tip tooltip-top font12 p-1", info: "Phone Number", infoIcon: "icon-info", isInfo: true, formClassName: "d-flex flex-column" })),
React.createElement("div", { className: "col-sm-12 col-lg-4 mb-2" },
React.createElement(InputSelect, { inputProps: {
id: "IsArchived ",
name: " Is Archived ",
className: "latomedium font13 darktext mb-2",
}, label: "Is Archived ", infoClassName: "tool-tip tooltip-top font12 p-1", info: "Is Archived ", infoIcon: "icon-info", isInfo: true, formClassName: "d-flex flex-column" }))),
React.createElement("div", { className: "d-flex py-1 flex-wrap" },
React.createElement("div", { className: "ms-auto settingsbtns d-flex" },
React.createElement(Buttons, { label: "Update", className: "border-radius py-1 px-2 btn-bgcolor11 ms-2 whitetext montserratbold font12 text-uppercase btn-xs", icon: "icon-update font-11 pe-1", type: "button" }),
React.createElement(Buttons, { label: "Cancel", className: "py-1 px-2 border-radius btn-border1 ms-2 montserratbold font12 text-uppercase btn-xs", icon: "icon-close color-primary font-9 pe-1", type: "button", onClick: function () {
setshowedit(false);
} }))))) : ("")));
});
return (React.createElement(React.Fragment, null,
React.createElement("div", { className: "mb-2 d-flex align-items-center bgcolor-primary px-2 py-1 whitetext border-radius1 " },
React.createElement("div", { className: "d-flex align-items-center py-2" },
React.createElement("h2", { tabIndex: 0, "aria-label": ' Points of Contact', className: "font-14 d-flex align-items-center" },
" ",
React.createElement("span", { className: "icon-adduser font-12 pe-2" }),
" Points of Contact")),
React.createElement("div", { className: 'ms-auto' },
React.createElement(Buttons, { label: "Add", className: "btn-xs montserratBold font12 text-uppercase text-color1 addbtn border-radius px-2", icon: "icon-add font-10 pe-1", type: "button", onClick: function () {
setshowAddPopup(!showAddPopup);
} }))),
showAddPopup ? (React.createElement("div", { className: "settingsaddpopup w-100 my-2 border-radius whitebg d-inline-block bordered1" },
React.createElement("div", { className: "p-3 border-bottom1 " },
React.createElement("h4", { className: "m-0 p-0 d-inline-block font15 montserratSemibold textcolor4 text-uppercase" },
React.createElement("span", { tabIndex: 0, "aria-label": "Add Points Of Contact" }, "Add Points Of Contact"))),
React.createElement("div", { className: "px-3 py-1" },
React.createElement("div", { className: "row" },
React.createElement("div", { className: "col-sm-12 col-lg-6 mb-2" },
React.createElement(InputText, { inputProps: {
id: " PointsofContact ",
name: " Points of Contact ",
placeholder: "Enter Name or email address..",
className: "latomedium font13 darktext mb-2",
}, label: " Points of Contact ", isMandatory: true, infoClassName: "tool-tip tooltip-top", info: " Points of Contact ", infoIcon: "icon-info", isInfo: true, type: "peopel-picker", formClassName: "d-flex flex-column" })),
React.createElement("div", { className: "col-sm-12 col-lg-6 mb-2" },
React.createElement(InputText, { inputProps: {
id: "PhoneNumber",
name: " Phone Number ",
placeholder: "Enter Phone Number",
className: "latomedium font13 darktext mb-2",
}, label: " Phone Number", infoClassName: "tool-tip tooltip-top font12 p-1", info: "Phone Number", infoIcon: "icon-info", isInfo: true, formClassName: "d-flex flex-column" }))),
React.createElement("div", { className: " d-flex py-1 flex-wrap" },
React.createElement("div", { className: "ms-auto settingsbtns d-flex" },
React.createElement(Buttons, { label: "Save", className: "border-radius py-1 px-2 btn-bgcolor9 ms-2 whitetext montserratbold font12 text-uppercase btn-xs", icon: "icon-save font-11 pe-1", type: "button" }),
React.createElement(Buttons, { label: "Cancel", className: "py-1 px-2 border-radius bordered ms-2 montserratbold font12 text-uppercase btn-xs", icon: "icon-close color-primary font-9 pe-1", type: "button", onClick: function () {
setshowAddPopup(false);
} })))))) : (""),
React.createElement("div", { className: "py-0" },
React.createElement("div", { className: "" },
React.createElement("div", { className: "list w-100" },
React.createElement("ul", { className: "m-0 p-0" }, listItems))))));
};
export default PointsofContact;
//# sourceMappingURL=pointsofcontact.js.map