Now Mobile app and WSD Multilevel space picker widget

Travis Michigan
Mega Sage

We are having a problem with the display of an order guide when it comes to the Now Mobile app.  In a browser everything displays correctly:

TravisMichigan_0-1741290243372.png

However on Now Mobile going to the same order guide only displays the Building.  There are sections of the html: 

    <div ng-hide="c.isNative" class="col-sm-4">
      <label for="floor-picker"
             aria-label="${Required - Floor}"
             title="${Floor}"
             class="search-label">
        <strong ng-hide="c.isFloorPickerDisabled()">
          <span class="fa fa-asterisk mandatory" ng-class="{'mandatory-filled' :  c.selectedFloorId}"></span>
        </strong>
        ${Floor}
      </label>
        <sn-record-picker             
                        id="floor-picker"
                        table="'sn_wsd_core_floor'"
                        default-query="'active=true^building.sys_id='+c.selectedBuildingId"
                        field="floor"
                        value-field="'sys_id'"
                        display-field="'title'"
                        search-fields="'title,name'"
                        page-size="8"
                        sn-disabled="c.isFloorPickerDisabled()"
                        on-change="c.onFloorChange(floor)"
                        aria-required="true"
                        sn-aria-label="c.floorLabel"
                        placeholder="${Select a floor}">
      </sn-record-picker>    
    </div>

If I remove ng-hide="c.isNative"   from it then that section displays on the Now Mobile app.  But I'm not sure why that would be intended here.  I saw below in the client controller it has this:

	/* widget controller */
	var c = this;
	var currentPage = $scope.page;
	c.isTreeDataLoading = true;
	c.data.tree_data = [{}];
	c.isNative = cabrillo.isNative();
	c.instanceIdentifier = c.options.instance_id;
	c.modalId = c.instanceIdentifier + "_modal";
	c.selectedBuildingId = undefined;
	c.selectedFloorId = undefined;
	c.selectedSpaceId = undefined;
	c.floorLabel = "${Floor}";
	c.spaceLabel = "${Space}";

	c.onBuildingChange = onBuildingChange;
	c.onFloorChange = onFloorChange;
	c.isFloorPickerDisabled = isFloorPickerDisabled;
	c.isSpacePickerDisabled = isSpacePickerDisabled;
	c.onSpaceChange = onSpaceChange;
	c.openPopup = openPopup;
	
	c.filterConfig = {
		sn_wsd_core_building: 'active=true^is_reservable=true'
	};
	c.spaceRefQual = 'active=true';
	if(c.options.filter_query_for_space){
		c.spaceRefQual = c.spaceRefQual + "^" + c.options.filter_query_for_space;
	}

	var cabrilloValues = {};
	cabrilloValues.isMobile = c.isNative;
	CustomEvent.fireAll("wsd.multiLevelSpacePicker.cabrilloValues", cabrilloValues);

I'm not sure I follow why it is not allowing the Now Mobile app to display this with defaults.  I tried just editing the widget and removing ng-hide="c.isNative" will allow those to display on the Now Mobile app like they do from a browser but it seems like something I shouldn't need to adjust that.  Maybe we are using something wrong?  If anyone has any pointers on what we might need to change without causing future problems, I would welcome any information.

0 REPLIES 0