Planning calendar default one month view on mobile - calendar

Currently, I am developing an app in which users should be able to pick a date from the calendar. It works pretty much ok on desktop and also on mobile phone.
My problem is that the 'One Month' view is not reachable from mobile phones. What I need is to be able to have a similar view to the one shown below from my mobile phone.
I have already tried to PlanningCalendarView with intervalType="Month" but it just made it worse cause it shows the same appointments associated.

The “1 Month” option is not supported as intervalType for PlanningCalendarView.
But you can combine both your custom views ("Day" , "Week") and the already built in view for “1 Month”
by using the “builtInViews” property from PlanningCalendar.
Something like:
...
<PlanningCalendar
id="PC1"
startDate="{path: '/startDate'}"
rows="{path: '/people'}"
builtInViews="One Month"
...
<views>
<PlanningCalendarView
...
Please see also this Plunkr.

Related

mgt-react PeoplePicker defaultSelectedUsers not working as I would expect

I've been writing a React app that relies on the mgt-react components.
The app is basically just an interface to a SharePoint library.
Everything has been working great and the PeoplePicker is working in so much as I can start typing a users name and the drop down works and I can select a person.
However now I'm at the point where I want to create an edit screen. In order to implement this I need to prepopulate the PeoplePicker with the users that were input at insert time.
I can't seem to get the "defaultSelectedUsers" property to work.
I've pared things down to simply hardcoding a users email address and it still doesn't work.
Here is my code for the component (email address changed for privacy reasons):
<PeoplePicker defaultSelectedUsers={['user#domain.com']} selectionMode="single" selectionChanged={handleSelectionChanged}></PeoplePicker>
No matter what I do it is not prepopulating with a user / person.
The permissions are all there (I think) which is proven by the component working when I start typing a user name.
Any ideas what I might be missing?
As always thanks so much for any input in advance.
----- edit ----
Oh okay, it seems that I can't use that prop with mgt-react? I have to use defultSelectedUserIds and can't just provide an email address. Can someone confirm this is the case?
Is there mgt documentation for the defaultSelectedUsers property? As far as I am aware, the people picker only supports defaultSelectedUsersById. The email address should work though, assuming the graph is able to retrieve the users (it's their actual id).
For a quick test, are you able to retrieve the users through the graph explorer with the /users/${id} (replace id with your email) filter? This is what we use for the property.

Configurable AngularJS App

This is my first post here, apologize if my English is not perfect....
I am going to give you a short example of want I am looking for, and I will appreciate your opinion about the best approach to solve the described scenario.
I am not an expert frontend developer, so I if something it is not clear, please not hesitate to ask it.
[Example of app OOTB]
We have application with frontend, backend and database totally working with the following data model:
-Clients { Name , Address }
-Products { Name , Price }
-Orders { ProductID , ClientID , Delivery Date}
So, at this point we have one app that allows users:
CRUD orders , clients and products
*CRUD = Create, read, update and delete
[Challenge]
How can I design the app to make it configurable?
When I say configurable means not coding the views and the model again, means having one code that could generate the views and model from a config file.
Let me give an example of configurable:
We have the app OOTB (out of the box) as explained previously, but now we have a different client and the app need changes:
-Clients { Name, List of Addresses , Phone , Bank account , etc...}
-Products { Name, CreationDate, Price , ExpirationDate , etc...}
How can I code the frontend with angularJS or any other framework to make the views and the model configurable?
It sounds like a relatively simple website with use authentication / login.
Try this tutorial and see how you get on:
Getting Started with Entity Framework 6 Code First using MVC 5

Drupal 7 content structure

I am working on a project with drupal 7. My drupal experience is limited and Im a bit stuck on how to achieve a good structure.
The site will have products like wine, sherries and spirits. Each of these product types will have subcategories. (example: like red / white wine) Within these subcategories there will be certain brands of wines.
Since the website is focussing only on displaying the products and not selling them, I really do not want to use any ecommerce software, or modules.
Preferably I would like the products to be a content type. There is a little catch to it. All categories, so in the examples above; wines, sherries, spirits BUT ALSO red / white wines should have a description and a image.
Can anyone shed some light on how to create this in drupal 7. I have googled a lot but im not sure what the right approach would be. Thanks!
I think you could create the different pages using the taxonomy structure and views. You would set up a custom content type of products, then for each product put in the proper tags. This should group together the different categories for you.

Issues on a select with AngularJS and Google Spreadsheet

I want to create a small web app which would display a list of movies, with a Google spreadsheet set as a database. So far, I was able to connect my spreadsheet to my app and I also added some filters to it. (As a side note, this thread really helped me in the process.)
Here is a very simplified version of my app: http://plnkr.co/edit/BtbSCVOh7KJsMHjANxMP?p=preview
I still have 3 problems with my <select>, which I can't fix despite trying for hours:
I can't sort my <options> alphabetically. Trying with orderBy didn't return anything.
I can't figure out a way to split my categories when there are more than one for a movie.
If the "categorie" field in my spreadsheet is empty, it will return a blank <option> which I would like to remove or hide.
My guess is that I'll need to update my function one way or another, but I'm a bit lost at the moment.
Any help on this would be really appreciated!

Show Opportunity related Contacts in Custom Object Field

I have the next issue.
I have a custom object called 'Application', and I have this requirement:
"Show all Contacts related to an Application. Create a field on Application object, must be read only".
I solve it with apex code. 'Application' has a lookup to Opportunity, Opportunity to Account, and all my contacts have AccountId, so this way, I get all the contacts using apex code in a trigger.
But, I've been ask to change this to a Formula field in Application object.
So, my issue is next. I'm not able to get all contacts with advance formula editor, because they're not part of any object. I have no master-detail relationship.
Does any one know how can I achieve this using configuration? I should not use apex code for this req.
Thank in advance guys.
I don't think you can do it.
In formulas / merge fields syntax there's no way to go "up, up then down" (Application -> Opportunity -> Account -> down to Contacts related list). There's also nothing that would let you loop through Contacts (and display what? Ids? Names? Emails?). Roughly speaking you can only go up through dots.
You might want to explore path of "cross object workflow" rules but I imagine that when I add a new Contact to Account it should somehow "spread itself" to all related Applications? There's no straight way to fire a workflow on delete too - so you'd eventually end up with inaccurate list.
I'd say trigger was a good solution. Maybe it ws unoptimized but if it has to be in a field - tough.
There might be a fairly simple way of achieving that by embedding a visualforce page within Application page layout.
This should be doable with pure Visualforce (so technically there will be no Apex code ;))
Something as simple as
<apex:relatedList list="Contacts" subject="Application__c.Opportunity__r.AccountId" />
would be a good start (if you want your own layout and not a rel. list - you should be still able to pull it off with <apex:repeat> or <apex:pageBlockTable>.
There's one BUT here: it's not a field, just a display trick. Forget about using it in reports, mobile applications etc.
Another way - would it be acceptable to be 1 click away from these contacts? You could make a report "Account with Contacts", filter it by Id of one Account and later use "URL hacking" to change the filter depending on from which Application you'll click it. This link could be either a formula field or a real custom button/link. Technically - it's pure config, no apex & VF.
You can read more about URL hacking at Ray Dehler's excellent post and specifically about dynamic Reports here or here.

Resources