I would like to open a Dialog or Modal if I get a status 401 in AUTH_ERROR. What is the best way to implement this.
Thanks!
You'll have to take the custom app route:
Follow the documentation to bootstrap your custom app.
Add a saga which should take the latest (takeLatest in redux-saga) FETCH_ERROR action. This action has an error property. The saga should then dispatch (put in redux-saga) a custom action which will be used by a reducer you'll add.
This reducer should contain the data required for the modal: at least a boolean determining whether to show it or not.
Finally, update your custom app by adding it a custom redux connected component which will check if it has to show your modal.
Related
So I have this Laravel 9 project. In this view below you can see the navigation bar:
The menu above for the active link (Overview) styling (Tailwind) is active via the check below in the view for the component looking at the request information:
#if(request()->is('dashboard/*/overview'))
This works great as the url currently is
localhost/dashboard/{ID}/overview
When clicking the bottom nav link for the Dividends this fires a livewire event for this account as they don't have permissions to access the page. No navigation away from the page Overview is performed. This event is used to setup a popup when the user doesn't have access to a feature. (I have these in a few places)
The issue is that when one of these fires it sets the 'is' check value in the request to
/livewire/message/{COMPONENT_NAME}
This seems to be the expected behaviour of the livewire events. I attempted a similar check using the code below but the same result occurred as the data is still tied to the request.
#if(request()->pathInfo == "dashboard/7/overview")
If anyone knows of another way or a better way I could have the intended functionality so that the button keeps it's 'active' properties after a livewire event has ran, I'd appreciate it :)
I am trying to merge surveyjs along with my NativeScript application. I have referred URL for merging the same with Angular application
From the Angular demo code given on website, we have to add event handler for Complete button where we can get the response from surveyjs. Is it possible to integrate similarly for Nativescript Mobile application? Here is the approach which i feel can be taken.
Display
Create a HTML as provided by SurveyJS with required CSS and JS
referenced and add them as a file in project.
Modify HTML once i get the survey question json back from server.
Show the HTML as part of WebView. This will take care of displaying
the survey on my Application.
Here are my challenges during Submission
As per the process given on SurveyJS, i need to add handler for
oncomplete which will get the result json for me. How can i add
handlers for Complete button click in my code? Also please note that
there is a possibility that there may be multiple surveys on a single
page.
Apart from Survey, there are other fields also on the page and user
will submit them all in one go by clicking submit button of the page.
Hence i am planning to hide Complete button provided by SurveyJS
page. This needs to be triggered via code. Can this be done?
If someone can give directions on whether this scenario can be handled in nativescript application with Angular,it would help immensely.
yes it can be done using nativescript-webview-interface plugin.
add jS code inside WebView to handle oncomplete event from surveyJS. and on that function call emit some event to native app. after that add nativescript code to listen for that event and get the JSON back.
inside webView JS function
var oWebViewInterface = window.nsWebViewInterface;
// emit event to native app
oWebViewInterface.emit('anyEvent', jsonData);
inside native App
oWebViewInterface.on('anyEvent', function(jsonData){
// perform action on event
});
for more details on this you can check plugin readme file https://github.com/shripalsoni04/nativescript-webview-interface
I'm creating a tabbed form with validation, and there is one thing I don't understand how to do: when I hit the submit button, and there is a validation error in some field, the form is not submitted - but if the field is in an hidden tab (a non focused one), there is no error message displayed either.
Is there am easy way to switch to the tab with errors, or to inhibith focusing on following tabs until all errors in current one had been cleared?
I'm new to all the React, JSX and modern JS development, please do not be too much concise! :)
Thanks!
I reproduced the problem and opened an issue on our repository. I'll let you know how it goes.
In the mean time, one way to mitigate this issue would be to create a custom saga. You'll need some knowledge about redux-saga though.
The idea would be to:
catch failed validations actions from redux-form (SET_SUBMIT_FAILED)
trigger a custom notification with an error message indicating the field and the tab where the error occurred. Unfortunately, you'll have to check the fields names to know for which resource the error occurred.
Is there a way I can execute custom code in c# when a user clicks a button in the CRM application? I would like it a synchronous and asynchronous approach.
Actually something like when putting a button on a webform with a wired code behind click event handler.
And how can I add a button?
I want to display a list of report views the customer has assembled and access the report data in the CRM database.
It seems so complicated with CRM!
Here's an example of a custom workflow with a bunch of XAML. I dont know where they got it from.
Sample: Create a workflow in code
One way to go about it:
Use Ribbon WorkBench add add a button to the form. Only supported way of adding buttons to CRM is by editing ribbon XML.
Add an on click JavaScript Event Handler.
Call an Action which can be used to call a custom workflow where you can perform business logic.
We have just purchased a licence for fineuploader and it works great.
However, the documentation, after basic setup is rather confusing.
We are trying to handle the validate event but cant find any information about what the event data is such as valid extension etc and how we can inform users about any errors happening in the validation phase.
Would appreciate any assistance
The validate event is documented in quite a bit of detail in the events documentation at http://docs.fineuploader.com/api/events.html#validate.
As the validation documentation says, you can use the validate event to enforce your own custom rules. You are given the name and size of the file in your callback handler. If you need access to more information (such as the actual file), you can declare a submit event callback handler instead. When submit is called, an ID is available for the file, and you can address it using any of the other API methods that require a file ID.
If you only need to validate based on file extension, use the built in validation for that. See the validation config options for more details.
You can display a message to the user however you see fit. The onError callback will be invoked on a validation error. If you are using Fine Uploader UI, the showMessage function will also be invoked with the error message.
Please have a close look at the portions of the documentation linked to above, as well as the live demo that includes validation on the home page.