parent
48da446e83
commit
e2cd24a39f
|
|
@ -10,6 +10,7 @@ import (
|
||||||
|
|
||||||
type Job struct {
|
type Job struct {
|
||||||
ID string
|
ID string
|
||||||
|
URI string
|
||||||
Pickup JobLocation
|
Pickup JobLocation
|
||||||
Dropoff JobLocation
|
Dropoff JobLocation
|
||||||
Weight int
|
Weight int
|
||||||
|
|
@ -25,12 +26,13 @@ type JobLocation struct {
|
||||||
|
|
||||||
func (j Job) String() string {
|
func (j Job) String() string {
|
||||||
return fmt.Sprintf(
|
return fmt.Sprintf(
|
||||||
`%s => %s (%d miles), Weight:%d, Notes:%s`,
|
`%s => %s (%d miles), Weight:%d, Notes:%s Link:%s`,
|
||||||
j.Pickup.String(),
|
j.Pickup.String(),
|
||||||
j.Dropoff.String(),
|
j.Dropoff.String(),
|
||||||
j.Miles,
|
j.Miles,
|
||||||
j.Weight,
|
j.Weight,
|
||||||
j.Meta,
|
j.Meta,
|
||||||
|
j.URI,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -41,7 +43,7 @@ func (j JobLocation) String() string {
|
||||||
func (j Job) FormatMultilineText() string {
|
func (j Job) FormatMultilineText() string {
|
||||||
foo := func(client string) string {
|
foo := func(client string) string {
|
||||||
return fmt.Sprintf(
|
return fmt.Sprintf(
|
||||||
"--- %s: %s => %s ---\nPickup: %s\nDropoff: %s\nNotes: %d lbs, %d miles, %s",
|
"--- %s: %s => %s ---\nPickup: %s\nDropoff: %s\nNotes: %d lbs, %d miles, %s\n%s",
|
||||||
client,
|
client,
|
||||||
j.Pickup.State,
|
j.Pickup.State,
|
||||||
j.Dropoff.State,
|
j.Dropoff.State,
|
||||||
|
|
@ -50,6 +52,7 @@ func (j Job) FormatMultilineText() string {
|
||||||
j.Weight,
|
j.Weight,
|
||||||
j.Miles,
|
j.Miles,
|
||||||
j.Meta,
|
j.Meta,
|
||||||
|
j.URI,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
out := ""
|
out := ""
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@ func (ntgJob ntgVisionJob) Job() Job {
|
||||||
pickup, _ := time.ParseInLocation("01/02/06", ntgJob.PickupDate, time.Local)
|
pickup, _ := time.ParseInLocation("01/02/06", ntgJob.PickupDate, time.Local)
|
||||||
dropoff, _ := time.ParseInLocation("01/02/06", ntgJob.DropoffDate, time.Local)
|
dropoff, _ := time.ParseInLocation("01/02/06", ntgJob.DropoffDate, time.Local)
|
||||||
return Job{
|
return Job{
|
||||||
ID: fmt.Sprintf("ntg-%d", ntgJob.ID),
|
ID: fmt.Sprintf("ntg-%d", ntgJob.ID),
|
||||||
|
URI: fmt.Sprintf(config.Get().Brokers.NTG.LoadPageURIFormat, ntgJob.ID),
|
||||||
Pickup: JobLocation{
|
Pickup: JobLocation{
|
||||||
Date: pickup,
|
Date: pickup,
|
||||||
City: ntgJob.PickupCity,
|
City: ntgJob.PickupCity,
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
"Matrix": {
|
"Matrix": {
|
||||||
"ReceiveEnabled": true,
|
"ReceiveEnabled": true,
|
||||||
"Mock": false,
|
"Mock": false,
|
||||||
"Continuation": "602",
|
"Continuation": "1314",
|
||||||
"Homeserver": "https://m.bltrucks.top",
|
"Homeserver": "https://m.bltrucks.top",
|
||||||
"Username": "@bot.m.bltrucks.top",
|
"Username": "@bot.m.bltrucks.top",
|
||||||
"Token": "mvDWB96KXMF8XhOam8EC5XVdQvSEw0CDeClcSWocBcYkwZX3FPNWZ5uOnQk2EmT1cjpzfeuD7gDYPPjOuyZlI3bE9TE35UjNOlZgi0Tugm25s91iVsbIF6kMZsCIhVMSmEf6w3jxX6wQYOWvmDZ4mu6f5c8wr221EMDcOpEzQV09d1zuBSWgKLBgjqAkYHJZ5dTRIWpEDpPgujhOFZa2ld1HiAOxrJKlIrlfDBN0CUsTlGOGplujDAr4VtpFzNRS",
|
"Token": "mvDWB96KXMF8XhOam8EC5XVdQvSEw0CDeClcSWocBcYkwZX3FPNWZ5uOnQk2EmT1cjpzfeuD7gDYPPjOuyZlI3bE9TE35UjNOlZgi0Tugm25s91iVsbIF6kMZsCIhVMSmEf6w3jxX6wQYOWvmDZ4mu6f5c8wr221EMDcOpEzQV09d1zuBSWgKLBgjqAkYHJZ5dTRIWpEDpPgujhOFZa2ld1HiAOxrJKlIrlfDBN0CUsTlGOGplujDAr4VtpFzNRS",
|
||||||
|
|
@ -73,6 +73,7 @@
|
||||||
"Brokers": {
|
"Brokers": {
|
||||||
"NTG": {
|
"NTG": {
|
||||||
"Mock": true,
|
"Mock": true,
|
||||||
|
"LoadPageURIFormat": "https://ntgvision.com/LoadDetails?loadId=%d",
|
||||||
"Token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzMTAyOSIsInVuaXF1ZV9uYW1lIjoibm9lYXN5cnVuc3RydWNraW5nQGdtYWlsLmNvbSIsImp0aSI6IjFmYzhmNjk1LTQzNTYtNGYzZS05NWY1LWZkNWVjMDJlMDkxNyIsImlhdCI6IjEvMTAvMjAyMiAxMTo1OTozNiBQTSIsIm50Z3ZSb2xlIjoiQ2FycmllckFwcHJvdmVkIiwidXNlckNhcnJpZXJzIjoiMTUzNDIzIiwib3RyVXNlciI6IkZhbHNlIiwibmJmIjoxNjQxODU5MTc2LCJleHAiOjE2NDE5NDE5NzYsImlzcyI6Ik5URyBTZWN1cml0eSBUb2tlbiBTZXJ2aWNlIiwiYXVkIjoiTlRHIn0.kpHOBTtcQhbdloAw7xEjnkzfxf4ToMgidrLCMomZmnmKQHlD_7OQuI8nQiCTHc_ntuGtt8Ui92kwWWUiLwN_2tT2vC7Jy6m9IjwqgbAzsgTLi4jAbIwITD-awiDh4FUKDwGq3XpEjs-i7XM3rI7tTk7jg9QSDId8EF3Pt5fJq6QhztC6y7-JaSFQZLMtkSCAWmOQx_TgKgVoVbgMeiqhHbZ2hhoA7TtpEIIL5Gnfq46t3E18ExdrsO96ZCGQGcBw5x8J1ustq2cwdlFKeg4ULNWAAd1ay1hojRa7jCHs98AcoJ3Nts9-o7yEMuN2rrfpK_nm68nciwFtF-ke1KoiBg",
|
"Token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzMTAyOSIsInVuaXF1ZV9uYW1lIjoibm9lYXN5cnVuc3RydWNraW5nQGdtYWlsLmNvbSIsImp0aSI6IjFmYzhmNjk1LTQzNTYtNGYzZS05NWY1LWZkNWVjMDJlMDkxNyIsImlhdCI6IjEvMTAvMjAyMiAxMTo1OTozNiBQTSIsIm50Z3ZSb2xlIjoiQ2FycmllckFwcHJvdmVkIiwidXNlckNhcnJpZXJzIjoiMTUzNDIzIiwib3RyVXNlciI6IkZhbHNlIiwibmJmIjoxNjQxODU5MTc2LCJleHAiOjE2NDE5NDE5NzYsImlzcyI6Ik5URyBTZWN1cml0eSBUb2tlbiBTZXJ2aWNlIiwiYXVkIjoiTlRHIn0.kpHOBTtcQhbdloAw7xEjnkzfxf4ToMgidrLCMomZmnmKQHlD_7OQuI8nQiCTHc_ntuGtt8Ui92kwWWUiLwN_2tT2vC7Jy6m9IjwqgbAzsgTLi4jAbIwITD-awiDh4FUKDwGq3XpEjs-i7XM3rI7tTk7jg9QSDId8EF3Pt5fJq6QhztC6y7-JaSFQZLMtkSCAWmOQx_TgKgVoVbgMeiqhHbZ2hhoA7TtpEIIL5Gnfq46t3E18ExdrsO96ZCGQGcBw5x8J1ustq2cwdlFKeg4ULNWAAd1ay1hojRa7jCHs98AcoJ3Nts9-o7yEMuN2rrfpK_nm68nciwFtF-ke1KoiBg",
|
||||||
"Username": "noeasyrunstrucking@gmail.com",
|
"Username": "noeasyrunstrucking@gmail.com",
|
||||||
"Password": "thumper123"
|
"Password": "thumper123"
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,11 @@ type Config struct {
|
||||||
Once bool
|
Once bool
|
||||||
Brokers struct {
|
Brokers struct {
|
||||||
NTG struct {
|
NTG struct {
|
||||||
Mock bool
|
Mock bool
|
||||||
Token string
|
LoadPageURIFormat string
|
||||||
Username string
|
Token string
|
||||||
Password string
|
Username string
|
||||||
|
Password string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
todo:
|
todo:
|
||||||
- write-as for clients so ma can write to pa by default
|
- write-as for clients so ma can write to pa by default
|
||||||
- link to view more
|
|
||||||
- continuation is garbo, but I can still do better client side to avoid get-set high level
|
- continuation is garbo, but I can still do better client side to avoid get-set high level
|
||||||
- todo: details from ntg; stophours for pickup, appointmenttime/facitlyhours for dest
|
- todo: details from ntg; stophours for pickup, appointmenttime/facitlyhours for dest
|
||||||
details: |
|
details: |
|
||||||
|
|
@ -22,6 +21,7 @@ todo:
|
||||||
- banlist criteria like vendors, brokers, metadata
|
- banlist criteria like vendors, brokers, metadata
|
||||||
- set up copy for caleb, broc
|
- set up copy for caleb, broc
|
||||||
done:
|
done:
|
||||||
|
- link to view more
|
||||||
- map with to-from line
|
- map with to-from line
|
||||||
- TO CONFLUENT.RS OR W/E
|
- TO CONFLUENT.RS OR W/E
|
||||||
- rm get-set stuff for matrix now that it has continuation
|
- rm get-set stuff for matrix now that it has continuation
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue