pih-appointment-widget 0.0.30 → 0.0.32

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.
@@ -393,7 +393,7 @@ const AppointmentPage = _ref => {
393
393
 
394
394
  // Pagination state (Frontend only)
395
395
  const [currentPage, setCurrentPage] = (0, _react.useState)(1);
396
- const limit = 20;
396
+ const limit = 5;
397
397
 
398
398
  // Filter appointments based on search query
399
399
  const filteredAppointments = allAppointments.filter(appointment => {
@@ -615,7 +615,7 @@ const AppointmentPage = _ref => {
615
615
  return;
616
616
  }
617
617
  const joinCallUrlBase = config.joinCallUrl || _apiConfig.JOIN_CALL_URL;
618
- const joinCallUrl = response.data.token ? String(joinCallUrlBase || "").replace(/\/?$/, "/") + response.data.token : "";
618
+ const joinCallUrl = response.data.token ? String(joinCallUrlBase || "").replace(/\/?$/, "") + response.data.token : "";
619
619
  console.log("joinCallUrl", joinCallUrl);
620
620
  setCallToken(response.data.token);
621
621
  setCallUrl(joinCallUrl || '');
@@ -1561,7 +1561,9 @@ const AppointmentPage = _ref => {
1561
1561
  width: isMobile ? "100%" : "auto",
1562
1562
  display: "flex",
1563
1563
  flexDirection: "column",
1564
- minHeight: isMobile ? "400px" : 0
1564
+ minHeight: isMobile ? "400px" : 0,
1565
+ maxHeight: isMobile ? "none" : "100%",
1566
+ overflow: "hidden"
1565
1567
  }
1566
1568
  }, /*#__PURE__*/_react.default.createElement("div", {
1567
1569
  style: {
@@ -1572,7 +1574,8 @@ const AppointmentPage = _ref => {
1572
1574
  display: "flex",
1573
1575
  flexDirection: "column",
1574
1576
  flex: isMobile ? "none" : 1,
1575
- minHeight: isMobile ? "auto" : 0
1577
+ minHeight: isMobile ? "auto" : 0,
1578
+ maxHeight: isMobile ? "none" : "100%"
1576
1579
  }
1577
1580
  }, /*#__PURE__*/_react.default.createElement("div", {
1578
1581
  style: {
@@ -1631,8 +1634,13 @@ const AppointmentPage = _ref => {
1631
1634
  }
1632
1635
  }, sortOrder === "asc" ? "▲" : "▼")), !isMobile && /*#__PURE__*/_react.default.createElement("div", null, "Slot"), !isMobile && /*#__PURE__*/_react.default.createElement("div", null, "Doctor")), /*#__PURE__*/_react.default.createElement("div", {
1633
1636
  style: {
1634
- overflow: "auto",
1635
- flex: 1
1637
+ overflowY: "auto",
1638
+ overflowX: "hidden",
1639
+ flex: 1,
1640
+ minHeight: 0,
1641
+ // Keep list area scrollable even when row count is moderate (e.g. 10-12 items)
1642
+ maxHeight: isMobile ? "none" : "430px",
1643
+ WebkitOverflowScrolling: "touch"
1636
1644
  }
1637
1645
  }, tokenLoading ? /*#__PURE__*/_react.default.createElement("div", {
1638
1646
  style: {
@@ -2110,7 +2118,7 @@ const AppointmentPage = _ref => {
2110
2118
  fontSize: isMobile ? "11px" : "12px",
2111
2119
  lineHeight: "1.4"
2112
2120
  }
2113
- }, selectedAppointment?.reason || selectedAppointment?.reasonForAppointment || "No reason provided"))), (activeTab === "upcoming" || activeTab === "completed" && isWithinJoinWindow(selectedAppointment)) && /*#__PURE__*/_react.default.createElement("div", {
2121
+ }, selectedAppointment?.reason || selectedAppointment?.reasonForAppointment || "No reason provided"))), (activeTab === "upcoming" || activeTab === "completed") && /*#__PURE__*/_react.default.createElement("div", {
2114
2122
  style: {
2115
2123
  display: "flex",
2116
2124
  flexDirection: isMobile ? "column" : "row",
@@ -2347,7 +2355,7 @@ const AppointmentPage = _ref => {
2347
2355
  }, /*#__PURE__*/_react.default.createElement("iframe", {
2348
2356
  src: (() => {
2349
2357
  if (!callToken) return "";
2350
- const base = String(joinCallUrlBase || "").replace(/\/?$/, "/");
2358
+ const base = String(joinCallUrlBase || "");
2351
2359
  return `${base}${callToken}`;
2352
2360
  })(),
2353
2361
  style: {
@@ -2459,21 +2467,14 @@ const AppointmentPage = _ref => {
2459
2467
  color: "#1a1a1a",
2460
2468
  margin: "0 0 8px 0"
2461
2469
  }
2462
- }, tokenError ? "Not authorised" : "Sign in required"), /*#__PURE__*/_react.default.createElement("p", {
2470
+ }, "Access Denied"), /*#__PURE__*/_react.default.createElement("p", {
2463
2471
  style: {
2464
2472
  fontSize: "14px",
2465
2473
  color: "#666",
2466
2474
  margin: 0,
2467
2475
  lineHeight: 1.5
2468
2476
  }
2469
- }, authErrorMessage), /*#__PURE__*/_react.default.createElement("p", {
2470
- style: {
2471
- fontSize: "13px",
2472
- color: "#999",
2473
- marginTop: "16px",
2474
- marginBottom: 0
2475
- }
2476
- }, "Redirecting to login..."))));
2477
+ }, "You do not have permission to access Afiya Pro. Please contact administrator for assistance."))));
2477
2478
  }
2478
2479
  return /*#__PURE__*/_react.default.createElement(AppointmentErrorBoundary, null, content);
2479
2480
  };
@@ -29,5 +29,5 @@ const DEFAULT_PARAMS = exports.DEFAULT_PARAMS = {
29
29
  const REQUEST_TIMEOUT = exports.REQUEST_TIMEOUT = 10000;
30
30
 
31
31
  // Join call URL (will be dynamic from auth API later)
32
- const JOIN_CALL_URL = exports.JOIN_CALL_URL = "https://wbafedevittisalwe01-had2b3e0a7h6fyey.westeurope-01.azurewebsites.net/call/";
33
- const WEB_URL = exports.WEB_URL = "https://wbaemrdevittisalwe01-fnapdpfme7bvduhh.westeurope-01.azurewebsites.net/";
32
+ const JOIN_CALL_URL = exports.JOIN_CALL_URL = "https://ittisalqa.powermindinc.com/call?token=";
33
+ const WEB_URL = exports.WEB_URL = "https://afiyaproqa.powermindinc.com/";