Companies table (#79)
* Add columns to companies: * account_owner_id * employees * address Add foreign key constraint companies_account_owner_id_fkey to auth.users.id * Add select permissions to: * account_owner_id * employees * address Add relationship between companies and auth.users. * Update Companies interface to include: * account_owner_id * employees * address Opportunity is expected to be replace by actual opportunity in a separate PR. * Add GetCompanies query * Add initial companies table * Update test to use mock apollo provider * Update to match changed company column names * Add company interface mapping tests * Test entire object * Add test for companies being rendered in table. * Add test for sorting reduce. * Fix prettier errors
This commit is contained in:
@ -129,6 +129,14 @@ array_relationships:
|
||||
table:
|
||||
name: user_providers
|
||||
schema: auth
|
||||
select_permissions:
|
||||
- role: user
|
||||
permission:
|
||||
columns:
|
||||
- display_name
|
||||
- email
|
||||
- id
|
||||
filter: {}
|
||||
event_triggers:
|
||||
- name: user-created
|
||||
definition:
|
||||
@ -142,4 +150,4 @@ event_triggers:
|
||||
webhook: '{{HASURA_EVENT_HANDLER_URL}}'
|
||||
headers:
|
||||
- name: secret-header
|
||||
value: secret
|
||||
value: secret
|
||||
@ -2,6 +2,15 @@ table:
|
||||
name: companies
|
||||
schema: public
|
||||
object_relationships:
|
||||
- name: account_owner
|
||||
using:
|
||||
manual_configuration:
|
||||
column_mapping:
|
||||
account_owner_id: id
|
||||
insertion_order: null
|
||||
remote_table:
|
||||
name: users
|
||||
schema: auth
|
||||
- name: workspace
|
||||
using:
|
||||
foreign_key_constraint_on: workspace_id
|
||||
@ -14,6 +23,9 @@ insert_permissions:
|
||||
columns:
|
||||
- id
|
||||
- workspace_id
|
||||
- account_owner_id
|
||||
- address
|
||||
- employees
|
||||
- name
|
||||
- domain_name
|
||||
- created_at
|
||||
@ -25,6 +37,9 @@ select_permissions:
|
||||
columns:
|
||||
- domain_name
|
||||
- name
|
||||
- account_owner_id
|
||||
- address
|
||||
- employees
|
||||
- created_at
|
||||
- deleted_at
|
||||
- updated_at
|
||||
@ -39,6 +54,9 @@ update_permissions:
|
||||
columns:
|
||||
- domain_name
|
||||
- name
|
||||
- employees
|
||||
- address
|
||||
- account_owner_id
|
||||
- created_at
|
||||
- deleted_at
|
||||
- updated_at
|
||||
@ -53,4 +71,4 @@ delete_permissions:
|
||||
permission:
|
||||
filter:
|
||||
workspace_id:
|
||||
_eq: x-hasura-workspace-id
|
||||
_eq: x-hasura-workspace-id
|
||||
Reference in New Issue
Block a user