Code2Gether-Discord / Congo

Generic web store learning project that consists of three ASP.NET Core projects
https://code2gether-congo.azurewebsites.net/
11 stars 2 forks source link

As a product seller, I want to be able to add a product for sale #5

Open pobiega opened 3 years ago

pobiega commented 3 years ago

User story

as a product seller, I want to be able to add a product for sale

Create issues for each identified task breakdown and link to this issue.

henry-js commented 2 years ago

So this is complete now yes?

valincius commented 2 years ago

So this is complete now yes?

Not yet, this is a "user story" issue, which we're using to track a set of issues. This story is for adding products, right now we've got the actions and database entities for the products, but we're missing the frontend part of this. The Blazor app needs to be updated to add the product now.

henry-js commented 2 years ago

The Blazor App can add a product and the seller gets a snackbar notification. What is the desired functionality after a product has been added?

    private async Task AddProduct()
    {

        var product = await sellerClient.CreateProduct(Product);

        if (product.IsSuccessStatusCode) snackBar.Add("New Product successfully added!", Severity.Success);// show a success message
        else snackBar.Add("There was a problem processing this request!", Severity.Error);

        StateHasChanged();
        //ToDO : Add logic to return the Guid to the DialogBox
        System.Diagnostics.Debug.Write(product.ToString());
    }

I'm guessing the dialog box should be displayed automatically and then refresh the screen when dismissed to clear form inputs? In that case, do we not need the successful snackbar notification? image

valincius commented 2 years ago

@henry-js I think the notifications make sense