meteor-admin icon indicating copy to clipboard operation
meteor-admin copied to clipboard

Add column to users table ... e.g. sendThankYou

Open SantoshSrinivas79 opened this issue 8 years ago • 5 comments

Is it possible to add a button to the "view all" table of "users" with an additional column containing a button like "sendThankyou" which can be made to trigger a thank you email using a method.

SantoshSrinivas79 avatar Apr 12 '16 11:04 SantoshSrinivas79

Yes, inside of your tableColumns array add something like:
{ label: 'Thank', name: 'thank', template: 'sendThankYou'}. From here you will need to define a template named sendThankYou which would contain only a button. You can then define event handlers on this template to execute any logic you want.

challett avatar May 13 '16 13:05 challett

@challett how to you access the tableColumns array for users?

I'm getting this error: Error: Users is not in the [object global] on this code:

AdminConfig = {
  collections: {
    Users: {
      icon: 'user',
      omitFields: ['updatedAt', 'createdAt', 'username'],
    },
  },
};

MichaelJCole avatar Jun 01 '16 16:06 MichaelJCole

https://github.com/yogiben/meteor-admin/issues/319

MichaelJCole avatar Jun 01 '16 16:06 MichaelJCole

I'm not currently using the user collection part of this plugin so I am not sure, sorry.

challett avatar Jun 01 '16 20:06 challett

In retrospect maybe that's why this issue came about. I didn't think the user collection would act any different to the other ones.

challett avatar Jun 01 '16 20:06 challett