Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "dparizek"

I have a JS delete function that works fine:

vm.deleteIssue = function (issue) {
                abp.message.confirm(
                    app.localize('IssueDeleteWarningMessage', issue.id, issue.label),
                    function (isConfirmed) {
                        if (isConfirmed) {
                            issueService.deleteIssue({
                                id: issue.id
                            }).then(function () {
                                vm.getIssues();
                                abp.notify.success(app.localize('SuccessfullyDeleted'));
                            });
                        }
                    }
                );
            };

and now I am trying to add a way to delete multiple items at once:

vm.bulkDeleteIssues = function () {
                abp.message.confirm(
                    app.localize('BulkDeleteWarningMessage'),
                    function (isConfirmed) {
                        if (isConfirmed) {
                            vm.selectedIssues = $scope.gridApi.selection.getSelectedRows();
                            var issueIds = [];
                            for (var index in vm.selectedIssues) {
                                issueIds.push(vm.selectedIssues[index].id);
                            }
                            console.log("issueIds:");
                            console.log(issueIds);
                            issueService.bulkDeleteIssues({
                                ids: issueIds
                            }).then(function () {
                                vm.getIssues();
                                abp.notify.success(app.localize('SuccessfullyDeleted'));
                            });
                        }
                    }
                );
            };

my app service has this:

public async Task BulkDeleteIssues(EntityDto[] ids)
        {
            foreach (EntityDto id in ids)
            {
                await DeleteIssue(id);
            }
        }

How should I best package the array of id's that I want to delete? In the case above I get back a 400 Bad Request:

angular.js:12433 POST http://localhost:6240/api/services/app/issue/BulkDeleteIssues 400 (Bad Request)
(anonymous) @ angular.js:12433
sendReq @ angular.js:12178
serverRequest @ angular.js:11930
processQueue @ angular.js:16689
(anonymous) @ angular.js:16733
$eval @ angular.js:18017
$digest @ angular.js:17827
(anonymous) @ angular.js:18056
completeOutstandingRequest @ angular.js:6131
(anonymous) @ angular.js:6411
setTimeout (async)
Browser.self.defer @ angular.js:6409
$evalAsync @ angular.js:18054
(anonymous) @ angular.js:16561
scheduleProcessQueue @ angular.js:16733
then @ angular.js:16658
chainInterceptors @ angular.js:11858
$http @ angular.js:11845
bulkDeleteIssues @ GetAll?type=angular&v=636403114446312803:85
(anonymous) @ index.js:230
(anonymous) @ abp.sweet-alert.js:99
T @ sweet-alert.min.js:1
abp.js:350 ERROR: 
abp.js:350 {code: 0, message: "Your request is not valid!", details: "The following errors were detected during validation.
↵ - 
↵", validationErrors: Array(1)}

and I am unsure how to debug what is happening during validation. Also tried with a list on the server side... public async Task BulkDeleteIssues(List<EntityDto> ids)

I imagine I am doing something really stupid and not understanding how it works to go from JS to server side code?

Any advice for this newbie appreciated!

If I npm start in development, my app works great. If I ng build -prod then I get the following errors... suggestions?

PS C:\Code\Research1\angular\nswag> ng build -prod
 26% building modules 135/135 modules 0 activeTemplate parse warnings:
The <template> element is deprecated. Use <ng-template> instead ("
[WARNING ->]<template [ngIf]="!isClosed">
  <div [class]="'alert alert-' + type" role="alert" [ngClass]="classes""): ng:///C:/Code/Research1/angular/node_modules/
ngx-bootstrap/alert/alert.component.d.ts.AlertComponent.html@1:0           29% building modules 161/163 modules 2 active
 ...de\Research1\angular\src\polyfills.tsThe final argument to magicString.overwrite(...) should be an options object. S
ee https://github.com/rich-harrisHash: 2039610d45e09eed3b23
Time: 106219ms
chunk    {0} 0.fd9ea3ad528147ac00b5.chunk.js (common) 58.3 kB {1} {2} {3} {4} {5} {6} {7} [rendered]
chunk    {1} 1.35dbaabb3626bd7f599d.chunk.js 1.05 MB {2} {3} {6} [rendered]
chunk    {2} 2.0b6658237ace649389ef.chunk.js 2.24 MB {1} {3} {6} [rendered]
chunk    {3} 3.35f1e54efdcd2da9e9f1.chunk.js 528 kB {1} {2} {6} [rendered]
chunk    {4} polyfills.4657b8654ff149057557.bundle.js (polyfills) 276 kB {9} [initial] [rendered]
chunk    {5} scripts.216b44209a346e669e21.bundle.js (scripts) 3.36 MB {9} [initial] [rendered]
chunk    {6} main.24688bf8e6a4de469eb9.bundle.js (main) 1.32 MB {8} [initial] [rendered]
chunk    {7} styles.28046069b1f9a44a8998.bundle.css (styles) 1.24 kB {9} [initial] [rendered]
chunk    {8} vendor.948d8c386c1050722ad7.bundle.js (vendor) 4.91 MB [initial] [rendered]
chunk    {9} inline.bf4215265e0dd9ebb701.bundle.js (inline) 0 bytes [entry] [rendered]

ERROR in ng:///C:/Code/Research1/angular/src/app/admin/demo-ui-components/demo-ui-selection.component.html (29,60): Expe
cted 1 arguments, but got 0.

ERROR in ng:///C:/Code/Research1/angular/src/app/admin/demo-ui-components/demo-ui-selection.component.html (52,60): Expe
cted 1 arguments, but got 0.

ERROR in ng:///C:/Code/Research1/angular/src/app/admin/demo-ui-components/demo-ui-selection.component.html (29,60): Expe
cted 1 arguments, but got 0.

ERROR in ng:///C:/Code/Research1/angular/src/app/admin/demo-ui-components/demo-ui-selection.component.html (52,60): Expe
cted 1 arguments, but got 0.

Actually I have jTable example CRUD now finally working for an issue tracker app. At least for basic fields, still need add in User better, and connect in Actions on Issues. I think this would make a great tutorial / learning app. I volunteer to write an extensive tutorial and contribute the code back to AspNetZero examples github repo if ANZ developers will review it and suggest changes for best practice - because I am probably not doing it the best way. And ANZ developers might also need to answer a question or two offline via email for me to get it done... else then such a tutorial could make it a lot easier for future newbies (-:

Would there be interest in that?

I would like to bring attention to this request once again. Between Boilerplate, Module Zero, and AspNet Zero -and given the examples generally use custom DTO's (e.g. Users) and Managers inherited from ABP, and simple Dto's versus FullAuditedEntity DTO's, Stores??? where Stores documented??? etc etc etc. -- the level of complexity and different ways to do it is a lot for a newbie to handle.

I cannot get a simple CRUD app using jTables up and going - something like the Users jTable pages but that doesn't have to have a UserManager and what is UserStore?? and Roles, Editions same complexity. Granted I am C# and ASP.NET newbie, but I have many years experience with Django/Django REST Framework/ Angular 1 successfully building significant web apps. More tutorials and documentation is needed more than more new ANZ features.

And while the Users/Roles etc examples are complex, they also don't show how to connect in those things.

So this is what is needed:

jTable views like with User - of a ToDo app. ToDo should NOT connect to new Persons model, but instead to real, authenticated application Users. Full audited entities should be used. Then show how to use CreateOrEdit modals to get full CRUD, including Update, of ToDo items that include the User who created them. Show how to use FullAudited Dtos too - Users/Roles/Editions don't even use the FullAudited functionality, right?

@ alirizaadiyahsi Thank you!

I am trying to work through the Zero code to learn. If I am in the Application project, for example, in the Auditing folder, viewing the AuditLogListDto.cs file, and I see it is using Abp.Auditing -- how would I got about seeing Abp.Auditing from within the solution in Visual Studio? or where would I look? So that I can go look at how the underling AuditLog model is structured?

sorry if this is a dumb question, I am new to Microsoft ASP.NET and Visual Studio world.

So issue fixed to make it fully open in VS. When I try to do next step:

C:\Code\Research1\aspnet-core\src\Research1.EntityFramework>dotnet ef database update The specified framework 'Microsoft.NETCore.App', version '1.1.0' was not found.

  • Check application dependencies and target a framework version installed at: C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App
  • The following versions are installed: 1.0.1 1.1.0-preview1-001100-00
  • Alternatively, install the framework version '1.1.0'.

more issues... where would I specify 1.0.1 instead of 1.1.0? or specify a preview release instead of 1.1.1 straight up?

sigh.

More info in case others have the same issue:

<a class="postlink" href="https://github.com/aspnet/Tooling/blob/master/known-issues-vs2015.md#missing-sdk">https://github.com/aspnet/Tooling/blob/ ... issing-sdk</a>

Helps a ton! Thanks!!

When I try to open the Angular 2 server solution in Visual Studio 2015 on a Windows 10 machine, I get this. So I uninstalled .NET Core SDK and reinstalled latest version (1.0.1) from here: <a class="postlink" href="https://www.microsoft.com/net/core#windowsvs2015">https://www.microsoft.com/net/core#windowsvs2015</a>

Any ideas? Anyone else run into this?

Showing 41 to 50 of 71 entries