@visns-studio/visns-components 2.8.3 → 2.8.5

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.
@@ -126,7 +126,15 @@ function GenericDetail({ setting, urlParam, userProfile }) {
126
126
  };
127
127
 
128
128
  const renderValue = (item, data) => {
129
- const { type, id, relation, relationKey, size, truncateLength } = item;
129
+ const {
130
+ type,
131
+ id,
132
+ options,
133
+ relation,
134
+ relationKey,
135
+ size,
136
+ truncateLength,
137
+ } = item;
130
138
  const value =
131
139
  relation && relation.length > 0
132
140
  ? getValueFromData(data, [...relation], id)
@@ -198,6 +206,8 @@ function GenericDetail({ setting, urlParam, userProfile }) {
198
206
 
199
207
  const renderLatestNotes = () => formatNoteValue();
200
208
 
209
+ const renderOptions = () => (options ? options[value] : '');
210
+
201
211
  const renderRichText = () => {
202
212
  if (!truncatedValue) {
203
213
  return null;
@@ -232,6 +242,8 @@ function GenericDetail({ setting, urlParam, userProfile }) {
232
242
  return renderJson();
233
243
  case 'latest_notes':
234
244
  return renderLatestNotes();
245
+ case 'options':
246
+ return renderOptions();
235
247
  case 'richtext':
236
248
  return renderRichText();
237
249
  case 'total':
@@ -550,28 +562,6 @@ function GenericDetail({ setting, urlParam, userProfile }) {
550
562
  case 'overview':
551
563
  return (
552
564
  <>
553
- {activeTabConfig.form && (
554
- <div className="gridactions">
555
- <ul>
556
- <li>
557
- <button
558
- className="btn"
559
- onClick={() =>
560
- modalOpen(
561
- 'update',
562
- routeParams[
563
- urlParam
564
- ]
565
- )
566
- }
567
- >
568
- Edit
569
- </button>
570
- </li>
571
- </ul>
572
- </div>
573
- )}
574
-
575
565
  <div className="gridtxt">
576
566
  {activeTabConfig.sections.map(
577
567
  (section, sectionIndex) => (
@@ -619,6 +609,21 @@ function GenericDetail({ setting, urlParam, userProfile }) {
619
609
  )
620
610
  )}
621
611
  </div>
612
+ {activeTabConfig.form && (
613
+ <div className="polActions">
614
+ <button
615
+ className="btn"
616
+ onClick={() =>
617
+ modalOpen(
618
+ 'update',
619
+ routeParams[urlParam]
620
+ )
621
+ }
622
+ >
623
+ Edit
624
+ </button>
625
+ </div>
626
+ )}
622
627
  </>
623
628
  );
624
629
  case 'table':
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "akar-icons": "^1.9.30",
6
6
  "array-move": "^4.0.0",
7
7
  "awesome-debounce-promise": "^2.1.0",
8
- "axios": "^1.6.1",
8
+ "axios": "^1.6.2",
9
9
  "framer-motion": "^10.16.5",
10
10
  "html-react-parser": "^5.0.6",
11
11
  "lodash": "^4.17.21",
@@ -33,7 +33,7 @@
33
33
  "reactjs-popup": "^2.0.6",
34
34
  "truncate": "^3.0.0",
35
35
  "validator": "^13.11.0",
36
- "yarn": "^1.22.19"
36
+ "yarn": "^1.22.21"
37
37
  },
38
38
  "devDependecies": {
39
39
  "react": "^18.2.0",
@@ -44,7 +44,7 @@
44
44
  "react-dom": "^17.0.1"
45
45
  },
46
46
  "name": "@visns-studio/visns-components",
47
- "version": "2.8.3",
47
+ "version": "2.8.5",
48
48
  "description": "Various packages to assist in the development of our Custom Applications.",
49
49
  "main": "index.js",
50
50
  "scripts": {