In SuiteCrm,
I have 'doctor' module, in this module
in 1st module I display doctors info such as name, speciality, experience etc.
in 2nd table, I want to show doctrs location with fields such as address, contact of hospital, state, city.
in 3rd table I have feedback received by doctor from diff.patient.
like this I have multiple tables.
Need multiple tables on list view page and detail view page for custom module created using module builder. Need to know how to add that.
currently only one table is there on custom module.
So you can different modules for doctor and patient and then create appropriate relationship(one-to-one, one-to-many, many-to-many) between them.
All you need to create Seperate modules for different table needs.
1) Doctor -> Person type module, this module comes with Primary address and alternate address widget, which is a group of 5 fields itself.
2) Feedbacks-> a Basic type module.
Until you dont' need M-2-M relationship between Doctor and Location, you should not create a separate module.
Hope this helps.
Related
I have three entities:
Attendee (holds basic attendee information)
Project (holds basic project information)
Attendance (links attendees and projects and holds more information like "invited_at", "is_confirmed"...)
One attendee can attend one project only once, but can of course attend multiple projects.
When I filter by project on the attendance index page one attendee can have only one or no attendance. In this case I want to display the corresponding attendance's information (like invited_at).
But fields like attendances.invited_at show no informartion on the attendee index page.
I guess this due to the n:n relation. Because fields like attendee.firstname are displayed without a problem on the attendances index page.
How can I get the attandance extra information to display on the attendee's index page?
Ok, there is a quite obvious solution for this problem. Custom fields.
https://symfony.com/bundles/EasyAdminBundle/current/fields.html
I'm developing the CMS(College Management System) website using LARAVEL PHP framework. Now we need to build up to three types of consoles(Admin, Student, Employee). I'm stuck in the admin console that admin is able to perform the selections process. I have performed the task for the following.
Foreach series has many Users.
Foreach users have one Profile.
Foreach profile has many qualifications, experiences, attendances..
Students and Employees Record saved in the user's table.
Now we need to remove students and employees written in the eclipse shape because there is a duplication code in these two tables(student and employee), then we need to create the profiles table. Now remaining tables classes and courses(I have not yet decided what type of relation).
If you need any code from this example then I will add in the comments section.
In order to prevent duplication (if students and employees will always be the same entity) is to introduce a new model in the system called Person (or something similar). Then you will create additionally a PersonType enabling you to expand the model further if you ever need something more than student and employee.
DB schema would then have a relationship:
persons ---- M:1 ---- person_types
Where person_types would have:
ID Name
1 Student
2 Employee
This way you can reuse everything.
I have made one-to-many relationship between two modules Ads and Contacts..Made a custom relate field in Ads and placed it in edit view which opens sub panel of contacts.The reason is when creating an Ads user can select multiple contacts.But the issue is I can only select one contact from Ads create screen.How can i achieve this?or is their any other way to do this please guide i have searched a lot to do this but couldn't find anyway.
Current result:
I need it like this:
EmieOmdorff,Tom,Lacy
I want to design a DB which will be connected to PHP Application. In the app there are two types of users: company and person. Some functionality like adding articles will be done by both so in other tables there are author_id columns. So firstly I decided to create user column.
That's easy: id, username, password, role, active, created where role defines whether user is person or company.
Now I want to add profile table or profile tables depends on what you'd suggest (joined with the previous table by adding profile_id column there).
Both roles have different fields, which are required during registration.
The easiest thing would be to create one table with all required fields for both roles, allow them NULL values and in the PHP app (made in Yii Framework in this case) define requirements for each role in models.
The nicest thing would be to create separate tables for both roles BUT the questions is how to connect these two tables to one table using Foreign Key? Is it even possible. I know I may omit foreign key creation then based on role choose table, and from that table choose profile_id.
Or maybe you have another solution to my problem.
Thanks in advance for replies.
Adrian
You need an intermediary between the page and the database to assign the user to a group that has specific privileges. It's usually accomplished with a user-group-role design.
You can have a table for users system info (username , pass ...), and another for users profile (firstname , birthday ...), and another for groups(superuser , ...).
where user table can have multiple groups: user:one->group:many
user can have one profile user:one->profile:one
I think this is a decent solution.
http://www.symfony-project.org/jobeet/1_4/Doctrine/en/12
The section "Virtual" columns details how to add columns to lists that belong to related models.
For example, I have 2 model classes: Company and User. A User is always a member of a Company.
For the User list I want to show the Company name, I can do this by adding a getter to the User class getCompanyName() and then in my generator.yml for the User module I would use the field name company_name.
This works and displays the Company name for each User, but how can I sort the list by using the Company name?
I solve this by adding a table_method, then when I implement the table method in the model, I innerjoin Company and order by a field in company. Not sure if this can be extended to sorting columns in the generated screens, but I think this works as well.