UNI Sales Portal iPad iOS Swift - R2 An Opportunity to Quote - realworldswift

Register
Submit a solution
The challenge is finished.

Challenge Overview

Project Overview

Our partner is developing a state-of-the-art tablet based sales and order processing tool. Their sales team will be managing client visits, tasks, calendars, notifications, and order processing all through this tool. The platform is the Apple iPad. Want to learn Swift? Great - why not get paid for it, we need your help! There will be a long series of challenges over the coming weeks leading to the final product, so get involved now!

 

Challenge Summary

The purpose of this challenge is to extend our existing Swift application to polish existing features and expand functionality. This challenge deals with the changes that have become necessary to the Opportunities Cell and Forms wihtin the application. Enabling the ability to see and then view quotes, as well as clone the opportunity and assign it to a different user.

Opportunity Form Changes

The fields should be reordered to match this list on the OpportunityTableViewCell and the Create New and Edit Forms:

  • Column 1

    • Account Name – Auto-fill the current Account Name and Id - Autocompletes

    • Type - REQUIRED - Picklist Opportunity.Type

    • Stage - Default to Discover

    • Probability% - Default to 25%

    • Close Date  - Default to current day + 45 days

    • Amount – default to 0

  • Column 2

    • Primary Competitor - Required if Account.Program_Type__c is “Competitive”.  Stop filtering “other” from being an option in this picklist.

    • Other Competitor - Required if Primary Competitor is “Other”

    • Install Date – Required if Stage is Close-Won or Close-Lost

    • Close Reason - Required if Stage is Close-Won or Close-Lost

    • Primary Customer Factor - Required if Stage is Close-Won

    • Owner

  • Two Column

    • Comments:  Text field

 

Opportunity Quotes

Opportunity Table View Cell Changes

  • The Clone Opportunity Button should be removed.

    • Instead, create a Clone Button beside the Edit button whenever the cell is swiped open.

    • This button should function in the way the Clone Opportunity button does now.

  • + New Quote should be added according to the design mockup.

Quotes Table Changes

  • The Quotes Table View Cells should be modified such that it matches the design of the mockup.

  • When No Quotes are present, rather than hiding the table, display a table cell that says “No quotes exist for this opportunity. Tap “+New Quote” above to create one.”

  • The height of the Quotes table should be large enough that all Quotes associated with the opportunity are visible.

  • The quotes table should NOT be scrollable.

  • The opportunity cell should stretch so that the Quotes table is fully visible.

  • The Quote that is set as .isPrimary should always display as the first item of the table view.

 

Quotes Cell Changes

  • When the Quote Name button is tapped, display a webview pointed at the frontdoor URL: {Salesforce Instance URL}/{Quote.Id}

    • When this web-view is closed the Account Data should be reloaded, refreshing the cells within the Opportunities Accordion.

  • The Primary Button should be replaced with the Checkbox structure in the design.

    • When not primary, the button and label should be faded, as it is with Contacts.

    • When primary, the button should be checked and the label should be dark.

    • When the user taps a non-primary Checkbox, it should change to the Primary appearance state.

      • All other cells should be set so their quote.isPrimary is FALSE.

      • A POST Request should be made to the path “/Quote/Primary/{quoteId}” which will persist this change to the server.

      • If this POST Request returns in error, display an alert to the user saying “An error occurred while setting this quote to Primary.”

 

Edit Opportunity Form

All Users

  • Account Name should be added as a field at the top of the form.

    • Should pre-populate the name of the Account that the user is cloning the Opportunity from.

    • When user types, use the Autocomplete call-out from Ride Along Evaluations to retrieve a list of Accounts that match the name that they are typing.

    • Modify the Autocomplete list such that a new “Create New Account” button is always present at the bottom of the list.

      • This should only display if current Logged In User is a Manager.

    • If the user selects “Create New Account”

      • Hide the Account Name Field and display a miniature Create Account Form section in its place.

      • All other contents of this form should push down to display this form.

 

When Logged In as a Seller

  • When the user taps in the “Opportunity Owner” field, it should allow them two options “Myself” or the name of their Manager.

  • When one is selected, the relevant user’s ID should be populated for the opportunityOwnerId field.

  • This change should persist to the Edit, Clone, and Create Opportunity forms as well.

When Logged In as a Manager

  • Miniature Create Account Form Section

    • All fields that are part of this form are required.

    • These fields correspond directly to fields that are on the Create Account Form

      • Account Name

      • Street Address

      • City

      • State

      • Postal Code

      • Country

      • Program Type

      • Status

    • When the user taps the Save Changes button, first create the new account in the same way that the Create Account Screen does.

    • Then when the ID of the new account is returned, set the Opportunity.AccountId to the ID of the newly created account.

    • Then save the Opportunity as usual.

Clone Opportunity Screen

  • Opportunity Owner field should NOT be editable. Retain the original owner from the original Opportunity.

 

Environment Setup

GIT: The project will use a code repository at Github, please see additional details and participant responsibilities under Submission Guidelines.

Xcode: All code development should be done in Xcode 6.2 and tested in the simulator.

Framework: Code should be developed with the Cocoa Touch framework using Swift and must compile against iOS SDK 8.2 with a deployment target of iOS 8.0.

Get Started

- Request access to the project in the challenge forums

- Fork this project: git@github.com:cloudspokes/UNI-mobile.git

- Checkout this branch: https://github.com/cloudspokes/UNI-mobile/tree/uni-r2-2

- Write and submit your code as a zip file

 

Credentials for the application will be provided in the forums.

** Note: You need to set the login location to "Sandbox" in the iPad (or simulator settings). This is under regular IOS settings (in the Compass app section).

���



Final Submission Guidelines

Submission Guidelines

- Cocoa Touch framework Xcode 6.2 project with well commented code

- Code must compile against iOS SDK 8.2 with a deployment target of iOS 8.0

- Upload all source projects as a zip

- After submission phase has completed, make a pull request targeting the 'uni-r2-2' branch.

- Provide documentation of any special configuration required to run your code.

 

GIT Guidelines and Requirements

All code for this project will be maintained at Github. Challenge participants will have to request read-only access to the repository during the challenge and are expected to fork and do their coding on the challenge branch. Once contest submission closes, the project owner will update the code in the challenge branch to reflect the current state of development. The winner of the challenge will then be required to update their fork to the current state of the development repository and will be responsible for handling merge conflicts when updating their fork. They will then create a pull request.

ELIGIBLE EVENTS:

2015 topcoder Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30049859