@topconsultnpm/sdkui-react 6.19.0-dev1.11 → 6.19.0-dev1.12

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.
@@ -709,7 +709,12 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
709
709
  const executeManyToManyPairing = async (relation, isPairing) => {
710
710
  const searchEngine = SDK_Globals.tmSession?.NewSearchEngine();
711
711
  if (!focusedItem?.TID || !focusedItem?.DID) {
712
- alert("Seleziona un documento per eseguire la ricerca molti-a-molti.");
712
+ ShowAlert({
713
+ message: "Nessun documento selezionato per l'operazione molti-a-molti.",
714
+ mode: 'warning',
715
+ title: 'Operazione molti-a-molti',
716
+ duration: 5000
717
+ });
713
718
  return;
714
719
  }
715
720
  setSelectedManyToManyRelation(relation);
@@ -721,7 +726,12 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
721
726
  qd = relation.retrieveDetailsQuery;
722
727
  }
723
728
  if (!qd) {
724
- alert("La relazione molti-a-molti selezionata non ha una query di ricerca definita.");
729
+ ShowAlert({
730
+ message: "Nessuna query di recupero associata alla relazione molti-a-molti.",
731
+ mode: 'warning',
732
+ title: 'Operazione molti-a-molti',
733
+ duration: 5000
734
+ });
725
735
  return;
726
736
  }
727
737
  qd = structuredClone(qd);
@@ -821,7 +831,12 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
821
831
  }
822
832
  const sq = await searchEngine.SearchByIDAsync(qdWithSystemMIDs);
823
833
  if (!sq?.dtdResult?.rows || sq.dtdResult.rows.length === 0) {
824
- alert("Nessun documento trovato.");
834
+ ShowAlert({
835
+ message: "Nessun documento trovato.",
836
+ mode: 'warning',
837
+ title: 'Operazione molti-a-molti',
838
+ duration: 5000
839
+ });
825
840
  return;
826
841
  }
827
842
  const pairedDIDs = await getAlreadyPairedDIDs(relation, focusedItem.TID, focusedItem.DID);
@@ -845,7 +860,12 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
845
860
  dcmtsFound: filteredRows.length
846
861
  };
847
862
  if (filteredRows.length === 0) {
848
- alert(isPairing ? "Nessun documento da abbinare." : "Nessun documento abbinato trovato.");
863
+ ShowAlert({
864
+ message: isPairing ? "Nessun documento da abbinare." : "Nessun documento abbinato trovato.",
865
+ mode: 'warning',
866
+ title: 'Operazione molti-a-molti',
867
+ duration: 5000
868
+ });
849
869
  return;
850
870
  }
851
871
  console.log(filteredSq);
@@ -860,12 +880,22 @@ const TMSearchResult = ({ context = SearchResultContext.METADATA_SEARCH, isVisib
860
880
  if (!relations)
861
881
  return;
862
882
  if (!relations.some(r => r.relationType === RelationTypes.ManyToMany)) {
863
- alert("Nessuna relazione molti-a-molti definita nel sistema.");
883
+ ShowAlert({
884
+ message: "Nessuna relazione molti-a-molti definita nel sistema.",
885
+ mode: 'warning',
886
+ title: 'Operazione molti-a-molti',
887
+ duration: 5000
888
+ });
864
889
  return;
865
890
  }
866
891
  const manyToManyRels = relations.filter(r => r.relationType === RelationTypes.ManyToMany);
867
892
  if (!manyToManyRels.some(r => r.masterTID === selectedSearchResult?.fromTID || r.detailTID === selectedSearchResult?.fromTID)) {
868
- alert("Nessuna relazione molti-a-molti definita per il tipo di documento selezionato.");
893
+ ShowAlert({
894
+ message: "Nessuna relazione molti-a-molti definita per il tipo di documento selezionato.",
895
+ mode: 'warning',
896
+ title: 'Operazione molti-a-molti',
897
+ duration: 5000
898
+ });
869
899
  return;
870
900
  }
871
901
  const relsManyToMany = manyToManyRels.filter(r => r.masterTID === selectedSearchResult?.fromTID || r.detailTID === selectedSearchResult?.fromTID);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topconsultnpm/sdkui-react",
3
- "version": "6.19.0-dev1.11",
3
+ "version": "6.19.0-dev1.12",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",