Skip to content

Commit

Permalink
Merge pull request #131 from Vizzuality/fix/delete-datasets
Browse files Browse the repository at this point in the history
Fix/delete datasets
  • Loading branch information
mluena authored Sep 16, 2024
2 parents 45c09f6 + 22b3e8d commit 8f4462a
Show file tree
Hide file tree
Showing 9 changed files with 705 additions and 2 deletions.
1 change: 1 addition & 0 deletions client/src/containers/collaborators/form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ export default function CollaboratorForm() {
.then((data) => {
form.setValue("image", data[0].id);
setImageId(data[0].id);
toast.success(`Image ${data?.[0].name} uploaded successfully`);
})
.catch((error) => {
console.error("Error uploading image:", error[0]?.message);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"key": "plugin_content_manager_configuration_content_types::api::objective.objective",
"value": {
"uid": "api::objective.objective",
"settings": {
"bulkable": true,
"filterable": true,
"searchable": true,
"pageSize": 10,
"mainField": "type",
"defaultSortBy": "type",
"defaultSortOrder": "ASC"
},
"metadatas": {
"id": {
"edit": {},
"list": {
"label": "id",
"searchable": true,
"sortable": true
}
},
"type": {
"edit": {
"label": "type",
"description": "",
"placeholder": "",
"visible": true,
"editable": true
},
"list": {
"label": "type",
"searchable": true,
"sortable": true
}
},
"createdAt": {
"edit": {
"label": "createdAt",
"description": "",
"placeholder": "",
"visible": false,
"editable": true
},
"list": {
"label": "createdAt",
"searchable": true,
"sortable": true
}
},
"updatedAt": {
"edit": {
"label": "updatedAt",
"description": "",
"placeholder": "",
"visible": false,
"editable": true
},
"list": {
"label": "updatedAt",
"searchable": true,
"sortable": true
}
},
"createdBy": {
"edit": {
"label": "createdBy",
"description": "",
"placeholder": "",
"visible": false,
"editable": true,
"mainField": "firstname"
},
"list": {
"label": "createdBy",
"searchable": true,
"sortable": true
}
},
"updatedBy": {
"edit": {
"label": "updatedBy",
"description": "",
"placeholder": "",
"visible": false,
"editable": true,
"mainField": "firstname"
},
"list": {
"label": "updatedBy",
"searchable": true,
"sortable": true
}
}
},
"layouts": {
"list": [
"id",
"createdAt",
"updatedAt",
"type"
],
"edit": [
[
{
"name": "type",
"size": 6
}
]
]
}
},
"type": "object",
"environment": null,
"tag": null
}
19 changes: 19 additions & 0 deletions cms/src/api/objective/content-types/objective/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"kind": "collectionType",
"collectionName": "objectives",
"info": {
"singularName": "objective",
"pluralName": "objectives",
"displayName": "Objective",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"type": {
"type": "string"
}
}
}
7 changes: 7 additions & 0 deletions cms/src/api/objective/controllers/objective.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* objective controller
*/

import { factories } from '@strapi/strapi'

export default factories.createCoreController('api::objective.objective');
Loading

0 comments on commit 8f4462a

Please sign in to comment.