Added select all images/docs buttons IO-410
This commit is contained in:
@@ -8711,6 +8711,48 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>selectallimages</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>selectallotherdocuments</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
</children>
|
||||
</folder_node>
|
||||
<folder_node>
|
||||
|
||||
@@ -68,8 +68,6 @@ export function JobsChangeStatus({ job, bodyshop, jobRO }) {
|
||||
}
|
||||
}, [job, setAvailableStatuses, bodyshop]);
|
||||
|
||||
console.log("availableStatuses", availableStatuses);
|
||||
console.log("otherStages", otherStages);
|
||||
const statusmenu = (
|
||||
<Menu
|
||||
onClick={(e) => {
|
||||
|
||||
@@ -11,24 +11,54 @@ export default function JobsDocumentsGallerySelectAllComponent({
|
||||
const handleSelectAll = () => {
|
||||
setGalleryImages({
|
||||
...galleryImages,
|
||||
other: galleryImages.other.map((i) => {
|
||||
return { ...i, isSelected: true };
|
||||
}),
|
||||
images: galleryImages.images.map((i) => {
|
||||
return { ...i, isSelected: true };
|
||||
}),
|
||||
});
|
||||
};
|
||||
const handleSelectAllImages = () => {
|
||||
setGalleryImages({
|
||||
...galleryImages,
|
||||
|
||||
images: galleryImages.images.map((i) => {
|
||||
return { ...i, isSelected: true };
|
||||
}),
|
||||
});
|
||||
};
|
||||
const handleSelectAllDocuments = () => {
|
||||
setGalleryImages({
|
||||
...galleryImages,
|
||||
other: galleryImages.other.map((i) => {
|
||||
return { ...i, isSelected: true };
|
||||
}),
|
||||
});
|
||||
};
|
||||
const handleDeselectAll = () => {
|
||||
setGalleryImages({
|
||||
...galleryImages,
|
||||
other: galleryImages.other.map((i) => {
|
||||
return { ...i, isSelected: false };
|
||||
}),
|
||||
images: galleryImages.images.map((i) => {
|
||||
return { ...i, isSelected: false };
|
||||
}),
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button onClick={handleSelectAll}>
|
||||
{t("general.actions.selectall")}
|
||||
</Button>
|
||||
<Button onClick={handleSelectAllImages}>
|
||||
{t("documents.actions.selectallimages")}
|
||||
</Button>
|
||||
<Button onClick={handleSelectAllDocuments}>
|
||||
{t("documents.actions.selectallotherdocuments")}
|
||||
</Button>
|
||||
<Button onClick={handleDeselectAll}>
|
||||
{t("general.actions.deselectall")}
|
||||
</Button>
|
||||
|
||||
@@ -575,7 +575,9 @@
|
||||
"documents": {
|
||||
"actions": {
|
||||
"delete": "Delete Selected Documents",
|
||||
"download": "Download Selected Documents"
|
||||
"download": "Download Selected Documents",
|
||||
"selectallimages": "Select All Images",
|
||||
"selectallotherdocuments": "Select All Other Documents"
|
||||
},
|
||||
"errors": {
|
||||
"deletes3": "Error deleting document from storage. ",
|
||||
|
||||
@@ -575,7 +575,9 @@
|
||||
"documents": {
|
||||
"actions": {
|
||||
"delete": "",
|
||||
"download": ""
|
||||
"download": "",
|
||||
"selectallimages": "",
|
||||
"selectallotherdocuments": ""
|
||||
},
|
||||
"errors": {
|
||||
"deletes3": "Error al eliminar el documento del almacenamiento.",
|
||||
|
||||
@@ -575,7 +575,9 @@
|
||||
"documents": {
|
||||
"actions": {
|
||||
"delete": "",
|
||||
"download": ""
|
||||
"download": "",
|
||||
"selectallimages": "",
|
||||
"selectallotherdocuments": ""
|
||||
},
|
||||
"errors": {
|
||||
"deletes3": "Erreur lors de la suppression du document du stockage.",
|
||||
|
||||
Reference in New Issue
Block a user