mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-09 15:27:30 -05:00
better message
This commit is contained in:
@@ -79,7 +79,7 @@ exports.exportTalkgroups = function (req, res, next) {
|
||||
|
||||
async function csv_import(shortName, filename, callback) {
|
||||
var talkgroups = [];
|
||||
const count = await Talkgroup.deleteMany({ shortName: shortName });
|
||||
|
||||
|
||||
var parser = parse(
|
||||
{
|
||||
@@ -90,6 +90,7 @@ async function csv_import(shortName, filename, callback) {
|
||||
console.error("Error: csv import 2: " + err);
|
||||
callback(err, null);
|
||||
} else {
|
||||
const count = await Talkgroup.deleteMany({ shortName: shortName });
|
||||
var response = [];
|
||||
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
@@ -97,7 +98,7 @@ async function csv_import(shortName, filename, callback) {
|
||||
if (!( "Decimal" in row) || !("Description" in row) || !("Alpha Tag" in row)) {
|
||||
console.error("Error: csv import column header error");
|
||||
console.error(row)
|
||||
callback("Column Headers are required - Required Columns: 'Decimal' 'Decscription' 'Alpha Tag' Optional Column: 'Priority' ", null);
|
||||
callback("Column Headers are required - Required Columns: 'Decimal' 'Description' 'Alpha Tag' Optional Column: 'Priority' ", null);
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -399,6 +399,7 @@ const System = () => {
|
||||
<em>
|
||||
The Talkgroup file is a .CSV file that has infromation about the different talkgroups on the system. Headers are required for the columns, and should be the first
|
||||
line of the file. The columns can be in any order, but the headers must match exactly.<br/>
|
||||
<p>If you export the file from Excel, make sure to use "Comma Separated Values" and NOT "CSV UTF-8" for the File Format.</p>
|
||||
An example header line is: <br />
|
||||
<code>Decimal,Alpha Tag,Description</code><br/>
|
||||
<p>There can be additional columns so you can use the same Talkgroup CSV file from Trunk Recorder.</p>
|
||||
|
||||
Reference in New Issue
Block a user