adding fields to PoemMusicTrackViewModel to be used in moderation process
This commit is contained in:
parent
dc990cea09
commit
e837e905b6
@ -65,6 +65,21 @@
|
||||
/// </summary>
|
||||
public int GolhaTrackId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// approved
|
||||
/// </summary>
|
||||
public bool Approved { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// instead of deleting rejected songs keep track of them
|
||||
/// </summary>
|
||||
public bool Rejected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// rejection cause
|
||||
/// </summary>
|
||||
public string RejectionCause { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// to string
|
||||
/// </summary>
|
||||
|
||||
@ -4309,6 +4309,21 @@
|
||||
golha id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:RMuseum.Models.Ganjoor.ViewModels.PoemMusicTrackViewModel.Approved">
|
||||
<summary>
|
||||
approved
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:RMuseum.Models.Ganjoor.ViewModels.PoemMusicTrackViewModel.Rejected">
|
||||
<summary>
|
||||
instead of deleting rejected songs keep track of them
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:RMuseum.Models.Ganjoor.ViewModels.PoemMusicTrackViewModel.RejectionCause">
|
||||
<summary>
|
||||
rejection cause
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:RMuseum.Models.Ganjoor.ViewModels.PoemMusicTrackViewModel.ToString">
|
||||
<summary>
|
||||
to string
|
||||
|
||||
@ -748,7 +748,10 @@ namespace RMuseum.Services.Implementation
|
||||
TrackUrl = t.TrackUrl,
|
||||
Description = t.Description,
|
||||
BrokenLink = t.BrokenLink,
|
||||
GolhaTrackId = t.GolhaTrackId == null ? 0 : (int)t.GolhaTrackId
|
||||
GolhaTrackId = t.GolhaTrackId == null ? 0 : (int)t.GolhaTrackId,
|
||||
Approved = t.Approved,
|
||||
Rejected = t.Rejected,
|
||||
RejectionCause = t.RejectionCause
|
||||
|
||||
}
|
||||
).ToArrayAsync()
|
||||
@ -770,6 +773,10 @@ namespace RMuseum.Services.Implementation
|
||||
{
|
||||
try
|
||||
{
|
||||
song.Approved = false;
|
||||
song.Rejected = false;
|
||||
song.RejectionCause = "";
|
||||
song.BrokenLink = false;
|
||||
if(song.TrackType == PoemMusicTrackType.Golha)
|
||||
{
|
||||
var golhaTrack = await _context.GolhaTracks.Include(g => g.GolhaProgram).ThenInclude(p => p.GolhaCollection).Where(g => g.Id == song.GolhaTrackId).FirstOrDefaultAsync();
|
||||
@ -812,7 +819,10 @@ namespace RMuseum.Services.Implementation
|
||||
TrackUrl = song.TrackUrl,
|
||||
SuggestedById = userId,
|
||||
Description = song.Description,
|
||||
GolhaTrackId = song.TrackType == PoemMusicTrackType.Golha ? song.GolhaTrackId : (int?)null
|
||||
GolhaTrackId = song.TrackType == PoemMusicTrackType.Golha ? song.GolhaTrackId : (int?)null,
|
||||
Approved = false,
|
||||
Rejected = false,
|
||||
RejectionCause = ""
|
||||
};
|
||||
|
||||
GanjoorSinger singer = await _context.GanjoorSingers.Where(s => s.Url == song.ArtistUrl).FirstOrDefaultAsync();
|
||||
@ -867,7 +877,10 @@ namespace RMuseum.Services.Implementation
|
||||
TrackUrl = song.TrackUrl,
|
||||
Description = song.Description,
|
||||
GolhaTrackId = song.TrackType == PoemMusicTrackType.Golha ? (int)song.GolhaTrackId : 0,
|
||||
BrokenLink = song.BrokenLink
|
||||
BrokenLink = song.BrokenLink,
|
||||
Approved = song.Approved,
|
||||
Rejected = song.Rejected,
|
||||
RejectionCause = song.RejectionCause
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user