Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add button to populate contact info from organization on Campaign Edit page #249

Closed
MisterJames opened this issue Nov 8, 2015 · 15 comments · Fixed by #1944
Closed

Add button to populate contact info from organization on Campaign Edit page #249

MisterJames opened this issue Nov 8, 2015 · 15 comments · Fixed by #1944
Assignees
Labels

Comments

@MisterJames
Copy link
Contributor

The page should load with contact information from the organization. A button should allow users to easily populate the contact details with that data. From #35.

@bcbeatty
Copy link
Contributor

bcbeatty commented Nov 9, 2015

I take this.

@bcbeatty
Copy link
Contributor

bcbeatty commented Nov 9, 2015

This is the workflow I'm thinking

Contact Fields -- does not have to be a user

  • First
  • Last
  • Phone
  • Email
  • Mailing Address -- stored in Location table
  • Organization Edit - Editable
  • Organization Details - read only
  • Campaign Edit - When the button is pressed copy Organization Contact fields into Campaign data entry fields, do not save automatically
  • Campaign Detail - Read only view

@tonysurma
Copy link
Member

Organizations have contact info close to your list:

  • Name (maybe first last maybe "operations support" who knows)
  • Phone
  • Email
  • Address
    and then that flows down to campaigns as you stated (workflow wise)

@stevejgordon
Copy link
Member

NDC note - Looks like this isn't completed and we need to expose a way to copy the contact information for the Org when adding a new campaign.

My proposal would be to load the org contact info into the view model and render it near the campaign Primary Contact fields. Add a checkbox to use Org info which is selected hides the specific fields in the UI.

image

We can then use that value to determine what data to save on the post action/handlers.

Validation will also need to be reviewed and updated as appropriate.

@Diana380
Copy link
Contributor

I have started looking into this.

@naeemsarfraz
Copy link
Contributor

Hey, how are you getting on with this @Diana380?

@stevejgordon stevejgordon modified the milestones: January v1.0 Release Milestone, March v1.0 Release Milestone Feb 26, 2017
@stevejgordon
Copy link
Member

We'll consider this open for takers again now.

@c0g1t8
Copy link
Collaborator

c0g1t8 commented Mar 27, 2017

I'll take a preliminary look 😄

@c0g1t8
Copy link
Collaborator

c0g1t8 commented Mar 28, 2017

@tonysurma I think I have a handle on this one. Please assign me.

@stevejgordon I'm going to implement your proposal above (Jan 17 comment).

@c0g1t8
Copy link
Collaborator

c0g1t8 commented Mar 30, 2017

Looks like most of the work has been done already. I found this in the view Edit.cshtml.

            @if (User.IsUserType(UserType.OrgAdmin))
            {
                <button type="button"
                        id="btnGetContactInfo"
                        class="btn btn-info"
                        data-toggle="modal"
                        data-target="#confirmContactModal"
                        title="Copy Contact Information from Organization">
                    Copy Contact Info
                </button>
            }

The button only appears only if the logged in user is an OrgAdmin. The Administrator@example.com is not an OrgAdmin. Thus no button appears. I think we should simply remove the check for OrgAdmin.

The button does more than copy over the Primary Contact information from the organisation. It also copies the location information. Is that okay? If so, we should do some renaming to make this is clear.

There is also a question of where to place the button.

image

I think it should be lower down on the page closer to the location and contact information.

@stevejgordon @MisterJames Any guidance?

@c0g1t8
Copy link
Collaborator

c0g1t8 commented Mar 30, 2017

@stevejgordon

My proposal would be to load the org contact info into the view model and render it near the campaign Primary Contact fields. Add a checkbox to use Org info which is selected hides the specific fields in the UI.

Rendering the organisation contact information looked like a good idea when I first looked at the issue. When I looked further at the form, there is a drop down for organisations. That would mean that the rendering should change to match the organisation selected.

@c0g1t8
Copy link
Collaborator

c0g1t8 commented Mar 31, 2017

I've got the following showing on the page

image

I'm using a glyph for the button to paste/copy the contact information. I think it's let's obtrusive.

I'm still awaiting feedback on if the location information from the organisation should also be copied over as well.

@tonysurma
Copy link
Member

Location info should come over as well

@c0g1t8
Copy link
Collaborator

c0g1t8 commented Mar 31, 2017

@tonysurma Thanks- I'll have a PR for you tomorrow.

tonysurma added a commit that referenced this issue Apr 6, 2017
Fixes #249 Add button to populate contact info from organization on Campaign Edit page
@c0g1t8
Copy link
Collaborator

c0g1t8 commented Apr 13, 2017

@tonysurma I think this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
8 participants