Base solution for your next web application

Activities of "rucksackdigital"

Looks to have been opened by @KevinFarrow already, https://github.com/aspnetzero/aspnet-zero-core/issues/2402

@ryancyq not sure why I never thought to do a simple association. That works quite nicely, thanks for the feedback. I ended up creating an Xyz entity with IMustHaveTenant enforced, linked to an XyzOU derived class and doing tenantId validation one save

I ran into a similar problem using UTC as my clockProvider on the server side. The resolution I found was, before submitting from client side to server side for processing, you need to specify the format of the datetime object.

Below is jQuery but gives you the idea:

$('.datetime-picker').datetimepicker({
                minDate: new Date(),
                locale: abp.localization.currentLanguage.name,
                format: 'L LT'
            });

to render you Datetime field selector to your end user. Before posting to server:

var formattedDate = $("#Notification_AutoBroadcastDate").data("DateTimePicker").date().format("YYYY-MM-DDTHH:mmZ");

and return formattedDate to your server for processing, which will include the timezone offset.

If you do not include the timezone offset when submitting to server, it is assumed to be a UTC date.

What does console.log(data); show? At first glance your code looks correct, as I'mdoing something similar, however, what is your Create() method returning? You may also want to try just returning a number right away (skip all your logic), to see if it's a problem with your return value or your javascript to help with troubleshooting

Have you re-run npm run create-bundles ?

@robrechtbelien , have you looked at background tasks to accomplish this? See https://aspnetboilerplate.com/Pages/Documents/Background-Jobs-And-Workers You can add a BackgroundJob at any time, you would just need to calculate offset from Clock.Now until the start of your event, minus 5 minutes. I am doing something similar in my app.

Take a look at **Abp.BackgroundJobs.BackgroundJobManager, EnqueueAsync() method: **

[UnitOfWork]
        public virtual async Task<string> EnqueueAsync<TJob, TArgs>(TArgs args, BackgroundJobPriority priority = BackgroundJobPriority.Normal, TimeSpan? delay = null)
            where TJob : IBackgroundJob<TArgs>
        {
            var jobInfo = new BackgroundJobInfo
            {
                JobType = typeof(TJob).AssemblyQualifiedName,
                JobArgs = args.ToJsonString(),
                Priority = priority
            };

            if (delay.HasValue)
            {
                jobInfo.NextTryTime = Clock.Now.Add(delay.Value);
            }

            await _store.InsertAsync(jobInfo);
            await CurrentUnitOfWork.SaveChangesAsync();

            return jobInfo.Id.ToString();
        }

@ismcagdas I do, yes. Which I think is the expected behavior, based on https://aspnetboilerplate.com/Pages/Documents/MVC-Controllers#exception-handling-result-wrapping if I'm reading it correctly. I just wasn't sure if ASPNZ had something baked in that already handled this sort of overriding, or if I need to homebrew something.

**@webking **

It was a bit of a manual process, but my upgrade was done by:

  1. Starting with a clean copy of 6.9.1 - straight from downloads section (or in my case from my first git commit)
  2. Downloading clean copy of 7.0.0
  3. Using BeyondCompare and performing a full diffmerge to identifty the differences between the two.
  4. Using that diff report as a guide, manually applying the changes to a branch of my code. Luckily I made few changes to pre-existing code so this was a fairly straightforward process.
  5. Doing some global search and replaces for the naming convention changes from Metronic 5 to 6. basically m- to kt-, etc.

All told it was about a full days' work.

@ryancyq, thanks for your reply.

The solution I came up with this morning, which works but is not the most elegant -- I've modified ModalManager.js to look for the existence of either an UnauthorizedException or UserFriendlyException in the html response. If found, I parse out the message and display it, rather than the default InternalServerError.

@maliming I was actually able to track this down to how I was handling datatables inside of modal windows:

 $(document).on('shown.bs.tab', 'a[data-toggle="tab"]', function (e) {
                
                $($.fn.dataTable.tables(true)).css('width', '100%');
                $($.fn.dataTable.tables(true)).DataTable().columns.adjust().draw();
            });

I added this code due to an issue with datatables in hidden tabs not spanning the width of their container. Removed the code and problem resolved itself.

Showing 1 to 10 of 18 entries