Add contact note to users

This commit is contained in:
FusionPBX 2025-02-26 12:01:20 -07:00 committed by GitHub
parent 9591ce0cbd
commit 1fba94d92b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 33 additions and 6 deletions

View File

@ -35,7 +35,7 @@ if ($domains_processed == 1) {
$sql = "CREATE VIEW view_users AS ( \n";
$sql .= " select u.domain_uuid, u.user_uuid, d.domain_name, u.username, u.user_status, u.user_enabled, u.add_date, \n";
$sql .= " c.contact_uuid, c.contact_organization, c.contact_name_given ||' '|| c.contact_name_family as contact_name, c.contact_name_given, c.contact_name_family, \n";
$sql .= " c.contact_uuid, c.contact_organization, c.contact_name_given ||' '|| c.contact_name_family as contact_name, c.contact_name_given, c.contact_name_family, c.contact_note, \n";
$sql .= " ( \n";
$sql .= " select \n";
$sql .= " string_agg(g.group_name, ', ') \n";

View File

@ -1975,6 +1975,32 @@ $text['label-user_enabled']['zh-cn'] = "启用";
$text['label-user_enabled']['ja-jp'] = "有効";
$text['label-user_enabled']['ko-kr'] = "사용";
$text['label-contact_note']['en-us'] = "Note";
$text['label-contact_note']['en-gb'] = "Note";
$text['label-contact_note']['ar-eg'] = "ملحوظة";
$text['label-contact_note']['de-at'] = "Notiz";
$text['label-contact_note']['de-ch'] = "Notiz";
$text['label-contact_note']['de-de'] = "Notiz";
$text['label-contact_note']['el-gr'] = "Σημείωση";
$text['label-contact_note']['es-cl'] = "Nota";
$text['label-contact_note']['es-mx'] = "Nota";
$text['label-contact_note']['fr-ca'] = "Note";
$text['label-contact_note']['fr-fr'] = "Note";
$text['label-contact_note']['he-il'] = "הערה";
$text['label-contact_note']['it-it'] = "Nota";
$text['label-contact_note']['ka-ge'] = "შენიშვნა";
$text['label-contact_note']['nl-nl'] = "Notitie";
$text['label-contact_note']['pl-pl'] = "Notatka";
$text['label-contact_note']['pt-br'] = "Nota";
$text['label-contact_note']['pt-pt'] = "Nota";
$text['label-contact_note']['ro-ro'] = "Notă";
$text['label-contact_note']['ru-ru'] = "Примечание";
$text['label-contact_note']['sv-se'] = "Notering";
$text['label-contact_note']['uk-ua'] = "Нотатка";
$text['label-contact_note']['zh-cn'] = "笔记";
$text['label-contact_note']['ja-jp'] = "ノート";
$text['label-contact_note']['ko-kr'] = "메모";
$text['label-additional_info']['en-us'] = "Additional Info";
$text['label-additional_info']['en-gb'] = "Additional Info";
$text['label-additional_info']['ar-eg'] = "معلومات إضافية";
@ -2866,4 +2892,4 @@ $text['button-permissions']['zh-cn'] = "权限";
$text['button-permissions']['ja-jp'] = "パーミッション";
$text['button-permissions']['ko-kr'] = "권한";
?>
?>

View File

@ -113,7 +113,7 @@
$sql_search .= " or lower(group_names) like :search ";
$sql_search .= " or lower(contact_organization) like :search ";
$sql_search .= " or lower(contact_name) like :search ";
//$sql_search .= " or lower(user_status) like :search ";
$sql_search .= " or lower(contact_note) like :search ";
$sql_search .= ") ";
$parameters['search'] = '%'.$search.'%';
}
@ -154,7 +154,7 @@
//get the list
$sql = "select domain_name, domain_uuid, user_uuid, username, group_names, ";
if ($show_contact_fields) {
$sql .= "contact_organization,contact_name, ";
$sql .= "contact_organization,contact_name,contact_note, ";
}
$sql .= "cast(user_enabled as text) ";
$sql .= "from view_users ";
@ -267,6 +267,7 @@
//echo th_order_by('contact_name_family', $text['label-contact_name_family'], $order_by, $order);
//echo th_order_by('user_status', $text['label-user_status'], $order_by, $order);
//echo th_order_by('add_date', $text['label-add_date'], $order_by, $order);
echo th_order_by('contact_note', $text['label-contact_note'], $order_by, $order, null, "class='center'", $param);
echo th_order_by('user_enabled', $text['label-user_enabled'], $order_by, $order, null, "class='center'", $param);
if (permission_exists('user_edit') && $list_row_edit_button == 'true') {
echo " <td class='action-button'>&nbsp;</td>\n";
@ -310,6 +311,7 @@
//echo " <td>".escape($row['contact_name_family'])."</td>\n";
//echo " <td>".escape($row['user_status'])."</td>\n";
//echo " <td>".escape($row['add_date'])."</td>\n";
echo " <td>".escape($row['contact_note'])."</td>\n";
if (permission_exists('user_edit')) {
echo " <td class='no-link center'>\n";
echo button::create(['type'=>'submit','class'=>'link','label'=>$text['label-'.$row['user_enabled']],'title'=>$text['button-toggle'],'onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('toggle'); list_form_submit('form_list')"]);
@ -340,5 +342,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>