Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TNO-2501 Fix My Folders #1753

Merged
merged 1 commit into from
Apr 25, 2024
Merged

TNO-2501 Fix My Folders #1753

merged 1 commit into from
Apr 25, 2024

Conversation

Fosol
Copy link
Collaborator

@Fosol Fosol commented Apr 25, 2024

Fixed bug where content was being removed from folder when the folder schedule was updated.

Summary

  • Publish tno-core:0.1.55
  • Update Subscriber app

My Folders

image

@Fosol Fosol added bug Something isn't working subscriber PR contains changes towards the subscriber application, tno-core update Indicates that there have been changes to our tno-core package, which can pose concurrency issues. labels Apr 25, 2024
@Fosol Fosol self-assigned this Apr 25, 2024
Publish tno-core:0.1.55
/// <returns></returns>
[HttpPut("{id}")]
[Produces(MediaTypeNames.Application.Json)]
[ProducesResponseType(typeof(FolderModel), (int)HttpStatusCode.OK)]
[ProducesResponseType(typeof(ErrorResponseModel), (int)HttpStatusCode.BadRequest)]
[SwaggerOperation(Tags = new[] { "Folder" })]
public IActionResult Update(FolderModel model)
public IActionResult Update(FolderModel model, bool updateContent = false)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this flag to allow us to update a folder without touching the content in it.

@@ -51,6 +51,10 @@ export const ConfigureFolder: React.FC<IConfigureFolderProps> = ({ active }) =>
if (myFolders.length) setInit(true);
}, [myFolders.length]);

React.useEffect(() => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdtoombs This is how a passed prop can update state.

@@ -122,7 +126,7 @@ export const ConfigureFolder: React.FC<IConfigureFolderProps> = ({ active }) =>
const handleSaveFolder = React.useCallback(
async (values: IFolderModel) => {
try {
const result = await updateFolder(values);
const result = await updateFolder(values, false);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't touch the content!

@Fosol Fosol merged commit c69b74e into bcgov:dev Apr 25, 2024
3 checks passed
@Fosol Fosol deleted the tno-2501 branch April 25, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working subscriber PR contains changes towards the subscriber application, tno-core update Indicates that there have been changes to our tno-core package, which can pose concurrency issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant